refactor(fg-tabbar): 更新tabbar策略并添加safelist配置
将selectedTabbarStrategy从0改为1以切换tabbar策略 在uno.config.ts中添加空的safelist配置 移除注释掉的i-carbon-code导入
This commit is contained in:
parent
407bc849ec
commit
f8641457ad
@ -36,6 +36,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
// 'i-carbon-code',
|
||||
import { tabbarList as _tabBarList, cacheTabbarEnable, selectedTabbarStrategy } from './tabbarList'
|
||||
import { tabbarStore } from './tabbar'
|
||||
|
||||
|
@ -7,7 +7,7 @@ export const TABBAR_STRATEGY = {
|
||||
}
|
||||
|
||||
// TODO:通过这里切换使用tabbar的策略
|
||||
export const selectedTabbarStrategy = 0
|
||||
export const selectedTabbarStrategy = 1
|
||||
export const cacheTabbarEnable = selectedTabbarStrategy < 2
|
||||
|
||||
// selectedTabbarStrategy==0 时,需要填 iconPath 和 selectedIconPath
|
||||
@ -27,6 +27,7 @@ export const tabbarList = [
|
||||
pagePath: 'pages/about/about',
|
||||
text: '关于',
|
||||
icon: 'i-carbon-code',
|
||||
// 注意 unocss 的图标需要在 页面上引入一下,或者配置到 unocss.config.ts 的 safelist 中
|
||||
iconType: 'unocss',
|
||||
},
|
||||
// {
|
||||
|
@ -39,6 +39,7 @@ export default defineConfig({
|
||||
center: 'flex justify-center items-center',
|
||||
},
|
||||
],
|
||||
safelist: [],
|
||||
rules: [
|
||||
[
|
||||
'p-safe',
|
||||
|
Loading…
x
Reference in New Issue
Block a user