Browse Source

Fix the problem that the character menu occasionally fails to bind

zhangwenjian 5 years ago
parent
commit
b2fde0cc8d
1 changed files with 3 additions and 1 deletions
  1. 3 1
      src/views/role/index.vue

+ 3 - 1
src/views/role/index.vue

@@ -372,7 +372,9 @@ export default {
       roleMenuTreeselect(roleId).then(response => {
         this.menuOptions = response.menus
         if (response.checkedKeys.length > 0) {
-          this.$refs.menu.setCheckedKeys(response.checkedKeys)
+          this.$nextTick(function() {
+            this.$refs.menu.setCheckedKeys(response.checkedKeys)
+          })
         }
       })
     },