feat(tabbar): 更新tabbar策略并优化样式
This commit is contained in:
parent
b8c593e957
commit
ee383968a5
@ -36,7 +36,9 @@ onLoad(() => {
|
|||||||
<template>
|
<template>
|
||||||
<up-tabbar
|
<up-tabbar
|
||||||
v-if="customTabbarEnable"
|
v-if="customTabbarEnable"
|
||||||
v-model:current="tabbarStore.curIdx"
|
:value="tabbarStore.curIdx"
|
||||||
|
active-color="#d81e06"
|
||||||
|
inactive-color="#7d7e80"
|
||||||
bordered
|
bordered
|
||||||
safeareainsetbottom
|
safeareainsetbottom
|
||||||
placeholder
|
placeholder
|
||||||
@ -56,10 +58,19 @@ onLoad(() => {
|
|||||||
:text="item.text"
|
:text="item.text"
|
||||||
:name="idx"
|
:name="idx"
|
||||||
>
|
>
|
||||||
<template #icon>
|
<template #active-icon>
|
||||||
<view
|
<view
|
||||||
h-40rpx
|
h-40rpx
|
||||||
w-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']"
|
:class="[item.icon, idx === tabbarStore.curIdx ? 'is-active' : 'is-inactive']"
|
||||||
/>
|
/>
|
||||||
</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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user