修改tags刷新按钮可能有缓存的问题

This commit is contained in:
玖伍陈海天 2018-09-06 18:30:21 +08:00
parent 14e693339c
commit de34b2c450
1 changed files with 88 additions and 87 deletions

View File

@ -89,11 +89,12 @@ export default {
refreshSelectedTag(view) { refreshSelectedTag(view) {
this.$store.dispatch('delCachedView', view).then(() => { this.$store.dispatch('delCachedView', view).then(() => {
const { fullPath } = view const { fullPath } = view
this.$nextTick(() => {
this.$router.replace({ this.$router.replace({
path: '/redirect' + fullPath path: '/redirect' + fullPath
}) })
}) })
})
}, },
closeSelectedTag(view) { closeSelectedTag(view) {
this.$store.dispatch('delView', view).then(({ visitedViews }) => { this.$store.dispatch('delView', view).then(({ visitedViews }) => {
@ -132,7 +133,7 @@ export default {
</script> </script>
<style rel="stylesheet/scss" lang="scss" scoped> <style rel="stylesheet/scss" lang="scss" scoped>
.tags-view-container { .tags-view-container {
height: 34px; height: 34px;
width: 100%; width: 100%;
background: #fff; background: #fff;
@ -195,12 +196,12 @@ export default {
} }
} }
} }
} }
</style> </style>
<style rel="stylesheet/scss" lang="scss"> <style rel="stylesheet/scss" lang="scss">
//reset element css of el-icon-close //reset element css of el-icon-close
.tags-view-wrapper { .tags-view-wrapper {
.tags-view-item { .tags-view-item {
.el-icon-close { .el-icon-close {
width: 16px; width: 16px;
@ -221,5 +222,5 @@ export default {
} }
} }
} }
} }
</style> </style>