feat(projects): 新增顶部菜单

This commit is contained in:
Soybean
2021-09-23 00:15:19 +08:00
parent e9db67ee12
commit 221d2cc02d
10 changed files with 102 additions and 29 deletions

View File

@ -2,7 +2,7 @@ import { defineStore } from 'pinia';
import type { GlobalThemeOverrides } from 'naive-ui';
import { themeSettings } from '@/settings';
import { store } from '@/store';
import type { ThemeSettings, NavMode, MultiTabMode, AnimateType } from '@/interface';
import type { ThemeSettings, NavMode, MultiTabMode, AnimateType, HorizontalMenuPosition } from '@/interface';
import { getHoverAndPressedColor } from './helpers';
type ThemeState = ThemeSettings;
@ -85,6 +85,10 @@ const themeStore = defineStore({
this.menuStyle.mixWidth = width;
}
},
/** 更改顶部水平菜单的位置 */
handleHorizontalMenuPosition(position: HorizontalMenuPosition) {
this.menuStyle.horizontalPosition = position;
},
/** 更改头部的高度 */
handleHeaderHeight(height: number | null) {
if (height !== null) {