From 5bd778d9a1899422ba1e9b67fbe578d759c86685 Mon Sep 17 00:00:00 2001 From: yangan <yangan0921@163.com> Date: 星期四, 21 十二月 2023 10:19:16 +0800 Subject: [PATCH] 点击称重完成,修改提示信息 --- components/tab-bar/tab-bar.vue | 97 +++++++++++++++++++++++++++--------------------- 1 files changed, 55 insertions(+), 42 deletions(-) diff --git a/components/tab-bar/tab-bar.vue b/components/tab-bar/tab-bar.vue index f52bebc..5c915c5 100644 --- a/components/tab-bar/tab-bar.vue +++ b/components/tab-bar/tab-bar.vue @@ -1,55 +1,68 @@ <template> <view class="tab-bar"> - <u-tabbar :value="current ? current : 0" @change="tabbarchange" :fixed="true" :placeholder="false" :safeAreaInsetBottom="true" :border="true"> - <u-tabbar-item v-for="(item, index) in tabBarList" :key="index" :text="item.text"> - <image class="u-page__item__slot-icon" slot="active-icon" :src="item.selectedIconPath"></image> - <image class="u-page__item__slot-icon" slot="inactive-icon" :src="item.iconPath"></image> + <u-tabbar :value="current ? current : 0" + @change="tabbarchange" + :fixed="true" + :placeholder="false" + :safeAreaInsetBottom="true" + :border="true"> + <u-tabbar-item v-for="(item, index) in tabBarList" + :key="index" + :text="item.text"> + <image class="u-page__item__slot-icon" + slot="active-icon" + :src="item.selectedIconPath"></image> + <image class="u-page__item__slot-icon" + slot="inactive-icon" + :src="item.iconPath"></image> </u-tabbar-item> </u-tabbar> </view> </template> <script> -import store from '@/store'; -export default { - props: { - current: Number - }, - created() { - uni.hideTabBar(); - }, - data() { - return { - // tabBarList: this.$store.state.userTabbar - }; - }, - computed: { - tabBarList() { - return this.$store.state.userTabbar; + import store from '@/store'; + export default { + props: { + current: Number + }, + created() { + uni.hideTabBar(); + }, + data() { + return { + // tabBarList: this.$store.state.userTabbar + }; + }, + computed: { + tabBarList() { + return this.$store.state.userTabbar; + } + }, + methods: { + tabbarchange(e) { + uni.switchTab({ + url: '/' + this.tabBarList[e].pagePath + }); + } } - }, - methods: { - tabbarchange(e) { - uni.switchTab({ - url: '/' + this.tabBarList[e].pagePath - }); - } - } -}; + }; </script> -<style lang="scss" scoped> -::v-deep.tab-bar { - .u-tabbar { - &__content { - background: #ececec !important; - &__item-wrapper { - height: vww(50); +<style lang="scss" + scoped> + ::v-deep.tab-bar { + .u-tabbar { + &__content { + background: #ececec !important; + + &__item-wrapper { + height: vww(50); + } } } } -} -.u-page__item__slot-icon { - width: vww(20) !important; - height: vww(20) !important; -} -</style> + .u-page__item__slot-icon { + width: vww(20) !important; + height: vww(20) !important; + } +</style> \ No newline at end of file -- Gitblit v1.9.1