Showing
3 changed files
with
7 additions
and
5 deletions
... | ... | @@ -60,7 +60,8 @@ |
60 | 60 | const resetFormFields = async () => { |
61 | 61 | const hasExistEl = Object.keys(dataSourceEl).filter((key) => dataSourceEl[key]); |
62 | 62 | for (const id of hasExistEl) { |
63 | - await dataSourceEl[id]?.resetFields(); | |
63 | + const oldValues = dataSourceEl[id]?.getFieldsValue(); | |
64 | + dataSourceEl[id]?.setFieldsValue({ ...oldValues, [DataSourceField.ATTRIBUTE]: null }); | |
64 | 65 | } |
65 | 66 | }; |
66 | 67 | ... | ... |
... | ... | @@ -76,7 +76,7 @@ |
76 | 76 | }); |
77 | 77 | |
78 | 78 | const getSharePageData = computed(() => { |
79 | - return props.value; | |
79 | + return props.value!; | |
80 | 80 | }); |
81 | 81 | |
82 | 82 | const getIsSharePage = computed(() => { |
... | ... | @@ -230,8 +230,9 @@ |
230 | 230 | const getDataBoradDetail = async () => { |
231 | 231 | try { |
232 | 232 | return unref(getIsSharePage) ? unref(getSharePageData) : await getBasePageComponentData(); |
233 | - } catch (error) {} | |
234 | - return {} as ComponentInfoDetail; | |
233 | + } catch (error) { | |
234 | + return {} as ComponentInfoDetail; | |
235 | + } | |
235 | 236 | }; |
236 | 237 | |
237 | 238 | const loading = ref(false); | ... | ... |