Skip to content

Commit

Permalink
解决异步tree的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
BoBoooooo committed Oct 11, 2018
1 parent f1fb4aa commit 6ecfb8e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/views/system/role.vue
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
</el-input>
</el-form-item>
<el-form-item label="菜单">
<el-tree :data="menu" auto-expand-parent show-checkbox default-expand-all node-key="name" ref="tree" highlight-current
<el-tree :data="menu" auto-expand-parent show-checkbox default-expand-all node-key="id" ref="tree" highlight-current
:props="defaultProps" check-strictly>
</el-tree>
</el-form-item>
Expand Down Expand Up @@ -164,11 +164,11 @@ export default {
GetRoleDetail(id).then(response => {
this.dialogStatus = "update"
this.temp = response.data.Role
this.dialogFormVisible = true
console.log(response.data.MenuList)
this.$nextTick(() => {
this.$refs.tree.setCheckedKeys(response.data.MenuList)
})
this.dialogFormVisible = true
})
Expand Down

0 comments on commit 6ecfb8e

Please sign in to comment.