diff --git a/src/views/interface/MenuList.vue b/src/views/interface/MenuList.vue index dbe31d3b..66bea945 100644 --- a/src/views/interface/MenuList.vue +++ b/src/views/interface/MenuList.vue @@ -109,7 +109,7 @@ > 编辑 { - this.menuToCreate = response.data.data - this.formType = 'update' - }) + handleEditMenu(menu) { + this.menuToCreate = menu + this.formType = 'update' }, handleDeleteMenu(id) { menuApi.delete(id).then(response => { diff --git a/src/views/interface/components/MenuSelectTree.vue b/src/views/interface/components/MenuSelectTree.vue index 6ed5cf44..e217e6a6 100644 --- a/src/views/interface/components/MenuSelectTree.vue +++ b/src/views/interface/components/MenuSelectTree.vue @@ -5,6 +5,7 @@ treeDefaultExpandAll :treeDataSimpleMode="true" :allowClear="true" + :value="menuIdString" @change="handleSelectionChange" > @@ -39,6 +40,9 @@ export default { pId: menu.parentId } }) + }, + menuIdString() { + return this.menuId.toString() } }, methods: {