1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
| <script lang="ts" setup>
| import { ref } from 'vue';
|
| import { useVbenModal } from '@vben/common-ui';
|
| import { Input, message } from 'ant-design-vue';
|
| const [Modal, modalApi] = useVbenModal({
| destroyOnClose: false,
| onCancel() {
| modalApi.close();
| },
| onConfirm() {
| message.info('onConfirm');
| // modalApi.close();
| },
| });
| const value = ref();
| </script>
| <template>
| <Modal
| append-to-main
| class="w-[600px]"
| title="基础弹窗示例"
| title-tooltip="标题提示内容"
| >
| 此弹窗指定在内容区域打开
| <Input v-model="value" placeholder="KeepAlive测试" />
| </Modal>
| </template>
|
|