From e52523f9034a471e141e78ceff5c88a8b241b53b Mon Sep 17 00:00:00 2001 From: kuaifan Date: Tue, 6 May 2025 22:41:43 +0800 Subject: [PATCH] no message --- .../js/components/DrawerOverlay/index.vue | 18 ++++++++++++++---- resources/assets/js/components/MicroApps.vue | 5 +++++ 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/resources/assets/js/components/DrawerOverlay/index.vue b/resources/assets/js/components/DrawerOverlay/index.vue index e2e7b57b4..4d8f06c2d 100644 --- a/resources/assets/js/components/DrawerOverlay/index.vue +++ b/resources/assets/js/components/DrawerOverlay/index.vue @@ -6,7 +6,7 @@ :mask="!isFullscreen" :mask-closable="maskClosable" :footer-hide="true" - :transition-names="[$A.isAndroid() ? '' : `drawer-slide-${transitionName}`, '']" + :transition-names="transitionNames" :beforeClose="beforeClose" :class-name="className" fullscreen> @@ -15,7 +15,7 @@ [] + }, size: { type: [Number, String], default: "100%" @@ -91,9 +95,15 @@ export default { isFullscreen() { return this.forceFullscreen || (this.windowWidth < 500 && this.placement != 'bottom') }, - transitionName() { + placementName() { return this.isFullscreen ? 'bottom' : this.placement }, + transitionNames() { + if (this.transitions.length > 0) { + return this.transitions + } + return [$A.isAndroid() ? '' : `drawer-slide-${this.placementName}`, ''] + }, className() { const array = [] if (this.isFullscreen) { @@ -106,7 +116,7 @@ export default { if (this.drawerClass) { array.push(this.drawerClass) } - array.push(this.transitionName) + array.push(this.placementName) } return array.join(" "); }, diff --git a/resources/assets/js/components/MicroApps.vue b/resources/assets/js/components/MicroApps.vue index 42be1a2da..c608b13a6 100644 --- a/resources/assets/js/components/MicroApps.vue +++ b/resources/assets/js/components/MicroApps.vue @@ -5,6 +5,7 @@ placement="right" modal-class="micro-app-modal" drawer-class="micro-app-drawer" + :transitions="transitions" :force-fullscreen="appConfig.forceFullscreen" :size="1200">
@@ -104,6 +105,10 @@ export default { 'themeName', ]), + transitions() { + return this.appConfig.forceFullscreen ? ['', ''] : [] + }, + appData() { const {initialData, appName} = this.appConfig;