Commit 40e2280d by liwk

commit

1 parent 1fda542d
......@@ -42,8 +42,12 @@ export default {
}
},
watch: {
'index' (n) {
this.tabIndex = n
},
'updata' (n) {
this.data = this.list
this.tabIndex = this.index
}
},
mounted () {
......
......@@ -5,12 +5,17 @@ export default {
pageNum: 1,
list: [],
total: 0,
flag: false
flag: false,
updata: new Date().getTime()
}
},
mounted() {
let { tabIndex } = this.getQuery()
if (tabIndex) this.tabIndex = tabIndex
console.log(tabIndex)
if (tabIndex) {
this.tabIndex = Number(tabIndex)
this.updata = new Date().getTime()
}
if (this.$route.meta.isTab) this.init()
},
......
......@@ -6,6 +6,7 @@
@change="change"
sticky
:index="tabIndex"
:updata="updata"
></tab>
<template v-if="flag">
<template v-if="list.length">
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!