diff --git a/src/layout/header-aside/components/tabs/index.vue b/src/layout/header-aside/components/tabs/index.vue
index d83e4f43..4ca15fe3 100644
--- a/src/layout/header-aside/components/tabs/index.vue
+++ b/src/layout/header-aside/components/tabs/index.vue
@@ -27,6 +27,9 @@
+
+
+
-
+
diff --git a/src/views/demo/playground/page-cache/params.vue b/src/views/demo/playground/page-cache/params.vue
index c1a50429..6d5a388c 100644
--- a/src/views/demo/playground/page-cache/params.vue
+++ b/src/views/demo/playground/page-cache/params.vue
@@ -39,38 +39,8 @@ export default {
},
data () {
return {
- datas: [],
data: { value: '' }
}
- },
- methods: {
- switchData (id) {
- let data = this.datas[id]
- if (!data) {
- data = { value: '' }
- this.datas[id] = data
- }
- this.data = data
- }
- },
- // 第一次进入或从其他组件对应路由进入时触发
- beforeRouteEnter (to, from, next) {
- const id = to.params.id
- if (id) {
- next(instance => instance.switchData(id))
- } else {
- next(new Error('未指定ID'))
- }
- },
- // 在同一组件对应的多个路由间切换时触发
- beforeRouteUpdate (to, from, next) {
- const id = to.params.id
- if (id) {
- this.switchData(id)
- next()
- } else {
- next(new Error('未指定ID'))
- }
}
}
diff --git a/src/views/system/function/refresh/index.js b/src/views/system/function/refresh/index.js
index e8b35034..03ef5ad8 100644
--- a/src/views/system/function/refresh/index.js
+++ b/src/views/system/function/refresh/index.js
@@ -1,6 +1,7 @@
export default {
beforeRouteEnter (to, from, next) {
- next(instance => instance.$router.replace(from.fullPath))
+ from.meta[from.path] = Date.now()
+ next(instance => instance.$router.replace({ path: from.fullPath, meta: from.meta }))
},
render: h => h()
}