|
|
@ -58,11 +58,19 @@ const { $e } = useNuxtApp() |
|
|
|
watch( |
|
|
|
watch( |
|
|
|
[views, () => route.params.viewTitle], |
|
|
|
[views, () => route.params.viewTitle], |
|
|
|
([nextViews, viewTitle]) => { |
|
|
|
([nextViews, viewTitle]) => { |
|
|
|
|
|
|
|
// debugger |
|
|
|
|
|
|
|
// alert('mobile watcher') |
|
|
|
const lastOpenedViewId = activeTab.value?.id && lastOpenedViewMap.value[activeTab.value?.id] |
|
|
|
const lastOpenedViewId = activeTab.value?.id && lastOpenedViewMap.value[activeTab.value?.id] |
|
|
|
|
|
|
|
console.log('lastOpenedViewId', lastOpenedViewId) |
|
|
|
const lastOpenedView = nextViews.find((v) => v.id === lastOpenedViewId) |
|
|
|
const lastOpenedView = nextViews.find((v) => v.id === lastOpenedViewId) |
|
|
|
|
|
|
|
console.log('lastOpenedView', lastOpenedView) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// debugger |
|
|
|
|
|
|
|
console.log('viewTitle', viewTitle) |
|
|
|
|
|
|
|
|
|
|
|
if (viewTitle) { |
|
|
|
if (viewTitle) { |
|
|
|
let view = nextViews.find((v) => v.title === viewTitle) |
|
|
|
let view = nextViews.find((v) => v.title === viewTitle) |
|
|
|
|
|
|
|
console.log('view', view) |
|
|
|
if (view) { |
|
|
|
if (view) { |
|
|
|
activeView.value = view |
|
|
|
activeView.value = view |
|
|
|
setLastOpenedViewId(activeView.value?.id) |
|
|
|
setLastOpenedViewId(activeView.value?.id) |
|
|
@ -77,7 +85,8 @@ watch( |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} else if (lastOpenedView) { |
|
|
|
} |
|
|
|
|
|
|
|
else if (lastOpenedView) { |
|
|
|
/** if active view is not found, set it to last opened view */ |
|
|
|
/** if active view is not found, set it to last opened view */ |
|
|
|
router.replace({ |
|
|
|
router.replace({ |
|
|
|
params: { |
|
|
|
params: { |
|
|
|