This commit is contained in:
2022-08-10 15:54:41 +08:00
parent e91520e99d
commit bc08dffda2
2 changed files with 29 additions and 5 deletions

View File

@@ -259,6 +259,7 @@ export default {
return opt.label ? opt.label : this.defaultNames[opt.name]
}
},
getPlaceholder(n, c) {
const opt = this.configs.fields[(n - 1) * COLUMN_PER_ROW + (c - 1)]
if (opt) {
@@ -266,6 +267,7 @@ export default {
return opt.placeholder ? opt.placeholder : this.defaultPlaceholders[opt.name]
}
},
getType(n, c) {
const opt = this.configs.fields[(n - 1) * COLUMN_PER_ROW + (c - 1)]
if (opt) {
@@ -279,9 +281,25 @@ export default {
return 'input'
}
},
init() {
init(id) {
this.dataForm.id = id || null
this.visible = true
this.$nextTick(() => {
this.$refs['dataForm'].resetFields()
if (this.dataForm.id) {
this.$http({
url: this.$http.adornUrl(`${this.infoUrl}/${this.dataForm.id}`),
method: 'get'
}).then(({ data: res }) => {
if (res && res.code === 0) {
this.dataForm =
}
})
}
})
},
handleClick(btn) {
/** 提取url */
const urls = {}
@@ -330,8 +348,11 @@ export default {
// add more..
}
},
handleOperations() {},
getDataList() {},
handleClose() {
if (this.isAdd || this.isUpdated) this.$emit('refreshDataList')
this.visible = false