Commit 92db5481 by 姜雷

修改用户菜单出现后点击其他区域也会消失

parent 3bced908
......@@ -5,7 +5,7 @@
<span>欢迎您,{{ userInfo.name }}</span>
<span
class="avatar-name-icon"
@click="toggleUserMenus"
@click.stop="toggleUserMenus"
>
<img src="@/assets/images/layout/icon_xiala@2x.png" />
<div
......@@ -359,6 +359,13 @@ export default {
...mapActions(['updatePassword', 'updateUserinfo', 'updateUserCellphone']),
toggleUserMenus() {
this.userMenusVisble = !this.userMenusVisble;
setTimeout(() => {
if (this.userMenusVisble) {
document.addEventListener('click', this.toggleUserMenus);
} else {
document.removeEventListener('click', this.toggleUserMenus);
}
}, 400);
},
cancelPwdUpdate(done) {
this.resetPwdForm();
......
import System from '../lib/main';
window.manageShell = { default: System };
console.log('manageShell');
setTimeout(() => {
let allAasyncRouterMap = [
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment