mirror of https://github.com/halo-dev/halo-admin
Fixed menu edit error.
parent
51134726b9
commit
373c6cc040
|
@ -109,7 +109,7 @@
|
||||||
>
|
>
|
||||||
<a
|
<a
|
||||||
href="javascript:;"
|
href="javascript:;"
|
||||||
@click="handleEditMenu(record.id)"
|
@click="handleEditMenu(record)"
|
||||||
>编辑</a>
|
>编辑</a>
|
||||||
<a-divider type="vertical" />
|
<a-divider type="vertical" />
|
||||||
<a-popconfirm
|
<a-popconfirm
|
||||||
|
@ -189,11 +189,9 @@ export default {
|
||||||
this.formType = 'create'
|
this.formType = 'create'
|
||||||
this.menuToCreate = {}
|
this.menuToCreate = {}
|
||||||
},
|
},
|
||||||
handleEditMenu(id) {
|
handleEditMenu(menu) {
|
||||||
menuApi.get(id).then(response => {
|
this.menuToCreate = menu
|
||||||
this.menuToCreate = response.data.data
|
|
||||||
this.formType = 'update'
|
this.formType = 'update'
|
||||||
})
|
|
||||||
},
|
},
|
||||||
handleDeleteMenu(id) {
|
handleDeleteMenu(id) {
|
||||||
menuApi.delete(id).then(response => {
|
menuApi.delete(id).then(response => {
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
treeDefaultExpandAll
|
treeDefaultExpandAll
|
||||||
:treeDataSimpleMode="true"
|
:treeDataSimpleMode="true"
|
||||||
:allowClear="true"
|
:allowClear="true"
|
||||||
|
:value="menuIdString"
|
||||||
@change="handleSelectionChange"
|
@change="handleSelectionChange"
|
||||||
>
|
>
|
||||||
</a-tree-select>
|
</a-tree-select>
|
||||||
|
@ -39,6 +40,9 @@ export default {
|
||||||
pId: menu.parentId
|
pId: menu.parentId
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
},
|
||||||
|
menuIdString() {
|
||||||
|
return this.menuId.toString()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
Loading…
Reference in New Issue