This commit is contained in:
parent
4a4ff0df10
commit
11602ba2ec
|
@ -61,7 +61,7 @@
|
||||||
<template #dropdown>
|
<template #dropdown>
|
||||||
<el-dropdown-menu>
|
<el-dropdown-menu>
|
||||||
<el-dropdown-item icon="Avatar">个人中心</el-dropdown-item>
|
<el-dropdown-item icon="Avatar">个人中心</el-dropdown-item>
|
||||||
<el-dropdown-item icon="SwitchButton">退出</el-dropdown-item>
|
<el-dropdown-item icon="SwitchButton" @click="handleUserMenu('logout')">退出</el-dropdown-item>
|
||||||
</el-dropdown-menu>
|
</el-dropdown-menu>
|
||||||
</template>
|
</template>
|
||||||
</el-dropdown>
|
</el-dropdown>
|
||||||
|
@ -122,7 +122,7 @@
|
||||||
<template #dropdown>
|
<template #dropdown>
|
||||||
<el-dropdown-menu>
|
<el-dropdown-menu>
|
||||||
<el-dropdown-item icon="Avatar">个人中心</el-dropdown-item>
|
<el-dropdown-item icon="Avatar">个人中心</el-dropdown-item>
|
||||||
<el-dropdown-item icon="Avatar" @click="handleUserMenu"
|
<el-dropdown-item icon="Avatar" command="logout" @click="handleUserMenu('logout')"
|
||||||
>退出</el-dropdown-item
|
>退出</el-dropdown-item
|
||||||
>
|
>
|
||||||
</el-dropdown-menu>
|
</el-dropdown-menu>
|
||||||
|
@ -155,7 +155,7 @@ import menuItem from "./components/menu/menu-item.vue";
|
||||||
import breadcrumb from "./components/breadcrumb/index.vue";
|
import breadcrumb from "./components/breadcrumb/index.vue";
|
||||||
|
|
||||||
const user = tools.data.get("user");
|
const user = tools.data.get("user");
|
||||||
|
const router = useRouter()
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
|
|
||||||
let store = useCar();
|
let store = useCar();
|
||||||
|
@ -195,6 +195,7 @@ emitter.on("closeModifyPassword", (e) => {
|
||||||
});
|
});
|
||||||
|
|
||||||
const handleUserMenu = (command) => {
|
const handleUserMenu = (command) => {
|
||||||
|
console.log('command',);
|
||||||
if ("modifyPassword" == command) {
|
if ("modifyPassword" == command) {
|
||||||
data.dialog.visibled = true;
|
data.dialog.visibled = true;
|
||||||
} else if ("logout" == command) {
|
} else if ("logout" == command) {
|
||||||
|
@ -204,7 +205,7 @@ const handleUserMenu = (command) => {
|
||||||
type: "warning",
|
type: "warning",
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
tools.data.clear();
|
tools.data.clear();
|
||||||
Router.push("/login");
|
router.push("/login");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue