mirror of https://gitee.com/xiaonuobase/snowy
【更新】恢复XnFormContainer内的弹框组件
parent
29633701d1
commit
8672389da2
|
@ -1,9 +1,9 @@
|
||||||
<template>
|
<template>
|
||||||
<drag-modal v-if="isModal" :visible="visible" v-bind="$attrs">
|
<a-modal v-if="isModal" :visible="visible" @cancel="cancel" v-bind="$attrs">
|
||||||
<template v-for="slotKey in slotKeys" #[slotKey]>
|
<template v-for="slotKey in slotKeys" #[slotKey]>
|
||||||
<slot :name="slotKey" />
|
<slot :name="slotKey" />
|
||||||
</template>
|
</template>
|
||||||
</drag-modal>
|
</a-modal>
|
||||||
<a-drawer v-else :visible="visible" v-bind="$attrs" :footer-style="{ textAlign: 'right' }">
|
<a-drawer v-else :visible="visible" v-bind="$attrs" :footer-style="{ textAlign: 'right' }">
|
||||||
<template v-for="slotKey in slotKeys" #[slotKey]>
|
<template v-for="slotKey in slotKeys" #[slotKey]>
|
||||||
<slot :name="slotKey" />
|
<slot :name="slotKey" />
|
||||||
|
@ -14,7 +14,6 @@
|
||||||
<script>
|
<script>
|
||||||
import { mapState } from 'pinia'
|
import { mapState } from 'pinia'
|
||||||
import { globalStore } from '@/store'
|
import { globalStore } from '@/store'
|
||||||
import DragModal from '@/components/DragModal/index.vue'
|
|
||||||
|
|
||||||
const FormContainerTypeEnum = {
|
const FormContainerTypeEnum = {
|
||||||
DRAWER: 'drawer',
|
DRAWER: 'drawer',
|
||||||
|
@ -22,7 +21,6 @@
|
||||||
}
|
}
|
||||||
export default {
|
export default {
|
||||||
name: 'XnFormContainer',
|
name: 'XnFormContainer',
|
||||||
components: { DragModal },
|
|
||||||
inheritAttrs: false,
|
inheritAttrs: false,
|
||||||
props: {
|
props: {
|
||||||
visible: {
|
visible: {
|
||||||
|
@ -39,6 +37,11 @@
|
||||||
isModal() {
|
isModal() {
|
||||||
return FormContainerTypeEnum.MODAL === this.formStyle
|
return FormContainerTypeEnum.MODAL === this.formStyle
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
cancel() {
|
||||||
|
this.$emit('close')
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in New Issue