|
@@ -225,16 +225,27 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
refreshTagView() {
|
|
|
+ console.log('哈哈',this.$route.path);
|
|
|
+ const proArr = []
|
|
|
this.$store.state.tagsView.visitedViews.map((view) => {
|
|
|
- this.$store.dispatch("tagsView/delCachedView", view).then(() => {
|
|
|
- const { fullPath } = view;
|
|
|
+ proArr.push(this.$store.dispatch("tagsView/delCachedView", view))
|
|
|
+ // this.$store.dispatch("tagsView/delCachedView", view).then(() => {
|
|
|
+ // const { fullPath } = view;
|
|
|
+ // console.log(fullPath);
|
|
|
+ // // this.$nextTick(() => {
|
|
|
+ // // this.$router.replace({
|
|
|
+ // // path: "/redirect" + fullPath,
|
|
|
+ // // });
|
|
|
+ // // });
|
|
|
+ // });
|
|
|
+ });
|
|
|
+ Promise.all(proArr).then(()=>{
|
|
|
this.$nextTick(() => {
|
|
|
this.$router.replace({
|
|
|
- path: "/redirect" + fullPath,
|
|
|
+ path: "/redirect" + this.$route.path,
|
|
|
});
|
|
|
});
|
|
|
- });
|
|
|
- });
|
|
|
+ })
|
|
|
},
|
|
|
},
|
|
|
};
|