Commit 40e2280d by liwk

commit

1 parent 1fda542d
...@@ -42,8 +42,12 @@ export default { ...@@ -42,8 +42,12 @@ export default {
} }
}, },
watch: { watch: {
'index' (n) {
this.tabIndex = n
},
'updata' (n) { 'updata' (n) {
this.data = this.list this.data = this.list
this.tabIndex = this.index
} }
}, },
mounted () { mounted () {
......
...@@ -5,12 +5,17 @@ export default { ...@@ -5,12 +5,17 @@ export default {
pageNum: 1, pageNum: 1,
list: [], list: [],
total: 0, total: 0,
flag: false flag: false,
updata: new Date().getTime()
} }
}, },
mounted() { mounted() {
let { tabIndex } = this.getQuery() 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() if (this.$route.meta.isTab) this.init()
}, },
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
@change="change" @change="change"
sticky sticky
:index="tabIndex" :index="tabIndex"
:updata="updata"
></tab> ></tab>
<template v-if="flag"> <template v-if="flag">
<template v-if="list.length"> <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!