编辑未初始化数据BUG
This commit is contained in:
parent
998c8edf24
commit
ef44acee7a
@ -82,7 +82,9 @@ export default {
|
|||||||
this.id = record.id
|
this.id = record.id
|
||||||
this.getRolePermissions(this.id)
|
this.getRolePermissions(this.id)
|
||||||
this.getPermissions(record.parent_id > 0 ? { role_id: record.parent_id } : {})
|
this.getPermissions(record.parent_id > 0 ? { role_id: record.parent_id } : {})
|
||||||
setFieldsValue(pick(record, ['role_name', 'description', 'permissions']))
|
this.$nextTick(() => {
|
||||||
|
setFieldsValue(pick(record, ['role_name', 'description', 'permissions']))
|
||||||
|
})
|
||||||
},
|
},
|
||||||
addSon (record) {
|
addSon (record) {
|
||||||
this.visible = true
|
this.visible = true
|
||||||
|
@ -132,7 +132,9 @@ export default {
|
|||||||
this.title = '编辑菜单'
|
this.title = '编辑菜单'
|
||||||
const { form: { setFieldsValue } } = this
|
const { form: { setFieldsValue } } = this
|
||||||
this.id = record.id
|
this.id = record.id
|
||||||
setFieldsValue(pick(record, ['permission_name', 'route', 'permission_mark', 'method', 'type', 'sort', 'icon']))
|
this.$nextTick(() => {
|
||||||
|
setFieldsValue(pick(record, ['permission_name', 'route', 'permission_mark', 'method', 'type', 'sort', 'icon']))
|
||||||
|
})
|
||||||
this.methodValue = record.method
|
this.methodValue = record.method
|
||||||
this.typeValue = record.type
|
this.typeValue = record.type
|
||||||
this.sort = record.sort
|
this.sort = record.sort
|
||||||
|
@ -104,7 +104,9 @@ export default {
|
|||||||
this.getUser(this.id)
|
this.getUser(this.id)
|
||||||
console.log(this.defaultRoles)
|
console.log(this.defaultRoles)
|
||||||
const { form: { setFieldsValue } } = this
|
const { form: { setFieldsValue } } = this
|
||||||
setFieldsValue(pick(record, ['username', 'email']))
|
this.$nextTick(() => {
|
||||||
|
setFieldsValue(pick(record, ['username', 'email']))
|
||||||
|
})
|
||||||
},
|
},
|
||||||
handleEmail (rule, value, callback) {
|
handleEmail (rule, value, callback) {
|
||||||
if (!validEmail(value)) {
|
if (!validEmail(value)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user