feat: 初始化仓库
This commit is contained in:
92
src/layout/types.ts
Normal file
92
src/layout/types.ts
Normal file
@@ -0,0 +1,92 @@
|
||||
import type { IconifyIcon } from "@iconify/vue";
|
||||
const { VITE_HIDE_HOME } = import.meta.env;
|
||||
|
||||
export const routerArrays: Array<RouteConfigs> =
|
||||
VITE_HIDE_HOME === "false"
|
||||
? [
|
||||
{
|
||||
path: "/welcome",
|
||||
meta: {
|
||||
title: "menus.pureHome",
|
||||
icon: "ep:home-filled"
|
||||
}
|
||||
}
|
||||
]
|
||||
: [];
|
||||
|
||||
export type routeMetaType = {
|
||||
title?: string;
|
||||
icon?: string | IconifyIcon;
|
||||
showLink?: boolean;
|
||||
savedPosition?: boolean;
|
||||
auths?: Array<string>;
|
||||
};
|
||||
|
||||
export type RouteConfigs = {
|
||||
path?: string;
|
||||
query?: object;
|
||||
params?: object;
|
||||
meta?: routeMetaType;
|
||||
children?: RouteConfigs[];
|
||||
name?: string;
|
||||
};
|
||||
|
||||
export type multiTagsType = {
|
||||
tags: Array<RouteConfigs>;
|
||||
};
|
||||
|
||||
export type tagsViewsType = {
|
||||
icon: string | IconifyIcon;
|
||||
text: string;
|
||||
divided: boolean;
|
||||
disabled: boolean;
|
||||
show: boolean;
|
||||
};
|
||||
|
||||
export interface setType {
|
||||
sidebar: {
|
||||
opened: boolean;
|
||||
withoutAnimation: boolean;
|
||||
isClickCollapse: boolean;
|
||||
};
|
||||
device: string;
|
||||
fixedHeader: boolean;
|
||||
classes: {
|
||||
hideSidebar: boolean;
|
||||
openSidebar: boolean;
|
||||
withoutAnimation: boolean;
|
||||
mobile: boolean;
|
||||
};
|
||||
hideTabs: boolean;
|
||||
}
|
||||
|
||||
export type menuType = {
|
||||
id?: number;
|
||||
name?: string;
|
||||
path?: string;
|
||||
noShowingChildren?: boolean;
|
||||
children?: menuType[];
|
||||
value: unknown;
|
||||
meta?: {
|
||||
icon?: string;
|
||||
title?: string;
|
||||
rank?: number;
|
||||
showParent?: boolean;
|
||||
extraIcon?: string;
|
||||
};
|
||||
showTooltip?: boolean;
|
||||
parentId?: number;
|
||||
pathList?: number[];
|
||||
redirect?: string;
|
||||
};
|
||||
|
||||
export type themeColorsType = {
|
||||
color: string;
|
||||
themeColor: string;
|
||||
};
|
||||
|
||||
export interface scrollbarDomType extends HTMLElement {
|
||||
wrap?: {
|
||||
offsetWidth: number;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user