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