Commit 92db5481 by 姜雷

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

parent 3bced908
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<span>欢迎您,{{ userInfo.name }}</span> <span>欢迎您,{{ userInfo.name }}</span>
<span <span
class="avatar-name-icon" class="avatar-name-icon"
@click="toggleUserMenus" @click.stop="toggleUserMenus"
> >
<img src="@/assets/images/layout/icon_xiala@2x.png" /> <img src="@/assets/images/layout/icon_xiala@2x.png" />
<div <div
...@@ -359,6 +359,13 @@ export default { ...@@ -359,6 +359,13 @@ export default {
...mapActions(['updatePassword', 'updateUserinfo', 'updateUserCellphone']), ...mapActions(['updatePassword', 'updateUserinfo', 'updateUserCellphone']),
toggleUserMenus() { toggleUserMenus() {
this.userMenusVisble = !this.userMenusVisble; this.userMenusVisble = !this.userMenusVisble;
setTimeout(() => {
if (this.userMenusVisble) {
document.addEventListener('click', this.toggleUserMenus);
} else {
document.removeEventListener('click', this.toggleUserMenus);
}
}, 400);
}, },
cancelPwdUpdate(done) { cancelPwdUpdate(done) {
this.resetPwdForm(); this.resetPwdForm();
......
import System from '../lib/main'; import System from '../lib/main';
window.manageShell = { default: System }; window.manageShell = { default: System };
console.log('manageShell');
setTimeout(() => { setTimeout(() => {
let allAasyncRouterMap = [ 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