Fixed menu edit error.

pull/3445/head
ruibaby 2019-05-04 22:01:35 +08:00
parent 51134726b9
commit 373c6cc040
2 changed files with 8 additions and 6 deletions

View File

@ -109,7 +109,7 @@
>
<a
href="javascript:;"
@click="handleEditMenu(record.id)"
@click="handleEditMenu(record)"
>编辑</a>
<a-divider type="vertical" />
<a-popconfirm
@ -189,11 +189,9 @@ export default {
this.formType = 'create'
this.menuToCreate = {}
},
handleEditMenu(id) {
menuApi.get(id).then(response => {
this.menuToCreate = response.data.data
this.formType = 'update'
})
handleEditMenu(menu) {
this.menuToCreate = menu
this.formType = 'update'
},
handleDeleteMenu(id) {
menuApi.delete(id).then(response => {

View File

@ -5,6 +5,7 @@
treeDefaultExpandAll
:treeDataSimpleMode="true"
:allowClear="true"
:value="menuIdString"
@change="handleSelectionChange"
>
</a-tree-select>
@ -39,6 +40,9 @@ export default {
pId: menu.parentId
}
})
},
menuIdString() {
return this.menuId.toString()
}
},
methods: {