|
@@ -1,29 +1,35 @@
|
|
|
<template>
|
|
<template>
|
|
|
<div :class="classObj" class="app-wrapper" :style="{ '--current-color': theme }">
|
|
<div :class="classObj" class="app-wrapper" :style="{ '--current-color': theme }">
|
|
|
- <div v-if="device === 'mobile' && sidebar.opened" class="drawer-bg" @click="handleClickOutside"/>
|
|
|
|
|
|
|
+ <div v-if="device === 'mobile' && sidebar.opened" class="drawer-bg" @click="handleClickOutside" />
|
|
|
<!-- <sidebar v-if="!sidebar.hide" class="sidebar-container" />-->
|
|
<!-- <sidebar v-if="!sidebar.hide" class="sidebar-container" />-->
|
|
|
<!-- <div class="z-24 absolute w-500px bg-green top-85px left-0">-->
|
|
<!-- <div class="z-24 absolute w-500px bg-green top-85px left-0">-->
|
|
|
- <el-drawer class="w-30vw!" v-model="useAppStore().newMenuShow" :direction="'ltr'"
|
|
|
|
|
- style="background-color:rgb(255,255,255);opacity: 80%;">
|
|
|
|
|
|
|
+ <el-drawer class="w-30vw! menu-style" v-model="useAppStore().newMenuShow" :direction="'ltr'"
|
|
|
|
|
+ style="background-color:rgba(28, 121, 244,.9)">
|
|
|
<template #title>
|
|
<template #title>
|
|
|
- <div class="flex flex-justify-end">菜单</div>
|
|
|
|
|
|
|
+ <div class="flex-justify-end color-white fw-bold text-20px">菜单</div>
|
|
|
</template>
|
|
</template>
|
|
|
<template #default>
|
|
<template #default>
|
|
|
<div class="flex justify-between">
|
|
<div class="flex justify-between">
|
|
|
- <div>全局导航</div>
|
|
|
|
|
|
|
+ <div class="color-white">全局导航</div>
|
|
|
<div class="flex flex-justify-end">
|
|
<div class="flex flex-justify-end">
|
|
|
<el-input placeholder="请输入菜单名称" v-model="seachMenu" clearable>
|
|
<el-input placeholder="请输入菜单名称" v-model="seachMenu" clearable>
|
|
|
<template #append>
|
|
<template #append>
|
|
|
- <el-button @click="handleSearchMenu" :icon="Search"/>
|
|
|
|
|
|
|
+ <el-button @click="handleSearchMenu" :icon="Search" />
|
|
|
</template>
|
|
</template>
|
|
|
</el-input>
|
|
</el-input>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
- <div v-for="(item,index) in newMenuCard" :key="index">
|
|
|
|
|
- <el-divider content-position="left" class="text-24px">{{ item.meta.title }}</el-divider>
|
|
|
|
|
|
|
+
|
|
|
|
|
+ <div v-for="(item, index) in newMenuCard" :key="index">
|
|
|
|
|
+
|
|
|
|
|
+ <el-divider class="left-0 mt-20px" content-position="left" border-style="double" style="">
|
|
|
|
|
+ <div class="color-white text-16px lh-relaxed font-bold">{{ item.meta.title }}</div>
|
|
|
|
|
+ </el-divider>
|
|
|
|
|
+
|
|
|
<el-row>
|
|
<el-row>
|
|
|
- <el-col :lg="4" :md="6" :sm="8" class="text-12px" v-for="(q,w) in item?.children" :key="w">
|
|
|
|
|
- <el-button @click="toLink(q,item.path)">
|
|
|
|
|
|
|
+ <el-col :lg="4" :md="6" :sm="8" class="m-10px" v-for="(q, w) in item?.children" :key="w">
|
|
|
|
|
+ <el-button @click="toLink(q, item.path)" class="color-white text-14px"
|
|
|
|
|
+ style="background-color: rgba(83, 152, 242, 0.6);">
|
|
|
{{ q.meta.title }}
|
|
{{ q.meta.title }}
|
|
|
</el-button>
|
|
</el-button>
|
|
|
</el-col>
|
|
</el-col>
|
|
@@ -33,24 +39,24 @@
|
|
|
</el-drawer>
|
|
</el-drawer>
|
|
|
<div :class="{ hasTagsView: needTagsView, sidebarHide: sidebar.hide }" class="main-container">
|
|
<div :class="{ hasTagsView: needTagsView, sidebarHide: sidebar.hide }" class="main-container">
|
|
|
<div :class="{ 'fixed-header': fixedHeader }">
|
|
<div :class="{ 'fixed-header': fixedHeader }">
|
|
|
- <navbar @setLayout="setLayout"/>
|
|
|
|
|
- <tags-view v-if="needTagsView"/>
|
|
|
|
|
|
|
+ <navbar @setLayout="setLayout" />
|
|
|
|
|
+ <tags-view v-if="needTagsView" />
|
|
|
</div>
|
|
</div>
|
|
|
- <app-main/>
|
|
|
|
|
- <settings ref="settingRef"/>
|
|
|
|
|
|
|
+ <app-main />
|
|
|
|
|
+ <settings ref="settingRef" />
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script setup>
|
|
<script setup>
|
|
|
-import {useWindowSize} from '@vueuse/core'
|
|
|
|
|
-import {AppMain, Navbar, Settings, TagsView} from './components'
|
|
|
|
|
|
|
+import { useWindowSize } from '@vueuse/core'
|
|
|
|
|
+import { AppMain, Navbar, Settings, TagsView } from './components'
|
|
|
|
|
|
|
|
import useAppStore from '@/store/modules/app'
|
|
import useAppStore from '@/store/modules/app'
|
|
|
import useSettingsStore from '@/store/modules/settings'
|
|
import useSettingsStore from '@/store/modules/settings'
|
|
|
import usePermissionStore from "@/store/modules/permission.js";
|
|
import usePermissionStore from "@/store/modules/permission.js";
|
|
|
-import {useRouter} from "vue-router";
|
|
|
|
|
-import {Search} from "@element-plus/icons-vue";
|
|
|
|
|
|
|
+import { useRouter } from "vue-router";
|
|
|
|
|
+import { Search } from "@element-plus/icons-vue";
|
|
|
|
|
|
|
|
const settingsStore = useSettingsStore()
|
|
const settingsStore = useSettingsStore()
|
|
|
const theme = computed(() => settingsStore.theme);
|
|
const theme = computed(() => settingsStore.theme);
|
|
@@ -102,26 +108,26 @@ const classObj = computed(() => ({
|
|
|
mobile: device.value === 'mobile'
|
|
mobile: device.value === 'mobile'
|
|
|
}))
|
|
}))
|
|
|
|
|
|
|
|
-const {width, height} = useWindowSize();
|
|
|
|
|
|
|
+const { width, height } = useWindowSize();
|
|
|
const WIDTH = 992; // refer to Bootstrap's responsive design
|
|
const WIDTH = 992; // refer to Bootstrap's responsive design
|
|
|
|
|
|
|
|
watch(() => device.value, () => {
|
|
watch(() => device.value, () => {
|
|
|
if (device.value === 'mobile' && sidebar.value.opened) {
|
|
if (device.value === 'mobile' && sidebar.value.opened) {
|
|
|
- useAppStore().closeSideBar({withoutAnimation: false})
|
|
|
|
|
|
|
+ useAppStore().closeSideBar({ withoutAnimation: false })
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
watchEffect(() => {
|
|
watchEffect(() => {
|
|
|
if (width.value - 1 < WIDTH) {
|
|
if (width.value - 1 < WIDTH) {
|
|
|
useAppStore().toggleDevice('mobile')
|
|
useAppStore().toggleDevice('mobile')
|
|
|
- useAppStore().closeSideBar({withoutAnimation: true})
|
|
|
|
|
|
|
+ useAppStore().closeSideBar({ withoutAnimation: true })
|
|
|
} else {
|
|
} else {
|
|
|
useAppStore().toggleDevice('desktop')
|
|
useAppStore().toggleDevice('desktop')
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
function handleClickOutside() {
|
|
function handleClickOutside() {
|
|
|
- useAppStore().closeSideBar({withoutAnimation: false})
|
|
|
|
|
|
|
+ useAppStore().closeSideBar({ withoutAnimation: false })
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
const settingRef = ref(null);
|
|
const settingRef = ref(null);
|
|
@@ -166,6 +172,18 @@ function setLayout() {
|
|
|
transition: width 0.28s;
|
|
transition: width 0.28s;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+:deep(.el-drawer__header) {
|
|
|
|
|
+ margin-bottom: 0;
|
|
|
|
|
+ color: white;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+:deep(.el-divider__text) {
|
|
|
|
|
+ left: 0;
|
|
|
|
|
+ background-color: rgb(28, 121, 244);
|
|
|
|
|
+ border-radius: 10px;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
.hideSidebar .fixed-header {
|
|
.hideSidebar .fixed-header {
|
|
|
width: calc(100% - 54px);
|
|
width: calc(100% - 54px);
|
|
|
}
|
|
}
|