perf: 优化应用

This commit is contained in:
kuaifan 2025-07-19 10:38:59 +08:00
parent a20edd9bec
commit d5d32038f5
2 changed files with 10 additions and 9 deletions

View File

@ -115,6 +115,10 @@ export default {
},
created() {
//
microApp.unmountAllApps({destroy: true})
//
microApp.start({
'iframe': true,
'router-mode': 'state',
@ -137,10 +141,10 @@ export default {
if (token) {
return
}
this.closeAllMicroApp()
this.unmountAllMicroApp()
},
themeName() {
this.closeAllMicroApp()
this.unmountAllMicroApp()
},
microApps: {
handler(items) {
@ -477,15 +481,12 @@ export default {
},
/**
* 关闭所有微应用
* @param destroy
* 卸载所有微应用
*/
closeAllMicroApp(destroy = true) {
unmountAllMicroApp() {
this.microApps.forEach(app => {
app.isOpen = false
if (destroy) {
this.unmountMicroApp(app)
}
this.unmountMicroApp(app)
});
},

View File

@ -344,7 +344,7 @@ export default {
location: "application/admin",
label: $A.L("应用商店"),
icon: $A.mainUrl("images/application/appstore.svg"),
url: 'appstore/internal',
url: 'appstore/internal?language={system_lang}&theme={system_theme}',
only_admin: true,
disable_scope_css: true,
auto_dark_theme: false,