Blame view

泰额版/Food Labeling Management Code/Yi.Vben5.Vue3/playground/src/views/examples/modal/drag-demo.vue 421 Bytes
383e20a3   杨鑫   拉取
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
  <script lang="ts" setup>
  import { useVbenModal } from '@vben/common-ui';
  
  import { message } from 'ant-design-vue';
  
  const [Modal, modalApi] = useVbenModal({
    draggable: true,
    onCancel() {
      modalApi.close();
    },
    onConfirm() {
      message.info('onConfirm');
      // modalApi.close();
    },
  });
  </script>
  <template>
    <Modal title="可拖拽示例"> 鼠标移动到 header 上,可拖拽弹窗 </Modal>
  </template>