original bug is fixed but save modal is not handle (nav-item bg color is not correctly painted)

This commit is contained in:
Cindy Chang
2024-05-31 14:36:51 +08:00
parent 69f6a2048a
commit 0a1eefbaa7
4 changed files with 32 additions and 17 deletions

View File

@@ -42,7 +42,7 @@ export default {
Loading
},
methods: {
...mapActions(PageAdminStore, ['copyPendingPageToActivePage',],),
...mapActions(PageAdminStore, ['copyPendingPageToActivePage', 'setPrevioiusPage'],),
},
created() {
// Save token in Headers.
@@ -50,6 +50,9 @@ export default {
this.$http.defaults.headers.common['Authorization'] = `Bearer ${token}`;
},
beforeRouteUpdate(to, from, next) {
this.setPrevioiusPage(from.name);
console.log("beforeRouteUpdate from.name", from.name)
// 離開 Map 頁時判斷是否有無資料和需要存檔
if ((from.name === 'Map' || from.name === 'CheckMap') && this.tempFilterId) {
// 傳給 Map通知 Sidebar 要關閉。