perf: 同步完整版代码

This commit is contained in:
xiaoxian521
2022-04-08 12:05:46 +08:00
parent bc8a0f3b35
commit 2bac78478c
10 changed files with 59 additions and 29 deletions

View File

@@ -54,7 +54,7 @@ emitter.on("openPanel", () => {
.right-panel {
width: 100%;
max-width: 300px;
max-width: 315px;
height: 100vh;
position: fixed;
top: 0;
@@ -105,8 +105,8 @@ emitter.on("openPanel", () => {
.right-panel-items {
margin-top: 60px;
height: 100vh;
overflow: auto;
height: calc(100vh - 60px);
overflow-y: auto;
}
.project-configuration {

View File

@@ -266,6 +266,7 @@ function setLayoutThemeColor(theme: string) {
// 设置ep主题色
const setEpThemeColor = (color: string) => {
// @ts-expect-error
writeNewStyle(createNewStyle(color));
useEpThemeStoreHook().setEpThemeColor(color);
body.style.setProperty("--el-color-primary-active", shadeBgColor(color));
@@ -298,7 +299,7 @@ nextTick(() => {
settings.weakVal &&
document.querySelector("html")?.setAttribute("class", "html-weakness");
settings.tabsVal && tagsChange();
// @ts-expect-error
writeNewStyle(createNewStyle(epThemeColor.value));
dataThemeChange();
});

View File

@@ -46,13 +46,6 @@ watch(
}
);
watch(
() => route.path,
() => {
menuSelect(route.path, routers);
}
);
function translationCh() {
instance.locale = { locale: "zh" };
locale.value = "zh";

View File

@@ -51,7 +51,6 @@ watch(
() => route.path,
() => {
getSubMenuData(route.path);
menuSelect(route.path, routers);
}
);
</script>

View File

@@ -7,6 +7,7 @@ import { remainingPaths } from "/@/router";
import { transformI18n } from "/@/plugins/i18n";
import { storageSession } from "/@/utils/storage";
import { useAppStoreHook } from "/@/store/modules/app";
import { useUserStoreHook } from "/@/store/modules/user";
import { useEpThemeStoreHook } from "/@/store/modules/epTheme";
export function useNav() {
@@ -38,8 +39,7 @@ export function useNav() {
// 退出登录
function logout() {
storageSession.removeItem("info");
router.push("/login");
useUserStoreHook().logOut();
}
function backHome() {