Skip to content

Commit 3218f21

Browse files
committed
fix(Embedded Management): Page embed editing function is invalid
1 parent a3a21cc commit 3218f21

File tree

1 file changed

+6
-2
lines changed
  • frontend/src/views/system/embedded

1 file changed

+6
-2
lines changed

frontend/src/views/system/embedded/Page.vue

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ const handleSelectionChange = (val: any[]) => {
115115
const arr = fieldList.value.filter(selectable)
116116
const ids = arr.map((ele: any) => ele.id)
117117
multipleSelectionAll.value = [
118-
...multipleSelectionAll.value.filter((ele) => !ids.includes(ele.id)),
118+
...multipleSelectionAll.value.filter((ele: any) => !ids.includes(ele.id)),
119119
...val,
120120
]
121121
isIndeterminate.value = !(val.length === 0 || val.length === arr.length)
@@ -233,7 +233,11 @@ const saveHandler = () => {
233233
const editHandler = (row: any) => {
234234
pageForm.value.id = null
235235
if (row) {
236-
pageForm.value = cloneDeep(row)
236+
for (const key in defaultForm) {
237+
if (Object.prototype.hasOwnProperty.call(defaultForm, key)) {
238+
pageForm.value[key] = row[key]
239+
}
240+
}
237241
}
238242
dialogTitle.value = row?.id ? t('embedded.edit_app') : t('embedded.create_application')
239243
dialogFormVisible.value = true

0 commit comments

Comments
 (0)