forked from mt-fe-group/mt-yd-ui
update
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user