|
@@ -3,6 +3,7 @@ import { useMenuStore } from '@/stores/menu'
|
|
|
import { useUserStore } from '@/stores/user'
|
|
import { useUserStore } from '@/stores/user'
|
|
|
import config from '@/config/defaultSetting'
|
|
import config from '@/config/defaultSetting'
|
|
|
import avatar from '@/assets/images/avatar.png'
|
|
import avatar from '@/assets/images/avatar.png'
|
|
|
|
|
+import type { RouteRecordRaw } from 'vue-router'
|
|
|
|
|
|
|
|
const iconSize = ref('22')
|
|
const iconSize = ref('22')
|
|
|
|
|
|
|
@@ -14,6 +15,10 @@ const handleToggle = () => {
|
|
|
menuStore.setCollapse(value.value)
|
|
menuStore.setCollapse(value.value)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+// 面包屑
|
|
|
|
|
+const route = useRoute()
|
|
|
|
|
+const matched = computed(() => route.matched)
|
|
|
|
|
+
|
|
|
// 全屏切换
|
|
// 全屏切换
|
|
|
const { toggle: toggleScreen, isFullscreen } = useFullscreen()
|
|
const { toggle: toggleScreen, isFullscreen } = useFullscreen()
|
|
|
|
|
|
|
@@ -32,7 +37,7 @@ const logout = () => {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// 主题设置
|
|
// 主题设置
|
|
|
-const visible = ref(false)
|
|
|
|
|
|
|
+const settingVisible = ref(false)
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
<template>
|
|
<template>
|
|
@@ -47,13 +52,18 @@ const visible = ref(false)
|
|
|
<icon-menu-unfold-one :size="iconSize" v-if="!value" />
|
|
<icon-menu-unfold-one :size="iconSize" v-if="!value" />
|
|
|
<icon-menu-fold-one :size="iconSize" v-else />
|
|
<icon-menu-fold-one :size="iconSize" v-else />
|
|
|
</el-button>
|
|
</el-button>
|
|
|
|
|
+ <el-breadcrumb class="breadcrumb">
|
|
|
|
|
+ <el-breadcrumb-item v-for="item in matched.slice(1, matched.length)" :key="item.path">
|
|
|
|
|
+ {{ item.meta.title }}
|
|
|
|
|
+ </el-breadcrumb-item>
|
|
|
|
|
+ </el-breadcrumb>
|
|
|
</el-space>
|
|
</el-space>
|
|
|
<div class="flex items-center">
|
|
<div class="flex items-center">
|
|
|
<el-button link @click="toggleScreen">
|
|
<el-button link @click="toggleScreen">
|
|
|
<icon-off-screen :size="iconSize" v-if="isFullscreen" />
|
|
<icon-off-screen :size="iconSize" v-if="isFullscreen" />
|
|
|
<icon-full-screen :size="iconSize" v-else />
|
|
<icon-full-screen :size="iconSize" v-else />
|
|
|
</el-button>
|
|
</el-button>
|
|
|
- <el-button link class="mr-4" @click="visible = true">
|
|
|
|
|
|
|
+ <el-button link class="mr-4" @click="settingVisible = true">
|
|
|
<icon-setting-two :size="iconSize" />
|
|
<icon-setting-two :size="iconSize" />
|
|
|
</el-button>
|
|
</el-button>
|
|
|
<el-avatar class="mr-10px" :src="user.photo">
|
|
<el-avatar class="mr-10px" :src="user.photo">
|
|
@@ -63,7 +73,7 @@ const visible = ref(false)
|
|
|
<span class="el-dropdown-link">
|
|
<span class="el-dropdown-link">
|
|
|
{{ user.name }}
|
|
{{ user.name }}
|
|
|
<el-icon class="el-icon--right">
|
|
<el-icon class="el-icon--right">
|
|
|
- <i-ep-arrow-down />
|
|
|
|
|
|
|
+ <arrow-down />
|
|
|
</el-icon>
|
|
</el-icon>
|
|
|
</span>
|
|
</span>
|
|
|
<template #dropdown>
|
|
<template #dropdown>
|
|
@@ -82,7 +92,7 @@ const visible = ref(false)
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
- <GlobalSetting v-model="visible"></GlobalSetting>
|
|
|
|
|
|
|
+ <GlobalSetting v-model="settingVisible"></GlobalSetting>
|
|
|
</header>
|
|
</header>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|