| | |
| | | :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> |
| | |
| | | </template> |
| | | <script> |
| | | import store from '@/store'; |
| | | import { mapGetters } from 'vuex'; |
| | | export default { |
| | | props: { |
| | | current: Number |
| | |
| | | }; |
| | | }, |
| | | 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 |
| | | }); |
| | | } |
| | | } |
| | |
| | | width: vww(20) !important; |
| | | height: vww(20) !important; |
| | | } |
| | | </style> |
| | | </style> |