diff --git a/src/components/Navbar.vue b/src/components/Navbar.vue index b80286d..b5f002d 100644 --- a/src/components/Navbar.vue +++ b/src/components/Navbar.vue @@ -92,7 +92,7 @@ export default { savedSuccessfully }, mounted() { - if(this.$route.params.type === 'filter') this.createfilterId= this.$route.params.fileId; + if(this.$route.params.type === 'filter') this.createFilterId= this.$route.params.fileId; this.showNavbarBreadcrumb = this.$route.matched[0].name !== ('AuthContainer')? true : false; this.getNavViewName(); }, @@ -132,7 +132,9 @@ export default { if(this.isUpdataFilter) await savedSuccessfully(this.filterName); this.tempFilterId = null; }else if(this.logId){ - saveFilter(this.allMapDataStore.addFilterId); + await saveFilter(this.allMapDataStore.addFilterId); + // 存檔後為 filterID,換網址不跳頁,使用 push 記錄歷史路由 + await this.$router.push(`/discover/map/filter/${this.createFilterId}`); }; } },