refactor(projects)!: refactor global menu & support reversed-horizontal-mix-menu. close #365

This commit is contained in:
Soybean
2024-07-22 00:01:52 +08:00
parent 00f41dd25e
commit 087e532613
24 changed files with 588 additions and 310 deletions

12
src/typings/app.d.ts vendored
View File

@ -24,6 +24,12 @@ declare namespace App {
mode: UnionKey.ThemeLayoutMode;
/** Scroll mode */
scrollMode: UnionKey.ThemeScrollMode;
/**
* Whether to reverse the horizontal mix
*
* if true, the vertical child level menus in left and horizontal first level menus in top
*/
reverseHorizontalMix?: boolean;
};
/** Page */
page: {
@ -164,7 +170,7 @@ declare namespace App {
}
/** The global menu */
interface Menu {
type Menu = {
/**
* The menu key
*
@ -183,7 +189,7 @@ declare namespace App {
icon?: () => VNode;
/** The menu children */
children?: Menu[];
}
};
type Breadcrumb = Omit<Menu, 'children'> & {
options?: Breadcrumb[];
@ -326,7 +332,7 @@ declare namespace App {
theme: {
themeSchema: { title: string } & Record<UnionKey.ThemeScheme, string>;
grayscale: string;
layoutMode: { title: string } & Record<UnionKey.ThemeLayoutMode, string>;
layoutMode: { title: string; reverseHorizontalMix: string } & Record<UnionKey.ThemeLayoutMode, string>;
recommendColor: string;
recommendColorDesc: string;
themeColor: {