no message

This commit is contained in:
kuaifan 2025-08-08 12:45:07 +08:00
parent b34fabab54
commit 00b34fda42
2 changed files with 8 additions and 8 deletions

View File

@ -491,7 +491,7 @@ export default {
*/
closeByName(name) {
try {
this.$refs[`ref-${name}`][0].onClose()
this.$refs[`ref-${name}`][0].attemptClose()
} catch (e) {
this.closeMicroApp(name)
}
@ -543,7 +543,7 @@ export default {
*/
onBeforeClose(name) {
return new Promise(resolve => {
const onClose = () => {
const handleClose = () => {
if ($A.isSubElectron) {
$A.Electron.sendMessage('windowDestroy');
} else {
@ -554,7 +554,7 @@ export default {
const app = this.microApps.find(item => item.name == name);
if (!app) {
//
onClose()
handleClose()
return
}
@ -562,10 +562,10 @@ export default {
const before = app.onBeforeClose();
if (before && before.then) {
before.then(() => {
onClose()
handleClose()
});
} else {
onClose()
handleClose()
}
return
}
@ -575,7 +575,7 @@ export default {
if ($A.leftExists(name, 'appstore')) {
this.$store.dispatch("updateMicroAppsStatus");
}
onClose()
handleClose()
}
})
})

View File

@ -17,7 +17,7 @@
</svg>
</div>
<div class="micro-modal-capsule-line"></div>
<div class="micro-modal-capsule-item" @click="onCapsuleClose">
<div class="micro-modal-capsule-item" @click="attemptClose">
<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M9 16C12.866 16 16 12.866 16 9C16 5.13401 12.866 2 9 2C5.13401 2 2 5.13401 2 9C2 12.866 5.13401 16 9 16Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M9 12C10.6569 12 12 10.6569 12 9C12 7.34315 10.6569 6 9 6C7.34315 6 6 7.34315 6 9C6 10.6569 7.34315 12 9 12Z" fill="currentColor"/>
@ -204,7 +204,7 @@ export default {
})
},
onCapsuleClose() {
attemptClose() {
if (!this.beforeClose) {
return this.handleClose();
}