Files
admin-vben5/playground/src/views/examples/modal/drag-demo.vue
Vben 20a3868594 feat: add modal and drawer components and examples (#4229)
* feat: add modal component

* feat: add drawer component

* feat: apply new modal and drawer components to the layout

* chore: typo

* feat: add some unit tests
2024-08-25 23:40:52 +08:00

20 lines
421 B
Vue
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<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>