+
{{ $t("settings.watermark") }}
@@ -73,25 +73,19 @@ const settingsVisible = computed({
},
});
-/**
- * 切换主题颜色
- */
+/** 切换主题颜色 */
function changeThemeColor(color: string) {
settingsStore.changeThemeColor(color);
}
-/**
- * 切换主题
- */
+/** 切换主题 */
const isDark = ref
(settingsStore.theme === ThemeEnum.DARK);
const changeTheme = (val: any) => {
isDark.value = val;
settingsStore.changeTheme(isDark.value ? ThemeEnum.DARK : ThemeEnum.LIGHT);
};
-/**
- * 切换布局
- */
+/** 切换布局 */
function changeLayout(layout: string) {
settingsStore.changeLayout(layout);
if (layout === LayoutEnum.MIX) {
@@ -99,6 +93,7 @@ function changeLayout(layout: string) {
}
}
+/** 重新激活顶部菜单 */
function againActiveTop(newVal: string) {
const parent = findOutermostParent(permissionStore.routes, newVal);
if (appStore.activeTopMenu !== parent.path) {
@@ -106,6 +101,7 @@ function againActiveTop(newVal: string) {
}
}
+/** 递归查找最外层父节点 */
function findOutermostParent(tree: any[], findName: string) {
let parentMap: any = {};
@@ -136,7 +132,7 @@ function findOutermostParent(tree: any[], findName: string) {