fix(micro-app): 浏览器独立窗口(popout)关闭应用时关闭窗口

assistShow watch 此前只为 Electron 子窗口发送 windowDestroy 销毁窗口,
浏览器以 window.open 打开的 popout 独立窗口(single/apps.vue)关闭应用后
只隐藏内容、窗口空挂不关。补全浏览器分支:windowType 为 popout 时调用
window.close()。主程序内嵌的 embed 窗口(默认值)不进入此分支,不受影响。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
kuaifan 2026-06-14 05:30:31 +00:00
parent e17a520599
commit cf6f6041b6

View File

@ -161,9 +161,17 @@ export default {
this.unmountAllMicroApp()
},
assistShow(show) {
if (!show && $A.isSubElectron && !this.isRestarting) {
// Electron
if (show || this.isRestarting) {
//
return
}
if ($A.isSubElectron) {
// Electron
$A.Electron.sendMessage('windowDestroy');
} else if (this.windowType === 'popout') {
// window-type="popout" window.open
// popout embed
window.close();
}
},
microApps: {