Files
role-admin/src/layout/types.ts
T
2026-05-26 16:24:03 +08:00

121 lines
2.2 KiB
TypeScript

import type { FunctionalComponent } from "vue";
/**
* 登录后默认打开的标签页。
*
* 这里要和 `src/router/modules/employees.ts` 的业务页面保持一致,
* 否则登出重置标签页或首次进入后台时会出现空标签/错入口。
*/
export const routerArrays: Array<RouteConfigs> = [
{
path: "/stores",
name: "StoreManagement",
meta: {
title: "门店管理",
icon: "ep/shop"
}
},
{
path: "/roles",
name: "RoleManagement",
meta: {
title: "角色管理",
icon: "ep/key"
}
},
{
path: "/employees",
name: "EmployeeManagement",
meta: {
title: "员工管理",
icon: "ep/user-filled"
}
},
{
path: "/permissions",
name: "PermissionPolicies",
meta: {
title: "权限策略",
icon: "ep/key"
}
}
];
export type routeMetaType = {
title?: string;
icon?: string | FunctionalComponent;
showLink?: boolean;
savedPosition?: boolean;
permission?: string | Array<string>;
menuKey?: 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 | FunctionalComponent;
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;
};
}