mirror of
https://github.com/kuaifan/dootask.git
synced 2025-12-12 11:19:56 +00:00
perf: 优化应用
This commit is contained in:
parent
a20edd9bec
commit
d5d32038f5
@ -115,6 +115,10 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
created() {
|
created() {
|
||||||
|
// 卸载所有微应用(防止刷新导致的缓存)
|
||||||
|
microApp.unmountAllApps({destroy: true})
|
||||||
|
|
||||||
|
// 初始化微应用
|
||||||
microApp.start({
|
microApp.start({
|
||||||
'iframe': true,
|
'iframe': true,
|
||||||
'router-mode': 'state',
|
'router-mode': 'state',
|
||||||
@ -137,10 +141,10 @@ export default {
|
|||||||
if (token) {
|
if (token) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
this.closeAllMicroApp()
|
this.unmountAllMicroApp()
|
||||||
},
|
},
|
||||||
themeName() {
|
themeName() {
|
||||||
this.closeAllMicroApp()
|
this.unmountAllMicroApp()
|
||||||
},
|
},
|
||||||
microApps: {
|
microApps: {
|
||||||
handler(items) {
|
handler(items) {
|
||||||
@ -477,15 +481,12 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 关闭所有微应用
|
* 卸载所有微应用
|
||||||
* @param destroy
|
|
||||||
*/
|
*/
|
||||||
closeAllMicroApp(destroy = true) {
|
unmountAllMicroApp() {
|
||||||
this.microApps.forEach(app => {
|
this.microApps.forEach(app => {
|
||||||
app.isOpen = false
|
app.isOpen = false
|
||||||
if (destroy) {
|
this.unmountMicroApp(app)
|
||||||
this.unmountMicroApp(app)
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
2
resources/assets/js/store/mutations.js
vendored
2
resources/assets/js/store/mutations.js
vendored
@ -344,7 +344,7 @@ export default {
|
|||||||
location: "application/admin",
|
location: "application/admin",
|
||||||
label: $A.L("应用商店"),
|
label: $A.L("应用商店"),
|
||||||
icon: $A.mainUrl("images/application/appstore.svg"),
|
icon: $A.mainUrl("images/application/appstore.svg"),
|
||||||
url: 'appstore/internal',
|
url: 'appstore/internal?language={system_lang}&theme={system_theme}',
|
||||||
only_admin: true,
|
only_admin: true,
|
||||||
disable_scope_css: true,
|
disable_scope_css: true,
|
||||||
auto_dark_theme: false,
|
auto_dark_theme: false,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user