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">
|
<block v-for="(item, idx) in tabbarList" :key="item.path">
|
||||||
<sar-tabbar-item
|
<sar-tabbar-item
|
||||||
v-if="item.iconType === 'sar'"
|
v-if="item.iconType === 'uiLib'"
|
||||||
:title="item.text"
|
:text="item.text"
|
||||||
:icon="item.icon"
|
:icon="item.icon"
|
||||||
:name="idx"
|
:name="idx"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<sar-tabbar-item
|
<sar-tabbar-item
|
||||||
v-else-if="item.iconType === 'unocss' || item.iconType === 'iconfont'"
|
v-else-if="item.iconType === 'unocss' || item.iconType === 'iconfont'"
|
||||||
:title="item.text"
|
:text="item.text"
|
||||||
:name="idx"
|
:name="idx"
|
||||||
>
|
>
|
||||||
<template #icon>
|
<template #icon>
|
||||||
@ -63,7 +64,7 @@ onLoad(() => {
|
|||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
</sar-tabbar-item>
|
</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>
|
<template #icon>
|
||||||
<image :src="item.icon" h-40rpx w-40rpx />
|
<image :src="item.icon" h-40rpx w-40rpx />
|
||||||
</template>
|
</template>
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// TODO:通过这里切换使用tabbar的策略
|
// TODO:通过这里切换使用tabbar的策略
|
||||||
export const selectedTabbarStrategy = 0
|
export const selectedTabbarStrategy = 1
|
||||||
|
|
||||||
// 0 和 1 时,需要tabbar缓存
|
// 0 和 1 时,需要tabbar缓存
|
||||||
export const cacheTabbarEnable = selectedTabbarStrategy < 2
|
export const cacheTabbarEnable = selectedTabbarStrategy < 2
|
||||||
@ -23,8 +23,8 @@ export const tabbarList = [
|
|||||||
selectedIconPath: 'static/tabbar/homeHL.png',
|
selectedIconPath: 'static/tabbar/homeHL.png',
|
||||||
pagePath: 'pages/index/index',
|
pagePath: 'pages/index/index',
|
||||||
text: '首页',
|
text: '首页',
|
||||||
icon: 'home',
|
icon: 'image',
|
||||||
iconType: 'wot',
|
iconType: 'uiLib',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
iconPath: 'static/tabbar/example.png',
|
iconPath: 'static/tabbar/example.png',
|
||||||
|
@ -29,8 +29,8 @@
|
|||||||
"selectedIconPath": "static/tabbar/homeHL.png",
|
"selectedIconPath": "static/tabbar/homeHL.png",
|
||||||
"pagePath": "pages/index/index",
|
"pagePath": "pages/index/index",
|
||||||
"text": "首页",
|
"text": "首页",
|
||||||
"icon": "home",
|
"icon": "house-door-fill",
|
||||||
"iconType": "wot"
|
"iconType": "sar"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"iconPath": "static/tabbar/example.png",
|
"iconPath": "static/tabbar/example.png",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user