fix: basemodal 无法透传 attributes 至 Modal.tsx (#3637)
This commit is contained in:
parent
eae68bb029
commit
89830ec7e6
|
|
@ -2,7 +2,6 @@ import { Modal } from 'ant-design-vue';
|
||||||
import { defineComponent, toRefs, unref } from 'vue';
|
import { defineComponent, toRefs, unref } from 'vue';
|
||||||
import { basicProps } from '../props';
|
import { basicProps } from '../props';
|
||||||
import { useModalDragMove } from '../hooks/useModalDrag';
|
import { useModalDragMove } from '../hooks/useModalDrag';
|
||||||
import { useAttrs } from '@vben/hooks';
|
|
||||||
import { extendSlots } from '@/utils/helper/tsxHelper';
|
import { extendSlots } from '@/utils/helper/tsxHelper';
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
|
|
@ -10,9 +9,8 @@ export default defineComponent({
|
||||||
inheritAttrs: false,
|
inheritAttrs: false,
|
||||||
props: basicProps as any,
|
props: basicProps as any,
|
||||||
emits: ['cancel'],
|
emits: ['cancel'],
|
||||||
setup(props, { slots, emit }) {
|
setup(props, { slots, emit, attrs }) {
|
||||||
const { open, draggable, destroyOnClose } = toRefs(props);
|
const { open, draggable, destroyOnClose } = toRefs(props);
|
||||||
const attrs = useAttrs();
|
|
||||||
useModalDragMove({
|
useModalDragMove({
|
||||||
open,
|
open,
|
||||||
destroyOnClose,
|
destroyOnClose,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue