修复模版

This commit is contained in:
yubaolee 2021-09-15 07:48:58 +08:00
parent 8fb9297145
commit 3a70bf8e43
2 changed files with 8 additions and 4 deletions

View File

@ -161,9 +161,11 @@ export default {
row.disable = disable
},
resetTemp() {
this.headerList.forEach((item) => {
this.temp[item.columnName] = defaultVal(item.entityType)
let obj = {};
this.headerList.forEach((item) => {
obj[item.columnName] = defaultVal(item.entityType)
})
this.temp =Object.assign({}, obj) // copy obj
},
handleCreate() {
// 弹出添加框

View File

@ -162,9 +162,11 @@ export default {
row.disable = disable
},
resetTemp() {
this.headerList.forEach((item) => {
this.temp[item.columnName] = defaultVal(item.entityType)
let obj = {};
this.headerList.forEach((item) => {
obj[item.columnName] = defaultVal(item.entityType)
})
this.temp =Object.assign({}, obj) // copy obj
},
handleCreate() {
// 弹出添加框