
【主 题】:tabbar切换时 激活项的正确更新 【描 述】: [原因]:tabbar navigateBack时 无法正确切换到正确的激活项 [过程]: [影响]: 【结 束】 # 类型 包含: # feat:新功能(feature) # fix:修补bug # docs:文档(documentation) # style: 格式(不影响代码运行的变动) # refactor:重构(即不是新增功能,也不是修改bug的代码变动) # test:增加测试 # chore:构建过程或辅助工具的变动
33 lines
536 B
Vue
33 lines
536 B
Vue
<template>
|
||
<view class="vh100 flex column">
|
||
<!-- tabbar -->
|
||
<view>
|
||
<tabbar></tabbar>
|
||
</view>
|
||
</view>
|
||
</template>
|
||
|
||
<script>
|
||
export default {
|
||
data() {
|
||
return {
|
||
avatarSrc: "", //头像地址
|
||
menuCurrent: null, //tabbar当前页
|
||
}
|
||
},
|
||
onShow() {
|
||
// 当页面显示时,设置tabber的激活项
|
||
this.$store.commit('setTabbarCurrent', 2)
|
||
},
|
||
methods: {
|
||
}
|
||
}
|
||
</script>
|
||
|
||
<style lang="scss">
|
||
.topbar {
|
||
background-color: $uni-color-error;
|
||
height: 176rpx;
|
||
}
|
||
.topTit{margin-right: 104rpx;}
|
||
</style> |