提交 fe326bd9 编写于 作者: Mr.奇淼('s avatar Mr.奇淼(

修复菜单参数导致tab栏点击切换出现错误的问题

上级 757082d5
......@@ -12,6 +12,7 @@
:key="item.name"
:label="item.meta.title"
:name="item.name"
:tab="item"
v-for="item in historys"
></el-tab-pane>
</el-tabs>
......@@ -136,12 +137,15 @@ export default {
const obj = {}
obj.name = route.name
obj.meta = route.meta
obj.query = route.query
obj.params = route.params
this.historys.push(obj)
}
this.activeValue = this.$route.name
},
changeTab(tab) {
this.$router.push({ name: tab.name })
changeTab(component) {
const tab = component.$attrs.tab
this.$router.push({ name: tab.name,query:tab.query,params:tab.params })
},
removeTab(tab) {
const index = this.historys.findIndex(item => item.name == tab)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册