feat(tabbar): 更新tabbar策略并优化样式
This commit is contained in:
parent
b8c593e957
commit
ee383968a5
@ -36,7 +36,9 @@ onLoad(() => {
|
||||
<template>
|
||||
<up-tabbar
|
||||
v-if="customTabbarEnable"
|
||||
v-model:current="tabbarStore.curIdx"
|
||||
:value="tabbarStore.curIdx"
|
||||
active-color="#d81e06"
|
||||
inactive-color="#7d7e80"
|
||||
bordered
|
||||
safeareainsetbottom
|
||||
placeholder
|
||||
@ -56,10 +58,19 @@ onLoad(() => {
|
||||
:text="item.text"
|
||||
:name="idx"
|
||||
>
|
||||
<template #icon>
|
||||
<template #active-icon>
|
||||
<view
|
||||
h-40rpx
|
||||
w-40rpx
|
||||
class="text-[#d81e06]"
|
||||
:class="[item.icon, idx === tabbarStore.curIdx ? 'is-active' : 'is-inactive']"
|
||||
/>
|
||||
</template>
|
||||
<template #inactive-icon>
|
||||
<view
|
||||
h-40rpx
|
||||
w-40rpx
|
||||
class="text-[#7d7e80]"
|
||||
:class="[item.icon, idx === tabbarStore.curIdx ? 'is-active' : 'is-inactive']"
|
||||
/>
|
||||
</template>
|
||||
|
@ -9,7 +9,7 @@
|
||||
*/
|
||||
|
||||
// TODO:通过这里切换使用tabbar的策略
|
||||
export const selectedTabbarStrategy = 0
|
||||
export const selectedTabbarStrategy = 1
|
||||
|
||||
// 0 和 1 时,需要tabbar缓存
|
||||
export const cacheTabbarEnable = selectedTabbarStrategy < 2
|
||||
|
Loading…
x
Reference in New Issue
Block a user