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
| <script setup lang="ts">
| import { ref } from 'vue';
|
| import { JsonPreview, useVbenModal } from '@vben/common-ui';
|
| const data = ref({});
| const [BasicModal, modalApi] = useVbenModal({
| title: '流程变量',
| fullscreenButton: false,
| footer: false,
| onOpenChange: (visible) => {
| if (!visible) {
| data.value = {};
| return null;
| }
| const recordString = modalApi.getData().record;
| data.value = JSON.parse(recordString);
| },
| });
| </script>
|
| <template>
| <BasicModal>
| <div class="min-h-[400px] overflow-y-auto">
| <JsonPreview :data="data" />
| </div>
| </BasicModal>
| </template>
|
|