| | |
| | | </el-tooltip>
|
| | | </template>
|
| | | <div class="avatar-container">
|
| | | <el-dropdown class="right-menu-item hover-effect" trigger="click">
|
| | | <el-dropdown @command="handleCommand" class="right-menu-item hover-effect" trigger="click">
|
| | | <div class="avatar-wrapper">
|
| | | <img :src="getters.avatar" class="user-avatar" />
|
| | | <el-icon><caret-bottom /></el-icon>
|
| | |
| | | <router-link to="/user/profile">
|
| | | <el-dropdown-item>个人中心</el-dropdown-item>
|
| | | </router-link>
|
| | | <el-dropdown-item @click="setLayout">
|
| | | <el-dropdown-item command="setLayout">
|
| | | <span>布局设置</span>
|
| | | </el-dropdown-item>
|
| | | <el-dropdown-item divided @click="logout">
|
| | | <el-dropdown-item divided command="logout">
|
| | | <span>退出登录</span>
|
| | | </el-dropdown-item>
|
| | | </el-dropdown-menu>
|
| | |
| | | import RuoYiDoc from '@/components/RuoYi/Doc'
|
| | |
|
| | | const store = useStore();
|
| | | const router = useRouter();
|
| | | const getters = computed(() => store.getters);
|
| | |
|
| | | function toggleSideBar() {
|
| | | store.dispatch('app/toggleSideBar')
|
| | | }
|
| | |
|
| | | function handleCommand(command) {
|
| | | switch (command) {
|
| | | case "setLayout":
|
| | | setLayout();
|
| | | break;
|
| | | case "logout":
|
| | | logout();
|
| | | break;
|
| | | default:
|
| | | break;
|
| | | }
|
| | | }
|
| | |
|
| | | function logout() {
|
| | | ElMessageBox.confirm('确定注销并退出系统吗?', '提示', {
|
| | | confirmButtonText: '确定',
|