From 9ca5d844e24a9d72307f17f6d81eac0f843ec9e2 Mon Sep 17 00:00:00 2001
From: xuefei <564615061@qq.cm>
Date: 星期一, 03 七月 2023 09:11:37 +0800
Subject: [PATCH] 请求过滤null
---
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 4fb3d63..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