release: update 3.9.3

This commit is contained in:
xiaoxian521
2022-12-04 18:00:16 +08:00
parent c6e25d6933
commit 132fbbade3
16 changed files with 82 additions and 41 deletions

View File

@@ -0,0 +1,14 @@
import { addIcon } from "@iconify/vue/dist/offline";
/**
* 这里存放本地图标,在 src/layout/index.vue 文件中加载,避免在首启动加载
*/
// 本地菜单图标后端在路由的icon中返回对应的图标字符串并且前端在此处使用addIcon添加即可渲染菜单图标
import HomeFilled from "@iconify-icons/ep/home-filled";
import InformationLine from "@iconify-icons/ri/information-line";
import Lollipop from "@iconify-icons/ep/lollipop";
addIcon("homeFilled", HomeFilled);
addIcon("informationLine", InformationLine);
addIcon("lollipop", Lollipop);

View File

@@ -1,4 +1,13 @@
<script setup lang="ts">
import {
ref,
unref,
watch,
reactive,
computed,
nextTick,
onBeforeMount
} from "vue";
import {
useDark,
debounce,
@@ -17,7 +26,6 @@ import { useNav } from "@/layout/hooks/useNav";
import { useAppStoreHook } from "@/store/modules/app";
import { toggleTheme } from "@pureadmin/theme/dist/browser-utils";
import { useMultiTagsStoreHook } from "@/store/modules/multiTags";
import { ref, unref, watch, reactive, computed, nextTick } from "vue";
import { useDataThemeChange } from "@/layout/hooks/useDataThemeChange";
import dayIcon from "@/assets/svg/day.svg?component";
@@ -189,16 +197,6 @@ function setLayoutModel(layout: string) {
useAppStoreHook().setLayout(layout);
}
/* 初始化项目配置 */
nextTick(() => {
settings.greyVal &&
document.querySelector("html")?.setAttribute("class", "html-grey");
settings.weakVal &&
document.querySelector("html")?.setAttribute("class", "html-weakness");
settings.tabsVal && tagsChange();
dataThemeChange();
});
watch($storage, ({ layout }) => {
switch (layout["layout"]) {
case "vertical":
@@ -218,6 +216,18 @@ watch($storage, ({ layout }) => {
break;
}
});
onBeforeMount(() => {
dataThemeChange();
/* 初始化项目配置 */
nextTick(() => {
settings.greyVal &&
document.querySelector("html")?.setAttribute("class", "html-grey");
settings.weakVal &&
document.querySelector("html")?.setAttribute("class", "html-weakness");
settings.tabsVal && tagsChange();
});
});
</script>
<template>

View File

@@ -35,7 +35,10 @@ watch(
</script>
<template>
<div class="horizontal-header">
<div
v-loading="usePermissionStoreHook().wholeMenus.length === 0"
class="horizontal-header"
>
<div class="horizontal-header-left" @click="backHome">
<FontIcon icon="team-iconlogo" svg style="width: 35px; height: 35px" />
<h4>{{ title }}</h4>
@@ -93,6 +96,9 @@ watch(
</template>
<style lang="scss" scoped>
:deep(.el-loading-mask) {
opacity: 0.45;
}
.logout {
max-width: 120px;

View File

@@ -51,7 +51,11 @@ watch(
</script>
<template>
<div v-if="device !== 'mobile'" class="horizontal-header">
<div
v-if="device !== 'mobile'"
class="horizontal-header"
v-loading="usePermissionStoreHook().wholeMenus.length === 0"
>
<el-menu
router
ref="menuRef"
@@ -124,6 +128,9 @@ watch(
</template>
<style lang="scss" scoped>
:deep(.el-loading-mask) {
opacity: 0.45;
}
.logout {
max-width: 120px;

View File

@@ -202,7 +202,7 @@ function resolvePath(routePath) {
placement="top"
:effect="tooltipEffect"
:offset="-10"
:disabled="!isCollapse && !onlyOneChild.showTooltip"
:disabled="!onlyOneChild.showTooltip"
>
<template #content>
{{ onlyOneChild.meta.title }}

View File

@@ -59,7 +59,10 @@ watch(
</script>
<template>
<div :class="['sidebar-container', showLogo ? 'has-logo' : '']">
<div
v-loading="menuData.length === 0"
:class="['sidebar-container', showLogo ? 'has-logo' : '']"
>
<Logo v-if="showLogo" :collapse="isCollapse" />
<el-scrollbar
wrap-class="scrollbar-wrapper"
@@ -91,3 +94,9 @@ watch(
/>
</div>
</template>
<style scoped>
:deep(.el-loading-mask) {
opacity: 0.45;
}
</style>

View File

@@ -1,5 +1,7 @@
<script setup lang="ts">
import "animate.css";
// 引入 src/components/ReIcon/src/offlineIcon.ts 文件中所有使用addIcon添加过的本地图标
import "@/components/ReIcon/src/offlineIcon";
// vxe-table的所有icon不支持component模式间接依赖了font-awesome
// import "font-awesome/css/font-awesome.min.css";
import { setType } from "./types";

View File

@@ -1,5 +1,4 @@
import type { IconifyIcon } from "@iconify/vue";
import HomeFilled from "@iconify-icons/ep/home-filled";
export const routerArrays: Array<RouteConfigs> = [
{
@@ -7,7 +6,7 @@ export const routerArrays: Array<RouteConfigs> = [
parentPath: "/",
meta: {
title: "首页",
icon: HomeFilled
icon: "homeFilled"
}
}
];

View File

@@ -1,10 +1,8 @@
import InformationLine from "@iconify-icons/ri/information-line";
export default {
path: "/error",
redirect: "/error/403",
meta: {
icon: InformationLine,
icon: "informationLine",
title: "异常页面",
rank: 9
},

View File

@@ -1,5 +1,4 @@
const Layout = () => import("@/layout/index.vue");
import HomeFilled from "@iconify-icons/ep/home-filled";
export default {
path: "/",
@@ -7,7 +6,7 @@ export default {
component: Layout,
redirect: "/welcome",
meta: {
icon: HomeFilled,
icon: "homeFilled",
title: "首页",
rank: 0
},

View File

@@ -1,5 +1,4 @@
const Layout = () => import("@/layout/index.vue");
import HomeFilled from "@iconify-icons/ep/home-filled";
export default [
{
@@ -16,7 +15,7 @@ export default [
path: "/redirect",
component: Layout,
meta: {
icon: HomeFilled,
icon: "homeFilled",
title: "首页",
showLink: false,
rank: 104

View File

@@ -198,7 +198,7 @@ function initRouter() {
} else {
return new Promise(resolve => {
getAsyncRoutes().then(({ data }) => {
handleAsyncRoutes(data);
handleAsyncRoutes(cloneDeep(data));
storageSession.setItem(key, data);
resolve(router);
});
@@ -207,7 +207,7 @@ function initRouter() {
} else {
return new Promise(resolve => {
getAsyncRoutes().then(({ data }) => {
handleAsyncRoutes(data);
handleAsyncRoutes(cloneDeep(data));
resolve(router);
});
});