Showing
1 changed file
with
6 additions
and
11 deletions
| 1 | 1 | <template> |
| 2 | - <BasicDrawer | |
| 3 | - v-bind="$attrs" | |
| 4 | - @register="registerDrawer" | |
| 5 | - title="设备接入信息详情" | |
| 6 | - width="25%" | |
| 7 | - destroy-on-close | |
| 8 | - > | |
| 9 | - <Description :column="3" size="middle" @register="registeDesc" /> | |
| 2 | + <BasicDrawer v-bind="$attrs" @register="registerDrawer" title="设备接入信息详情" width="25%"> | |
| 3 | + <Description :column="3" size="middle" @register="registeDesc" :data="dataValue" /> | |
| 10 | 4 | </BasicDrawer> |
| 11 | 5 | </template> |
| 12 | 6 | <script lang="ts" setup> |
| ... | ... | @@ -14,22 +8,23 @@ |
| 14 | 8 | import { BasicDrawer, useDrawerInner } from '/@/components/Drawer'; |
| 15 | 9 | import { Description } from '/@/components/Description/index'; |
| 16 | 10 | import { useDescription } from '/@/components/Description'; |
| 11 | + import { ref } from 'vue'; | |
| 17 | 12 | |
| 18 | 13 | defineEmits(['success', 'register']); |
| 19 | 14 | |
| 20 | - const [registeDesc, { setDescProps }] = useDescription({ | |
| 15 | + const [registeDesc] = useDescription({ | |
| 21 | 16 | schema: detailSchema, |
| 22 | 17 | column: 2, |
| 23 | 18 | layout: 'vertical', |
| 24 | 19 | }); |
| 25 | 20 | |
| 21 | + const dataValue = ref<any>([]); | |
| 26 | 22 | const [registerDrawer, { setDrawerProps }] = useDrawerInner(async (data) => { |
| 27 | 23 | setDrawerProps({ confirmLoading: true }); |
| 28 | - const dataValue = { | |
| 24 | + dataValue.value = { | |
| 29 | 25 | ...data, |
| 30 | 26 | ...data?.sipExtend, |
| 31 | 27 | }; |
| 32 | 28 | setDrawerProps({ confirmLoading: false }); |
| 33 | - await setDescProps({ data: dataValue }); | |
| 34 | 29 | }); |
| 35 | 30 | </script> | ... | ... |