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