feat: 继续处理 tabbar

This commit is contained in:
feige996 2025-06-21 19:32:31 +08:00
parent 668ff750b2
commit 5c18e0e8ec
3 changed files with 10 additions and 9 deletions

View File

@ -45,14 +45,15 @@ onLoad(() => {
>
<block v-for="(item, idx) in tabbarList" :key="item.path">
<sar-tabbar-item
v-if="item.iconType === 'sar'"
:title="item.text"
v-if="item.iconType === 'uiLib'"
:text="item.text"
:icon="item.icon"
:name="idx"
/>
<sar-tabbar-item
v-else-if="item.iconType === 'unocss' || item.iconType === 'iconfont'"
:title="item.text"
:text="item.text"
:name="idx"
>
<template #icon>
@ -63,7 +64,7 @@ onLoad(() => {
/>
</template>
</sar-tabbar-item>
<sar-tabbar-item v-else-if="item.iconType === 'local'" :title="item.text" :name="idx">
<sar-tabbar-item v-else-if="item.iconType === 'local'" :text="item.text" :name="idx">
<template #icon>
<image :src="item.icon" h-40rpx w-40rpx />
</template>

View File

@ -9,7 +9,7 @@
*/
// TODO通过这里切换使用tabbar的策略
export const selectedTabbarStrategy = 0
export const selectedTabbarStrategy = 1
// 0 和 1 时需要tabbar缓存
export const cacheTabbarEnable = selectedTabbarStrategy < 2
@ -23,8 +23,8 @@ export const tabbarList = [
selectedIconPath: 'static/tabbar/homeHL.png',
pagePath: 'pages/index/index',
text: '首页',
icon: 'home',
iconType: 'wot',
icon: 'image',
iconType: 'uiLib',
},
{
iconPath: 'static/tabbar/example.png',

View File

@ -29,8 +29,8 @@
"selectedIconPath": "static/tabbar/homeHL.png",
"pagePath": "pages/index/index",
"text": "首页",
"icon": "home",
"iconType": "wot"
"icon": "house-door-fill",
"iconType": "sar"
},
{
"iconPath": "static/tabbar/example.png",