| | |
| | | import { defineComponent, toRefs, unref } from 'vue'; |
| | | import { basicProps } from '../props'; |
| | | 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({ |
| | | name: 'Modal', |
| | | inheritAttrs: false, |
| | | props: basicProps as any, |
| | | emits: ['cancel'], |
| | | setup(props, { slots, emit }) { |
| | | const { visible, draggable, destroyOnClose } = toRefs(props); |
| | | const attrs = useAttrs(); |
| | | setup(props, { slots, emit, attrs }) { |
| | | const { open, draggable, destroyOnClose } = toRefs(props); |
| | | useModalDragMove({ |
| | | visible, |
| | | open, |
| | | destroyOnClose, |
| | | draggable, |
| | | }); |