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, 13 insertions(+), 6 deletions(-) diff --git a/components/tab-bar/tab-bar.vue b/components/tab-bar/tab-bar.vue index 5c915c5..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,14 +36,19 @@ }; }, computed: { - tabBarList() { - 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(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 }); } } @@ -65,4 +72,4 @@ width: vww(20) !important; height: vww(20) !important; } -</style> \ No newline at end of file +</style> -- Gitblit v1.9.1