From 6cfe2d226a416caa79cb77203dd451410820bb81 Mon Sep 17 00:00:00 2001 From: kuaifan Date: Tue, 16 Dec 2025 11:31:50 +0000 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=A2=9E=E5=8A=A0=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E8=83=B6=E5=9B=8A=E5=8F=AF=E8=A7=81=E6=80=A7=E7=9A=84=E6=96=B9?= =?UTF-8?q?=E6=B3=95=EF=BC=8C=E4=BC=98=E5=8C=96=E8=83=B6=E5=9B=8A=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../assets/js/components/MicroApps/modal.vue | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/resources/assets/js/components/MicroApps/modal.vue b/resources/assets/js/components/MicroApps/modal.vue index 5ea9f66bb..a26d9c1a5 100644 --- a/resources/assets/js/components/MicroApps/modal.vue +++ b/resources/assets/js/components/MicroApps/modal.vue @@ -130,7 +130,7 @@ export default { } const {capsule} = this.options if ($A.isJson(capsule)) { - if (capsule.visible === false) { + if (!this.getCapsuleVisible(capsule.visible)) { styleObject.display = 'none'; } if (typeof capsule.top === 'number') { @@ -230,6 +230,23 @@ export default { handleClose() { this.$emit('on-confirm-close', this.options.name); + }, + + getCapsuleVisible(visible) { + if (typeof visible === 'boolean') { + return visible + } + if ($A.isJson(visible)) { + const defaultVisible = typeof visible.default === 'boolean' ? visible.default : true + if (this.windowType === 'popout') { + return typeof visible.popout === 'boolean' ? visible.popout : defaultVisible + } + if (this.windowType === 'embed') { + return typeof visible.embed === 'boolean' ? visible.embed : defaultVisible + } + return defaultVisible + } + return true } } }