From 0740bb36f7346f9c6c415c9c0cb5a5c3f3982f72 Mon Sep 17 00:00:00 2001 From: jiuwuxiaohun <31701393+jiuwuxiaohun@users.noreply.github.com> Date: Tue, 11 Sep 2018 13:39:18 +0800 Subject: [PATCH] fix[tagsView]: refresh bug (#1059) #1051 --- src/components/SizeSelect/index.vue | 8 +++++--- src/views/layout/components/TagsView.vue | 7 ++++--- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/components/SizeSelect/index.vue b/src/components/SizeSelect/index.vue index 3f73673e..0e428a23 100644 --- a/src/components/SizeSelect/index.vue +++ b/src/components/SizeSelect/index.vue @@ -32,10 +32,12 @@ export default { // In order to make the cached page re-rendered this.$store.dispatch('delAllCachedViews', this.$route) - const { path } = this.$route + const { fullPath } = this.$route - this.$router.replace({ - path: '/redirect' + path + this.$nextTick(() => { + this.$router.replace({ + path: '/redirect' + fullPath + }) }) } } diff --git a/src/views/layout/components/TagsView.vue b/src/views/layout/components/TagsView.vue index 2bb83b41..793cc698 100644 --- a/src/views/layout/components/TagsView.vue +++ b/src/views/layout/components/TagsView.vue @@ -89,9 +89,10 @@ export default { refreshSelectedTag(view) { this.$store.dispatch('delCachedView', view).then(() => { const { fullPath } = view - - this.$router.replace({ - path: '/redirect' + fullPath + this.$nextTick(() => { + this.$router.replace({ + path: '/redirect' + fullPath + }) }) }) },