mirror of
https://gitee.com/wonderful-code/buildadmin
synced 2024-11-22 15:24:09 +00:00
perf(baTable):添加表单默认值改为深拷贝
This commit is contained in:
parent
5cf0fc9530
commit
7632ac7d8b
@ -5,7 +5,7 @@ import Sortable from 'sortablejs'
|
|||||||
import { findIndexRow } from '/@/components/table'
|
import { findIndexRow } from '/@/components/table'
|
||||||
import { ElNotification, ElForm } from 'element-plus'
|
import { ElNotification, ElForm } from 'element-plus'
|
||||||
import { onBeforeRouteUpdate, useRoute } from 'vue-router'
|
import { onBeforeRouteUpdate, useRoute } from 'vue-router'
|
||||||
import { isUndefined } from 'lodash-es'
|
import { cloneDeep, isUndefined } from 'lodash-es'
|
||||||
import { i18n } from '/@/lang/index'
|
import { i18n } from '/@/lang/index'
|
||||||
import { TableColumnCtx } from 'element-plus/es/components/table/src/table-column/defaults'
|
import { TableColumnCtx } from 'element-plus/es/components/table/src/table-column/defaults'
|
||||||
|
|
||||||
@ -171,7 +171,7 @@ export default class baTable {
|
|||||||
}
|
}
|
||||||
this.requestEdit(operateIds[0])
|
this.requestEdit(operateIds[0])
|
||||||
} else if (operate == 'add') {
|
} else if (operate == 'add') {
|
||||||
this.form.items = Object.assign({}, this.form.defaultItems)
|
this.form.items = cloneDeep(this.form.defaultItems)
|
||||||
}
|
}
|
||||||
this.form.operate = operate
|
this.form.operate = operate
|
||||||
this.form.operateIds = operateIds
|
this.form.operateIds = operateIds
|
||||||
|
Loading…
Reference in New Issue
Block a user