Discover: Filters Save done.
This commit is contained in:
@@ -33,7 +33,8 @@ export default {
|
||||
},
|
||||
watch: {
|
||||
$route: function(to, from) {
|
||||
if(to.name !== 'Discover') {
|
||||
// 離開 DiscoverLog 頁要將 Funnel 的規則刪除, DiscoverFilter 會帶上次儲存的 Funnel, 所以不用錯做
|
||||
if(to.name !== 'DiscoverLog') {
|
||||
this.tempFilterId = null;
|
||||
this.temporaryData = []
|
||||
this.postRuleData = []
|
||||
@@ -60,7 +61,7 @@ export default {
|
||||
},
|
||||
beforeRouteUpdate(to, from, next) {
|
||||
// 離開 Discover 頁時判斷是否有無資料和需要存檔
|
||||
if (from.name === 'Discover' && this.tempFilterId) {
|
||||
if ((from.name === 'DiscoverLog' || from.name === 'DiscoverFilter') && this.tempFilterId) {
|
||||
leaveFilter(next, this.allMapDataStore.addFilterId)
|
||||
} else {
|
||||
next();
|
||||
|
||||
Reference in New Issue
Block a user