From 01c82e2ed527bae42fe53452073522d74980bf16 Mon Sep 17 00:00:00 2001 From: 819527061@qq.com <123456> Date: 星期三, 03 七月 2024 11:28:09 +0800 Subject: [PATCH] 无车牌修改的内容 --- components/tab-bar/tab-bar.vue | 19 ++++++++++++------- 1 files changed, 12 insertions(+), 7 deletions(-) diff --git a/components/tab-bar/tab-bar.vue b/components/tab-bar/tab-bar.vue index edeadb1..23af71e 100644 --- a/components/tab-bar/tab-bar.vue +++ b/components/tab-bar/tab-bar.vue @@ -6,9 +6,10 @@ :placeholder="false" :safeAreaInsetBottom="true" :border="true"> - <u-tabbar-item v-for="(item, index) in tabBarList" + <u-tabbar-item v-for="(item, index) in userTabbar" :key="index" :text="item.text"> + <text>{{item}}</text> <image class="u-page__item__slot-icon" slot="active-icon" :src="item.selectedIconPath"></image> @@ -21,6 +22,7 @@ </template> <script> import store from '@/store'; + import { mapGetters } from 'vuex'; export default { props: { current: Number @@ -34,16 +36,19 @@ }; }, computed: { - tabBarList() { - console.log(this.$store.state.userTabbar,'this.$store.state.userTabbar====') - return this.$store.state.userTabbar; - } + ...mapGetters(['userTabbar']) + // tabBarList() { + // console.log(this.$store.state.userTabbar,'this.$store.state.userTabbar====') + // return this.$store.state.userTabbar; + // } }, methods: { tabbarchange(e) { - console.log(this.tabBarList[e].pagePath,'this.tabBarList[e].pagePath===') + console.log(e,'e-----') + console.log(this.userTabbar,'this.userTabbar===') + console.log(this.userTabbar[e].pagePath,'this.userTabbar[e].pagePath===') uni.switchTab({ - url: '/' + this.tabBarList[e].pagePath + url: '/' + this.userTabbar[e].pagePath }); } } -- Gitblit v1.9.1