diff --git a/src/views/login.vue b/src/views/login.vue index 837b5b5..8a40cf1 100644 --- a/src/views/login.vue +++ b/src/views/login.vue @@ -150,7 +150,7 @@ export default { title: '提示', message: '当前登录状态已过期,请重新登录!', type: 'warning', - duration: 8000 + duration: 5000 }) Cookies.remove('point') } diff --git a/src/views/system/role/index.vue b/src/views/system/role/index.vue index cbb2434..e8803af 100644 --- a/src/views/system/role/index.vue +++ b/src/views/system/role/index.vue @@ -235,12 +235,13 @@ export default { // 触发单选 handleCurrentChange(val) { if (val) { + // 先将保存按钮置灰 + this.showButton = false const _this = this // 清空菜单的选中 this.$refs.menu.setCheckedKeys([]) // 保存当前的角色id this.currentId = val.id - this.showButton = this.level <= val.level // 初始化 this.menuIds = [] // 菜单数据需要特殊处理 @@ -249,6 +250,8 @@ export default { }) getMenuSuperior(this.menuIds).then(res => { this.menus = res + // 待所有菜单加载完再允许点击保存按钮 + this.showButton = this.level <= val.level }) } },