|
|
|
@ -1,13 +1,21 @@
|
|
|
|
|
<template>
|
|
|
|
|
<div class="navbar">
|
|
|
|
|
<hamburger id="hamburger-container" :is-active="appStore.sidebar.opened" class="hamburger-container" @toggleClick="toggleSideBar" />
|
|
|
|
|
<breadcrumb id="breadcrumb-container" class="breadcrumb-container" v-if="!settingsStore.topNav" />
|
|
|
|
|
<!-- <breadcrumb id="breadcrumb-container" class="breadcrumb-container" v-if="!settingsStore.topNav" /> -->
|
|
|
|
|
<top-nav id="topmenu-container" class="topmenu-container" v-if="settingsStore.topNav" />
|
|
|
|
|
|
|
|
|
|
<div class="navbar-name">
|
|
|
|
|
<img src="../../assets/images/toplgoo.png" alt="" />
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="right-menu">
|
|
|
|
|
|
|
|
|
|
<div class="avatar-container">
|
|
|
|
|
<el-dropdown @command="handleCommand" 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="userStore.avatar" class="user-avatar" />
|
|
|
|
|
<el-icon><caret-bottom /></el-icon>
|
|
|
|
@ -32,20 +40,25 @@
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script setup>
|
|
|
|
|
import { ElMessageBox } from 'element-plus'
|
|
|
|
|
import Breadcrumb from '@/components/Breadcrumb'
|
|
|
|
|
import TopNav from '@/components/TopNav'
|
|
|
|
|
import Hamburger from '@/components/Hamburger'
|
|
|
|
|
import useAppStore from '@/store/modules/app'
|
|
|
|
|
import useUserStore from '@/store/modules/user'
|
|
|
|
|
import useSettingsStore from '@/store/modules/settings'
|
|
|
|
|
|
|
|
|
|
const appStore = useAppStore()
|
|
|
|
|
const userStore = useUserStore()
|
|
|
|
|
const settingsStore = useSettingsStore()
|
|
|
|
|
import { ElMessageBox } from "element-plus";
|
|
|
|
|
import Breadcrumb from "@/components/Breadcrumb";
|
|
|
|
|
import TopNav from "@/components/TopNav";
|
|
|
|
|
import Hamburger from "@/components/Hamburger";
|
|
|
|
|
import Screenfull from "@/components/Screenfull";
|
|
|
|
|
import SizeSelect from "@/components/SizeSelect";
|
|
|
|
|
import HeaderSearch from "@/components/HeaderSearch";
|
|
|
|
|
import RuoYiGit from "@/components/RuoYi/Git";
|
|
|
|
|
import RuoYiDoc from "@/components/RuoYi/Doc";
|
|
|
|
|
import useAppStore from "@/store/modules/app";
|
|
|
|
|
import useUserStore from "@/store/modules/user";
|
|
|
|
|
import useSettingsStore from "@/store/modules/settings";
|
|
|
|
|
|
|
|
|
|
const appStore = useAppStore();
|
|
|
|
|
const userStore = useUserStore();
|
|
|
|
|
const settingsStore = useSettingsStore();
|
|
|
|
|
|
|
|
|
|
function toggleSideBar() {
|
|
|
|
|
appStore.toggleSideBar()
|
|
|
|
|
appStore.toggleSideBar();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function handleCommand(command) {
|
|
|
|
@ -62,24 +75,26 @@ function handleCommand(command) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function logout() {
|
|
|
|
|
ElMessageBox.confirm('确定注销并退出系统吗?', '提示', {
|
|
|
|
|
confirmButtonText: '确定',
|
|
|
|
|
cancelButtonText: '取消',
|
|
|
|
|
type: 'warning'
|
|
|
|
|
}).then(() => {
|
|
|
|
|
userStore.logOut().then(() => {
|
|
|
|
|
location.href = '/index';
|
|
|
|
|
ElMessageBox.confirm("确定注销并退出系统吗?", "提示", {
|
|
|
|
|
confirmButtonText: "确定",
|
|
|
|
|
cancelButtonText: "取消",
|
|
|
|
|
type: "warning",
|
|
|
|
|
})
|
|
|
|
|
.then(() => {
|
|
|
|
|
userStore.logOut().then(() => {
|
|
|
|
|
location.href = "/index";
|
|
|
|
|
});
|
|
|
|
|
})
|
|
|
|
|
}).catch(() => { });
|
|
|
|
|
.catch(() => {});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const emits = defineEmits(['setLayout'])
|
|
|
|
|
const emits = defineEmits(["setLayout"]);
|
|
|
|
|
function setLayout() {
|
|
|
|
|
emits('setLayout');
|
|
|
|
|
emits("setLayout");
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style lang='scss' scoped>
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
|
.navbar {
|
|
|
|
|
height: 50px;
|
|
|
|
|
overflow: hidden;
|
|
|
|
@ -91,6 +106,11 @@ function setLayout() {
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 50px;
|
|
|
|
|
z-index: 1000;
|
|
|
|
|
.navbar-name {
|
|
|
|
|
display: inline-block;
|
|
|
|
|
line-height: 60px;
|
|
|
|
|
padding-left: 42px;
|
|
|
|
|
}
|
|
|
|
|
.hamburger-container {
|
|
|
|
|
line-height: 46px;
|
|
|
|
|
height: 100%;
|
|
|
|
|