From 373c6cc04082b9714a7a419a23fa2ca36448da94 Mon Sep 17 00:00:00 2001 From: ruibaby Date: Sat, 4 May 2019 22:01:35 +0800 Subject: [PATCH] Fixed menu edit error. --- src/views/interface/MenuList.vue | 10 ++++------ src/views/interface/components/MenuSelectTree.vue | 4 ++++ 2 files changed, 8 insertions(+), 6 deletions(-) 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: {