修复history回来的数据bug
This commit is contained in:
@@ -440,7 +440,11 @@ export default defineComponent({
|
||||
// console.log(this.store.state.UserHabit);
|
||||
|
||||
let noRefresh = this.$route.params.noRefresh; //判断是否主动刷新还是路由跳转过来的 true 路由跳转过来的
|
||||
if (noRefresh) {
|
||||
window.addEventListener('beforeunload', (event)=>{
|
||||
this.store.commit("setUserGroupId", this.$route.params.id);
|
||||
this.store.commit("clearAllCollection");
|
||||
});
|
||||
if (this.$route.name == "homePage") {
|
||||
let colorBoards =
|
||||
this.store.state.UploadFilesModule.allBoardData.colorBoards ||
|
||||
[];
|
||||
@@ -448,11 +452,12 @@ export default defineComponent({
|
||||
this.isHaveReviewCollection = true;
|
||||
}
|
||||
} else {
|
||||
this.store.commit("setUserGroupId", this.$route.params.id);
|
||||
this.store.commit("clearAllCollection");
|
||||
// this.store.commit("setUserGroupId", this.$route.params.id);
|
||||
// this.store.commit("clearAllCollection");
|
||||
}
|
||||
if (this.$route.params.id) {
|
||||
this.getHistoryChoose(this.$route.params.id, "normal");
|
||||
this.store.commit("setDesignCollectionList",[]);
|
||||
} else {
|
||||
this.store.commit("clearAllData");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user