perf: 同步完整版代码
This commit is contained in:
@@ -428,7 +428,7 @@ function onClickDrop(key, item, selectRoute?: RouteConfigs) {
|
||||
});
|
||||
}
|
||||
|
||||
function handleCommand(command: object) {
|
||||
function handleCommand(command: any) {
|
||||
const { key, item } = command;
|
||||
onClickDrop(key, item);
|
||||
}
|
||||
|
@@ -1,12 +1,12 @@
|
||||
import { computed } from "vue";
|
||||
import { router } from "/@/router";
|
||||
import { getConfig } from "/@/config";
|
||||
import { emitter } from "/@/utils/mitt";
|
||||
import { routeMetaType } from "../types";
|
||||
import { transformI18n } from "/@/plugins/i18n";
|
||||
import { storageSession } from "/@/utils/storage";
|
||||
import { useAppStoreHook } from "/@/store/modules/app";
|
||||
import { remainingPaths } from "/@/router/modules/index";
|
||||
import { Title } from "../../../public/serverConfig.json";
|
||||
import { useEpThemeStoreHook } from "/@/store/modules/epTheme";
|
||||
|
||||
export function useNav() {
|
||||
@@ -30,6 +30,7 @@ export function useNav() {
|
||||
|
||||
// 动态title
|
||||
function changeTitle(meta: routeMetaType) {
|
||||
const Title = getConfig().Title;
|
||||
if (Title)
|
||||
document.title = `${transformI18n(meta.title, meta.i18n)} | ${Title}`;
|
||||
else document.title = transformI18n(meta.title, meta.i18n);
|
||||
|
@@ -1,8 +1,8 @@
|
||||
/* 动态改变element-plus主题色 */
|
||||
import rgbHex from "rgb-hex";
|
||||
import { convert } from "css-color-function";
|
||||
import epCss from "./element.scss";
|
||||
import { TinyColor } from "@ctrl/tinycolor";
|
||||
import epCss from "element-plus/dist/index.css";
|
||||
import { convert } from "css-color-function";
|
||||
|
||||
// 色值表
|
||||
const formula = {
|
||||
|
2
src/layout/theme/element.scss
Normal file
2
src/layout/theme/element.scss
Normal file
@@ -0,0 +1,2 @@
|
||||
/* 通过scss模块本地导入element-plus的全局样式文件,解决vite2.7.13版本后使用 import epCss from "element-plus/dist/index.css",打包后加载不到样式的问题 */
|
||||
@import "element-plus/dist/index.css";
|
@@ -1,4 +1,5 @@
|
||||
import { isUrl } from "/@/utils/is";
|
||||
import { getConfig } from "/@/config";
|
||||
import { toRouteType } from "./types";
|
||||
import { openLink } from "/@/utils/link";
|
||||
import NProgress from "/@/utils/progress";
|
||||
@@ -7,7 +8,6 @@ import { findIndex } from "lodash-unified";
|
||||
import { transformI18n } from "/@/plugins/i18n";
|
||||
import remainingRouter from "./modules/remaining";
|
||||
import { storageSession } from "/@/utils/storage";
|
||||
import { Title } from "../../public/serverConfig.json";
|
||||
import { useMultiTagsStoreHook } from "/@/store/modules/multiTags";
|
||||
import { usePermissionStoreHook } from "/@/store/modules/permission";
|
||||
import { Router, RouteMeta, createRouter, RouteRecordName } from "vue-router";
|
||||
@@ -57,6 +57,7 @@ router.beforeEach((to: toRouteType, _from, next) => {
|
||||
if (!externalLink)
|
||||
to.matched.some(item => {
|
||||
if (!item.meta.title) return "";
|
||||
const Title = getConfig().Title;
|
||||
if (Title)
|
||||
document.title = `${transformI18n(
|
||||
item.meta.title,
|
||||
|
Reference in New Issue
Block a user