feat: 继续处理 tabbar
This commit is contained in:
parent
668ff750b2
commit
5c18e0e8ec
@ -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>
|
||||
|
@ -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',
|
||||
|
@ -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",
|
||||
|
Loading…
x
Reference in New Issue
Block a user