Merge branch '2.0'

This commit is contained in:
zhigang.li 2019-01-04 15:06:30 +08:00
commit 9257201a83
1 changed files with 4 additions and 4 deletions

View File

@ -116,7 +116,7 @@ export default {
let res = this.list.filter(item => routeEqual(this.currentRouteObj, item) || item.name === this.$config.homeName)
this.$emit('on-close', res, 'others', this.currentRouteObj)
setTimeout(() => {
this.getTagElementByName(this.currentRouteObj.name)
this.getTagElementByRoute(this.currentRouteObj)
}, 100)
}
},
@ -160,7 +160,7 @@ export default {
this.tagBodyLeft = -(tag.offsetLeft - (outerWidth - this.outerPadding - tag.offsetWidth))
}
},
getTagElementByName (route) {
getTagElementByRoute (route) {
this.$nextTick(() => {
this.refsTag = this.$refs.tagsPageOpened
this.refsTag.forEach((item, index) => {
@ -186,7 +186,7 @@ export default {
},
watch: {
'$route' (to) {
this.getTagElementByName(to)
this.getTagElementByRoute(to)
},
visible (value) {
if (value) {
@ -198,7 +198,7 @@ export default {
},
mounted () {
setTimeout(() => {
this.getTagElementByName(this.$route)
this.getTagElementByRoute(this.$route)
}, 200)
}
}