fix(cl-tabbar): 优化skin添加默认值

This commit is contained in:
yeweikangxx123 2025-04-02 23:13:16 +08:00
parent f090c5dc63
commit d90402bc38
1 changed files with 6 additions and 3 deletions

View File

@ -7,7 +7,7 @@
<template> <template>
<view> <view>
<!-- v-if="user.skin == 0" --> <!-- v-if="user.skin == 0" -->
<u-tabbar :value="current ? current : 0" @change="tabbarChange" :fixed="true" :placeholder="false" <u-tabbar v-if="systemSkin === 0" :value="current ? current : 0" @change="tabbarChange" :fixed="true" :placeholder="false"
:border="false" :safeAreaInsetBottom="true" inactiveColor="#666666" activeColor="#333333"> :border="false" :safeAreaInsetBottom="true" inactiveColor="#666666" activeColor="#333333">
<u-tabbar-item :text="'首页'"> <u-tabbar-item :text="'首页'">
<image class="u-page__item__slot-icon" slot="active-icon" src="@/static/images/one1.png"></image> <image class="u-page__item__slot-icon" slot="active-icon" src="@/static/images/one1.png"></image>
@ -31,7 +31,7 @@
<image class="u-page__item__slot-icon" slot="inactive-icon" src="@/static/images/fore2.png"></image> <image class="u-page__item__slot-icon" slot="inactive-icon" src="@/static/images/fore2.png"></image>
</u-tabbar-item> </u-tabbar-item>
</u-tabbar> </u-tabbar>
<!-- <u-tabbar :value="current ? current : 0" class="greenEd" v-if="user.skin == 2" @change="tabbarChange" :fixed="true" <u-tabbar :value="current ? current : 0" class="greenEd" v-if="systemSkin === 2" @change="tabbarChange" :fixed="true"
:placeholder="false" :border="false" :safeAreaInsetBottom="true" inactiveColor="#666666" activeColor="#333333"> :placeholder="false" :border="false" :safeAreaInsetBottom="true" inactiveColor="#666666" activeColor="#333333">
<u-tabbar-item :text="'首页'"> <u-tabbar-item :text="'首页'">
<image class="u-page__item__slot-icon1" slot="active-icon" src="@/static/images/one11.jpg"></image> <image class="u-page__item__slot-icon1" slot="active-icon" src="@/static/images/one11.jpg"></image>
@ -54,7 +54,7 @@
<image class="u-page__item__slot-icon1" slot="active-icon" src="@/static/images/fore11.jpg"></image> <image class="u-page__item__slot-icon1" slot="active-icon" src="@/static/images/fore11.jpg"></image>
<image class="u-page__item__slot-icon1" slot="inactive-icon" src="@/static/images/fore11.jpg"></image> <image class="u-page__item__slot-icon1" slot="inactive-icon" src="@/static/images/fore11.jpg"></image>
</u-tabbar-item> </u-tabbar-item>
</u-tabbar> --> </u-tabbar>
</view> </view>
</template> </template>
@ -93,6 +93,9 @@ export default {
}, },
computed: { computed: {
...mapGetters(['shopCarLength', 'user']), ...mapGetters(['shopCarLength', 'user']),
systemSkin() {
return this.user.skin || 0
}
}, },
methods: { methods: {
tabbarChange(e) { tabbarChange(e) {