Commit c2248c867a2a05a299f63d6c1f6aca825f933338
Merge branch 'fix/DEFECT-1354' into 'main_dev'
fix: DEFECT-1354修复看板管理,切换组件后基本信息丢失 See merge request yunteng/thingskit-front!658
Showing
1 changed file
with
2 additions
and
1 deletions
| @@ -75,7 +75,7 @@ | @@ -75,7 +75,7 @@ | ||
| 75 | 75 | ||
| 76 | createSelectWidgetModeContext(currentMode); | 76 | createSelectWidgetModeContext(currentMode); |
| 77 | 77 | ||
| 78 | - const currentRecord = ref<WidgetDataType>(); | 78 | + const currentRecord = ref<Nullable<Recordable>>({}); |
| 79 | 79 | ||
| 80 | const [registerModal, { closeModal }] = useModalInner( | 80 | const [registerModal, { closeModal }] = useModalInner( |
| 81 | (params: ModalParamsType<WidgetDataType>) => { | 81 | (params: ModalParamsType<WidgetDataType>) => { |
| @@ -105,6 +105,7 @@ | @@ -105,6 +105,7 @@ | ||
| 105 | if (activeKey === TabKeyEnum.VISUAL) { | 105 | if (activeKey === TabKeyEnum.VISUAL) { |
| 106 | dataSource.value = (dataSourceFormEl.value?.getFormValues() as DataSourceType[]) || []; | 106 | dataSource.value = (dataSourceFormEl.value?.getFormValues() as DataSourceType[]) || []; |
| 107 | } | 107 | } |
| 108 | + currentRecord.value = basicInfoFromEl.value?.getFormValues() || {}; | ||
| 108 | }; | 109 | }; |
| 109 | 110 | ||
| 110 | const handleNewRecord = () => { | 111 | const handleNewRecord = () => { |