mirror of
https://github.com/kuaifan/dootask.git
synced 2026-02-02 02:48:13 +00:00
perf: 优化微应用关闭窗口逻辑
This commit is contained in:
parent
66a9d1f25e
commit
860d1ca9b3
@ -147,6 +147,12 @@ export default {
|
|||||||
themeName() {
|
themeName() {
|
||||||
this.unmountAllMicroApp()
|
this.unmountAllMicroApp()
|
||||||
},
|
},
|
||||||
|
assistShow(show) {
|
||||||
|
if (!show && $A.isSubElectron) {
|
||||||
|
// 如果是子 Electron 窗口,关闭窗口助理时销毁窗口
|
||||||
|
$A.Electron.sendMessage('windowDestroy');
|
||||||
|
}
|
||||||
|
},
|
||||||
microApps: {
|
microApps: {
|
||||||
handler(items) {
|
handler(items) {
|
||||||
this.assistShow = !!items.find(item => item.isOpen)
|
this.assistShow = !!items.find(item => item.isOpen)
|
||||||
@ -456,7 +462,7 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过名称关闭微应用
|
* 关闭微应用(关闭前执行beforeClose)
|
||||||
* @param name
|
* @param name
|
||||||
*/
|
*/
|
||||||
closeByName(name) {
|
closeByName(name) {
|
||||||
@ -468,7 +474,7 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 关闭微应用
|
* 关闭微应用(直接关闭)
|
||||||
* @param name
|
* @param name
|
||||||
* @param destroy
|
* @param destroy
|
||||||
*/
|
*/
|
||||||
@ -575,6 +581,7 @@ export default {
|
|||||||
/**
|
/**
|
||||||
* 弹出窗口(全屏)
|
* 弹出窗口(全屏)
|
||||||
* @param name
|
* @param name
|
||||||
|
* @param windowConfig
|
||||||
*/
|
*/
|
||||||
async onPopoutWindow(name, windowConfig = null) {
|
async onPopoutWindow(name, windowConfig = null) {
|
||||||
const app = this.microApps.find(item => item.name == name);
|
const app = this.microApps.find(item => item.name == name);
|
||||||
@ -583,6 +590,7 @@ export default {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
await this.inlineBlank(app, windowConfig)
|
await this.inlineBlank(app, windowConfig)
|
||||||
|
this.closeMicroApp(name, true)
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user