|
@@ -1,39 +1,57 @@
|
|
|
<template>
|
|
<template>
|
|
|
<div class="navbar">
|
|
<div class="navbar">
|
|
|
-<!-- <hamburger id="hamburger-container" :is-active="appStore.sidebar.opened" class="hamburger-container" @toggleClick="toggleSideBar" />-->
|
|
|
|
|
- <hamburger id="hamburger-container" :is-active="appStore.newMenuShow" class="hamburger-container" @click="appStore.toggleNewMune" />
|
|
|
|
|
- <breadcrumb id="breadcrumb-container" class="breadcrumb-container" v-if="!settingsStore.topNav" />
|
|
|
|
|
- <top-nav id="topmenu-container" class="topmenu-container" v-if="settingsStore.topNav" />
|
|
|
|
|
|
|
+ <!-- <hamburger id="hamburger-container" :is-active="appStore.sidebar.opened" class="hamburger-container" @toggleClick="toggleSideBar" />-->
|
|
|
|
|
+ <hamburger
|
|
|
|
|
+ id="hamburger-container"
|
|
|
|
|
+ :is-active="appStore.newMenuShow"
|
|
|
|
|
+ class="hamburger-container"
|
|
|
|
|
+ @click="appStore.toggleNewMune"
|
|
|
|
|
+ />
|
|
|
|
|
+ <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="right-menu">
|
|
<div class="right-menu">
|
|
|
<template v-if="appStore.device !== 'mobile'">
|
|
<template v-if="appStore.device !== 'mobile'">
|
|
|
<header-search id="header-search" class="right-menu-item" />
|
|
<header-search id="header-search" class="right-menu-item" />
|
|
|
|
|
|
|
|
-<!-- <el-tooltip content="源码地址" effect="dark" placement="bottom">-->
|
|
|
|
|
-<!-- <ruo-yi-git id="ruoyi-git" class="right-menu-item hover-effect" />-->
|
|
|
|
|
-<!-- </el-tooltip>-->
|
|
|
|
|
|
|
+ <!-- <el-tooltip content="源码地址" effect="dark" placement="bottom">-->
|
|
|
|
|
+ <!-- <ruo-yi-git id="ruoyi-git" class="right-menu-item hover-effect" />-->
|
|
|
|
|
+ <!-- </el-tooltip>-->
|
|
|
|
|
|
|
|
-<!-- <el-tooltip content="文档地址" effect="dark" placement="bottom">-->
|
|
|
|
|
-<!-- <ruo-yi-doc id="ruoyi-doc" class="right-menu-item hover-effect" />-->
|
|
|
|
|
-<!-- </el-tooltip>-->
|
|
|
|
|
|
|
+ <!-- <el-tooltip content="文档地址" effect="dark" placement="bottom">-->
|
|
|
|
|
+ <!-- <ruo-yi-doc id="ruoyi-doc" class="right-menu-item hover-effect" />-->
|
|
|
|
|
+ <!-- </el-tooltip>-->
|
|
|
|
|
|
|
|
<screenfull id="screenfull" class="right-menu-item hover-effect" />
|
|
<screenfull id="screenfull" class="right-menu-item hover-effect" />
|
|
|
|
|
|
|
|
-<!-- <el-tooltip content="主题模式" effect="dark" placement="bottom">-->
|
|
|
|
|
-<!-- <div class="right-menu-item hover-effect theme-switch-wrapper" @click="toggleTheme">-->
|
|
|
|
|
-<!-- <svg-icon v-if="settingsStore.isDark" icon-class="sunny" />-->
|
|
|
|
|
-<!-- <svg-icon v-if="!settingsStore.isDark" icon-class="moon" />-->
|
|
|
|
|
-<!-- </div>-->
|
|
|
|
|
-<!-- </el-tooltip>-->
|
|
|
|
|
|
|
+ <!-- <el-tooltip content="主题模式" effect="dark" placement="bottom">-->
|
|
|
|
|
+ <!-- <div class="right-menu-item hover-effect theme-switch-wrapper" @click="toggleTheme">-->
|
|
|
|
|
+ <!-- <svg-icon v-if="settingsStore.isDark" icon-class="sunny" />-->
|
|
|
|
|
+ <!-- <svg-icon v-if="!settingsStore.isDark" icon-class="moon" />-->
|
|
|
|
|
+ <!-- </div>-->
|
|
|
|
|
+ <!-- </el-tooltip>-->
|
|
|
|
|
|
|
|
<el-tooltip content="布局大小" effect="dark" placement="bottom">
|
|
<el-tooltip content="布局大小" effect="dark" placement="bottom">
|
|
|
<size-select id="size-select" class="right-menu-item hover-effect" />
|
|
<size-select id="size-select" class="right-menu-item hover-effect" />
|
|
|
</el-tooltip>
|
|
</el-tooltip>
|
|
|
</template>
|
|
</template>
|
|
|
<div class="avatar-container">
|
|
<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">
|
|
<div class="avatar-wrapper">
|
|
|
- <img :src="userStore.avatar" class="user-avatar" />
|
|
|
|
|
|
|
+ <!-- <img :src="userStore.avatar" class="user-avatar" /> -->
|
|
|
|
|
+ <img src="" class="user-avatar" />
|
|
|
<el-icon><caret-bottom /></el-icon>
|
|
<el-icon><caret-bottom /></el-icon>
|
|
|
</div>
|
|
</div>
|
|
|
<template #dropdown>
|
|
<template #dropdown>
|
|
@@ -56,26 +74,26 @@
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script setup>
|
|
<script setup>
|
|
|
-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 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()
|
|
|
|
|
-const showMenu = ()=>{
|
|
|
|
|
- console.log(12313122)
|
|
|
|
|
-}
|
|
|
|
|
|
|
+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 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();
|
|
|
|
|
+const showMenu = () => {
|
|
|
|
|
+ console.log(12313122);
|
|
|
|
|
+};
|
|
|
|
|
|
|
|
function toggleSideBar() {
|
|
function toggleSideBar() {
|
|
|
- appStore.toggleSideBar()
|
|
|
|
|
|
|
+ appStore.toggleSideBar();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
function handleCommand(command) {
|
|
function handleCommand(command) {
|
|
@@ -92,28 +110,30 @@ function handleCommand(command) {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
function logout() {
|
|
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() {
|
|
function setLayout() {
|
|
|
- emits('setLayout');
|
|
|
|
|
|
|
+ emits("setLayout");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
function toggleTheme() {
|
|
function toggleTheme() {
|
|
|
- settingsStore.toggleTheme()
|
|
|
|
|
|
|
+ settingsStore.toggleTheme();
|
|
|
}
|
|
}
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
-<style lang='scss' scoped>
|
|
|
|
|
|
|
+<style lang="scss" scoped>
|
|
|
.navbar {
|
|
.navbar {
|
|
|
height: 50px;
|
|
height: 50px;
|
|
|
overflow: hidden;
|
|
overflow: hidden;
|
|
@@ -181,7 +201,7 @@ function toggleTheme() {
|
|
|
|
|
|
|
|
svg {
|
|
svg {
|
|
|
transition: transform 0.3s;
|
|
transition: transform 0.3s;
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
&:hover {
|
|
&:hover {
|
|
|
transform: scale(1.15);
|
|
transform: scale(1.15);
|
|
|
}
|
|
}
|