no message

This commit is contained in:
kuaifan 2025-05-06 22:41:43 +08:00
parent 82778014b8
commit e52523f903
2 changed files with 19 additions and 4 deletions

View File

@ -6,7 +6,7 @@
:mask="!isFullscreen" :mask="!isFullscreen"
:mask-closable="maskClosable" :mask-closable="maskClosable"
:footer-hide="true" :footer-hide="true"
:transition-names="[$A.isAndroid() ? '' : `drawer-slide-${transitionName}`, '']" :transition-names="transitionNames"
:beforeClose="beforeClose" :beforeClose="beforeClose"
:class-name="className" :class-name="className"
fullscreen> fullscreen>
@ -15,7 +15,7 @@
</div> </div>
<DrawerOverlayView <DrawerOverlayView
v-else v-else
:placement="transitionName" :placement="placementName"
:size="size" :size="size"
:minSize="minSize" :minSize="minSize"
:resize="resize" :resize="resize"
@ -54,6 +54,10 @@ export default {
type: Boolean, type: Boolean,
default: false default: false
}, },
transitions: {
type: Array,
default: () => []
},
size: { size: {
type: [Number, String], type: [Number, String],
default: "100%" default: "100%"
@ -91,9 +95,15 @@ export default {
isFullscreen() { isFullscreen() {
return this.forceFullscreen || (this.windowWidth < 500 && this.placement != 'bottom') return this.forceFullscreen || (this.windowWidth < 500 && this.placement != 'bottom')
}, },
transitionName() { placementName() {
return this.isFullscreen ? 'bottom' : this.placement return this.isFullscreen ? 'bottom' : this.placement
}, },
transitionNames() {
if (this.transitions.length > 0) {
return this.transitions
}
return [$A.isAndroid() ? '' : `drawer-slide-${this.placementName}`, '']
},
className() { className() {
const array = [] const array = []
if (this.isFullscreen) { if (this.isFullscreen) {
@ -106,7 +116,7 @@ export default {
if (this.drawerClass) { if (this.drawerClass) {
array.push(this.drawerClass) array.push(this.drawerClass)
} }
array.push(this.transitionName) array.push(this.placementName)
} }
return array.join(" "); return array.join(" ");
}, },

View File

@ -5,6 +5,7 @@
placement="right" placement="right"
modal-class="micro-app-modal" modal-class="micro-app-modal"
drawer-class="micro-app-drawer" drawer-class="micro-app-drawer"
:transitions="transitions"
:force-fullscreen="appConfig.forceFullscreen" :force-fullscreen="appConfig.forceFullscreen"
:size="1200"> :size="1200">
<div v-if="appConfig.isOpen" class="micro-app-wrapper"> <div v-if="appConfig.isOpen" class="micro-app-wrapper">
@ -104,6 +105,10 @@ export default {
'themeName', 'themeName',
]), ]),
transitions() {
return this.appConfig.forceFullscreen ? ['', ''] : []
},
appData() { appData() {
const {initialData, appName} = this.appConfig; const {initialData, appName} = this.appConfig;