先提交下

This commit is contained in:
aixianling
2023-02-02 17:36:17 +08:00
parent 3d11903697
commit 15d23f2110

View File

@@ -32,6 +32,15 @@ export default {
this.$router.push({name: page.name}) this.$router.push({name: page.name})
} }
}, },
watch: {
$route: {
immediate: true,
handler(v) {
const currentPage = this.pages.find(e => e.name == v.name);
currentPage && this.addPage(currentPage)
}
}
},
created() { created() {
const currentPage = JSON.parse(localStorage.getItem("apps") || null)?.find(e => e.name == this.$route.name); const currentPage = JSON.parse(localStorage.getItem("apps") || null)?.find(e => e.name == this.$route.name);
currentPage && mainStore().addPage(currentPage) currentPage && mainStore().addPage(currentPage)