初始化
This commit is contained in:
20
src/typings/api/auth.d.ts
vendored
Normal file
20
src/typings/api/auth.d.ts
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
declare namespace Api {
|
||||
/**
|
||||
* namespace Auth
|
||||
*
|
||||
* backend api module: "auth"
|
||||
*/
|
||||
namespace Auth {
|
||||
interface LoginToken {
|
||||
token: string;
|
||||
refreshToken: string;
|
||||
}
|
||||
|
||||
interface UserInfo {
|
||||
userId: string;
|
||||
userName: string;
|
||||
roles: string[];
|
||||
buttons: string[];
|
||||
}
|
||||
}
|
||||
}
|
||||
50
src/typings/api/common.d.ts
vendored
Normal file
50
src/typings/api/common.d.ts
vendored
Normal file
@@ -0,0 +1,50 @@
|
||||
/**
|
||||
* Namespace Api
|
||||
*
|
||||
* All backend api type
|
||||
*/
|
||||
declare namespace Api {
|
||||
namespace Common {
|
||||
/** common params of paginating */
|
||||
interface PaginatingCommonParams {
|
||||
/** current page number */
|
||||
current: number;
|
||||
/** page size */
|
||||
size: number;
|
||||
/** total count */
|
||||
total: number;
|
||||
}
|
||||
|
||||
/** common params of paginating query list data */
|
||||
interface PaginatingQueryRecord<T = any> extends PaginatingCommonParams {
|
||||
records: T[];
|
||||
}
|
||||
|
||||
/** common search params of table */
|
||||
type CommonSearchParams = Pick<Common.PaginatingCommonParams, 'current' | 'size'>;
|
||||
|
||||
/**
|
||||
* enable status
|
||||
*
|
||||
* - "1": enabled
|
||||
* - "2": disabled
|
||||
*/
|
||||
type EnableStatus = '1' | '2';
|
||||
|
||||
/** common record */
|
||||
type CommonRecord<T = any> = {
|
||||
/** record id */
|
||||
id: number;
|
||||
/** record creator */
|
||||
createBy: string;
|
||||
/** record create time */
|
||||
createTime: string;
|
||||
/** record updater */
|
||||
updateBy: string;
|
||||
/** record update time */
|
||||
updateTime: string;
|
||||
/** record status */
|
||||
status: EnableStatus | undefined;
|
||||
} & T;
|
||||
}
|
||||
}
|
||||
72
src/typings/api/dict.d.ts
vendored
Normal file
72
src/typings/api/dict.d.ts
vendored
Normal file
@@ -0,0 +1,72 @@
|
||||
declare namespace Api {
|
||||
/**
|
||||
* namespace Dict
|
||||
*
|
||||
* backend api module: "dict"
|
||||
*/
|
||||
namespace Dict {
|
||||
type DictStatus = 0 | 1;
|
||||
|
||||
interface PageParams {
|
||||
pageNo: number;
|
||||
pageSize: number;
|
||||
}
|
||||
|
||||
interface PageResult<T = any> {
|
||||
total: number;
|
||||
list: T[];
|
||||
}
|
||||
|
||||
/** dict type */
|
||||
interface DictType {
|
||||
/** dict type id */
|
||||
id: number;
|
||||
/** dict name */
|
||||
name: string;
|
||||
/** dict type code */
|
||||
type: string;
|
||||
/** status: 0 enabled, 1 disabled */
|
||||
status: DictStatus;
|
||||
/** remark */
|
||||
remark?: string | null;
|
||||
/** create time */
|
||||
createTime: number;
|
||||
}
|
||||
|
||||
/** dict type search params */
|
||||
type DictTypeSearchParams = CommonType.RecordNullable<Pick<DictType, 'name' | 'type' | 'status'>> & PageParams;
|
||||
|
||||
/** dict type save params */
|
||||
type SaveDictTypeParams = Pick<DictType, 'name' | 'type' | 'status'> & {
|
||||
remark?: string | null;
|
||||
};
|
||||
|
||||
/** dict data */
|
||||
interface DictData {
|
||||
/** dict data id */
|
||||
id: number;
|
||||
/** dict label */
|
||||
label: string;
|
||||
/** dict value */
|
||||
value: string;
|
||||
/** dict type code */
|
||||
dictType: string;
|
||||
/** display order */
|
||||
sort: number;
|
||||
/** status: 0 enabled, 1 disabled */
|
||||
status: DictStatus;
|
||||
/** remark */
|
||||
remark?: string | null;
|
||||
/** create time */
|
||||
createTime: number;
|
||||
}
|
||||
|
||||
/** dict data search params */
|
||||
type DictDataSearchParams = CommonType.RecordNullable<Pick<DictData, 'label' | 'dictType' | 'status'>> & PageParams;
|
||||
|
||||
/** dict data save params */
|
||||
type SaveDictDataParams = Pick<DictData, 'label' | 'value' | 'dictType' | 'sort' | 'status'> & {
|
||||
remark?: string | null;
|
||||
};
|
||||
}
|
||||
}
|
||||
20
src/typings/api/route.d.ts
vendored
Normal file
20
src/typings/api/route.d.ts
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
declare namespace Api {
|
||||
/**
|
||||
* namespace Route
|
||||
*
|
||||
* backend api module: "route"
|
||||
*/
|
||||
namespace Route {
|
||||
type ElegantConstRoute = import('@elegant-router/types').ElegantConstRoute;
|
||||
|
||||
interface MenuRoute extends Omit<ElegantConstRoute, 'children'> {
|
||||
id: string;
|
||||
children?: MenuRoute[];
|
||||
}
|
||||
|
||||
interface UserRoute {
|
||||
routes: MenuRoute[];
|
||||
home: import('@elegant-router/types').LastLevelRouteKey;
|
||||
}
|
||||
}
|
||||
}
|
||||
298
src/typings/api/system-manage.d.ts
vendored
Normal file
298
src/typings/api/system-manage.d.ts
vendored
Normal file
@@ -0,0 +1,298 @@
|
||||
declare namespace Api {
|
||||
/**
|
||||
* namespace SystemManage
|
||||
*
|
||||
* backend api module: "system"
|
||||
*/
|
||||
namespace SystemManage {
|
||||
type CommonStatus = 0 | 1;
|
||||
|
||||
interface PageParams {
|
||||
pageNo: number;
|
||||
pageSize: number;
|
||||
}
|
||||
|
||||
interface PageResult<T = any> {
|
||||
total: number;
|
||||
list: T[];
|
||||
}
|
||||
|
||||
type RoleType = 1 | 2;
|
||||
|
||||
interface Role {
|
||||
/** role id */
|
||||
id: number;
|
||||
/** role name */
|
||||
name: string;
|
||||
/** role code */
|
||||
code: string;
|
||||
/** display sort */
|
||||
sort: number;
|
||||
/** status: 0 enabled, 1 disabled */
|
||||
status: CommonStatus;
|
||||
/** role type */
|
||||
type: RoleType;
|
||||
/** remark */
|
||||
remark?: string | null;
|
||||
/** create time */
|
||||
createTime: number;
|
||||
}
|
||||
|
||||
type RoleSearchParams = CommonType.RecordNullable<Pick<Role, 'name' | 'code' | 'status'>> &
|
||||
PageParams & {
|
||||
createTime?: string[];
|
||||
};
|
||||
|
||||
type SaveRoleParams = Pick<Role, 'name' | 'code' | 'sort' | 'status'> & {
|
||||
remark?: string | null;
|
||||
};
|
||||
|
||||
type RoleList = PageResult<Role>;
|
||||
|
||||
/**
|
||||
* keep the legacy fields for the user page until it is migrated
|
||||
*/
|
||||
type AllRole = RoleSimple & {
|
||||
roleName: string;
|
||||
roleCode: string;
|
||||
};
|
||||
|
||||
type DeptOrgType = 'company' | 'dept' | 'direction' | 'team';
|
||||
|
||||
interface Dept {
|
||||
id: number;
|
||||
name: string;
|
||||
parentId: number;
|
||||
orgType: DeptOrgType;
|
||||
path?: string | null;
|
||||
level?: number | null;
|
||||
code?: string | null;
|
||||
sort?: number | null;
|
||||
status: CommonStatus;
|
||||
createTime?: number | null;
|
||||
children?: Dept[] | null;
|
||||
}
|
||||
|
||||
interface DeptSimple {
|
||||
id: number;
|
||||
name: string;
|
||||
parentId: number;
|
||||
children?: DeptSimple[] | null;
|
||||
}
|
||||
|
||||
type DeptList = Dept[];
|
||||
|
||||
type DeptSimpleList = DeptSimple[];
|
||||
|
||||
type DeptSearchParams = CommonType.RecordNullable<Pick<Dept, 'name' | 'orgType' | 'status'>>;
|
||||
|
||||
type SaveDeptParams = Pick<Dept, 'name' | 'parentId' | 'orgType' | 'code' | 'sort' | 'status'>;
|
||||
|
||||
interface OrgLeaderRelation {
|
||||
id: number;
|
||||
deptId: number;
|
||||
userId: number;
|
||||
userNickname: string;
|
||||
effectiveFrom?: number | null;
|
||||
effectiveUntil?: number | null;
|
||||
remark?: string | null;
|
||||
createTime?: number | null;
|
||||
updateTime?: number | null;
|
||||
}
|
||||
|
||||
type OrgLeaderRelationList = OrgLeaderRelation[];
|
||||
|
||||
interface OrgLeaderCandidateUser {
|
||||
id: number;
|
||||
nickname: string;
|
||||
deptId: number;
|
||||
deptName?: string | null;
|
||||
}
|
||||
|
||||
type OrgLeaderCandidateUserList = OrgLeaderCandidateUser[];
|
||||
|
||||
type SaveOrgLeaderRelationParams = {
|
||||
deptId: number;
|
||||
userId: number;
|
||||
effectiveFrom?: number | null;
|
||||
effectiveUntil?: number | null;
|
||||
remark?: string | null;
|
||||
};
|
||||
|
||||
type UserGender = 0 | 1 | 2;
|
||||
|
||||
interface User {
|
||||
id: number;
|
||||
username: string;
|
||||
nickname?: string | null;
|
||||
remark?: string | null;
|
||||
deptId: number;
|
||||
deptName?: string | null;
|
||||
positionId?: number | null;
|
||||
positionName?: string | null;
|
||||
email?: string | null;
|
||||
mobile?: string | null;
|
||||
sex?: UserGender | null;
|
||||
avatar?: string | null;
|
||||
status: CommonStatus;
|
||||
loginIp?: string | null;
|
||||
resignedAt?: number | null;
|
||||
loginDate?: number | null;
|
||||
createTime: number;
|
||||
}
|
||||
|
||||
type UserSearchParams = CommonType.RecordNullable<
|
||||
Pick<User, 'status'> &
|
||||
Pick<PageParams, 'pageNo' | 'pageSize'> & {
|
||||
username?: string;
|
||||
mobile?: string;
|
||||
deptId?: number;
|
||||
roleId?: number;
|
||||
}
|
||||
>;
|
||||
|
||||
type UserList = PageResult<User>;
|
||||
|
||||
type SaveUserParams = Pick<User, 'username' | 'deptId'> & {
|
||||
nickname?: string | null;
|
||||
remark?: string | null;
|
||||
positionId?: number | null;
|
||||
resignedAt?: number | null;
|
||||
email?: string | null;
|
||||
mobile?: string | null;
|
||||
sex?: UserGender | null;
|
||||
avatar?: string | null;
|
||||
password?: string;
|
||||
};
|
||||
|
||||
interface UpdateUserStatusParams {
|
||||
id: number;
|
||||
status: CommonStatus;
|
||||
}
|
||||
|
||||
interface UpdateUserPasswordParams {
|
||||
id: number;
|
||||
password: string;
|
||||
}
|
||||
|
||||
type PostType = 'management' | 'technical' | 'business';
|
||||
|
||||
interface PostSimple {
|
||||
id: number;
|
||||
name: string;
|
||||
code?: string | null;
|
||||
postType?: PostType | null;
|
||||
levelRank?: number | null;
|
||||
sort?: number | null;
|
||||
}
|
||||
|
||||
type PostSimpleList = PostSimple[];
|
||||
|
||||
type RoleSimple = Pick<Role, 'id' | 'name' | 'code' | 'status' | 'sort'>;
|
||||
|
||||
type RoleSimpleList = RoleSimple[];
|
||||
|
||||
interface AssignUserRoleParams {
|
||||
userId: number;
|
||||
roleIds: number[];
|
||||
}
|
||||
|
||||
/**
|
||||
* menu type
|
||||
*
|
||||
* - 1: directory
|
||||
* - 2: menu
|
||||
* - 3: button
|
||||
*/
|
||||
type MenuType = 1 | 2 | 3;
|
||||
|
||||
/**
|
||||
* menu route kind
|
||||
*
|
||||
* - dir: directory route
|
||||
* - view: normal page route
|
||||
* - single: top level single page
|
||||
* - iframe: iframe page
|
||||
* - external: external link
|
||||
* - redirect: redirect route
|
||||
*/
|
||||
type MenuRouteKind = 'dir' | 'view' | 'single' | 'iframe' | 'external' | 'redirect';
|
||||
|
||||
interface Menu {
|
||||
/** menu id */
|
||||
id: number;
|
||||
/** menu name */
|
||||
name: string;
|
||||
/** permission code */
|
||||
permission?: string | null;
|
||||
/** menu type */
|
||||
type: MenuType;
|
||||
/** display sort */
|
||||
sort: number;
|
||||
/** parent menu id */
|
||||
parentId: number;
|
||||
/** route path */
|
||||
path?: string | null;
|
||||
/** menu icon */
|
||||
icon?: string | null;
|
||||
/** component path */
|
||||
component?: string | null;
|
||||
/** component name */
|
||||
componentName?: string | null;
|
||||
/** route kind */
|
||||
routeKind?: MenuRouteKind | null;
|
||||
/** route props json */
|
||||
routePropsJson?: string | null;
|
||||
/** status: 0 enabled, 1 disabled */
|
||||
status: CommonStatus;
|
||||
/** visible in menu */
|
||||
visible?: boolean | null;
|
||||
/** keep alive */
|
||||
keepAlive?: boolean | null;
|
||||
/** always show children */
|
||||
alwaysShow?: boolean | null;
|
||||
/** create time */
|
||||
createTime: number;
|
||||
/** frontend tree children */
|
||||
children?: Menu[] | null;
|
||||
}
|
||||
|
||||
type MenuSearchParams = CommonType.RecordNullable<Pick<Menu, 'name' | 'status'>>;
|
||||
|
||||
type SaveMenuParams = Pick<
|
||||
Menu,
|
||||
| 'name'
|
||||
| 'permission'
|
||||
| 'type'
|
||||
| 'sort'
|
||||
| 'parentId'
|
||||
| 'path'
|
||||
| 'icon'
|
||||
| 'component'
|
||||
| 'componentName'
|
||||
| 'routeKind'
|
||||
| 'routePropsJson'
|
||||
| 'status'
|
||||
| 'visible'
|
||||
| 'keepAlive'
|
||||
| 'alwaysShow'
|
||||
>;
|
||||
|
||||
interface MenuSimple {
|
||||
id: number;
|
||||
name: string;
|
||||
parentId: number;
|
||||
type: MenuType;
|
||||
children?: MenuSimple[] | null;
|
||||
}
|
||||
|
||||
type MenuList = Menu[];
|
||||
|
||||
type MenuSimpleList = MenuSimple[];
|
||||
|
||||
interface AssignRoleMenuParams {
|
||||
roleId: number;
|
||||
menuIds: number[];
|
||||
}
|
||||
}
|
||||
}
|
||||
935
src/typings/app.d.ts
vendored
Normal file
935
src/typings/app.d.ts
vendored
Normal file
@@ -0,0 +1,935 @@
|
||||
/** The global namespace for the app */
|
||||
declare namespace App {
|
||||
/** Theme namespace */
|
||||
namespace Theme {
|
||||
type ColorPaletteNumber = import('@sa/color').ColorPaletteNumber;
|
||||
|
||||
/** Theme setting */
|
||||
interface ThemeSetting {
|
||||
/** Theme scheme */
|
||||
themeScheme: UnionKey.ThemeScheme;
|
||||
/** grayscale mode */
|
||||
grayscale: boolean;
|
||||
/** colour weakness mode */
|
||||
colourWeakness: boolean;
|
||||
/** Whether to recommend color */
|
||||
recommendColor: boolean;
|
||||
/** Theme color */
|
||||
themeColor: string;
|
||||
/** Other color */
|
||||
otherColor: OtherColor;
|
||||
/** Whether info color is followed by the primary color */
|
||||
isInfoFollowPrimary: boolean;
|
||||
/** Layout */
|
||||
layout: {
|
||||
/** Layout mode */
|
||||
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: {
|
||||
/** Whether to show the page transition */
|
||||
animate: boolean;
|
||||
/** Page animate mode */
|
||||
animateMode: UnionKey.ThemePageAnimateMode;
|
||||
};
|
||||
/** Header */
|
||||
header: {
|
||||
/** Header height */
|
||||
height: number;
|
||||
/** Header breadcrumb */
|
||||
breadcrumb: {
|
||||
/** Whether to show the breadcrumb */
|
||||
visible: boolean;
|
||||
/** Whether to show the breadcrumb icon */
|
||||
showIcon: boolean;
|
||||
};
|
||||
/** Multilingual */
|
||||
multilingual: {
|
||||
/** Whether to show the multilingual */
|
||||
visible: boolean;
|
||||
};
|
||||
/** Global search */
|
||||
globalSearch: {
|
||||
/** Whether to show the global search */
|
||||
visible: boolean;
|
||||
};
|
||||
};
|
||||
/** Tab */
|
||||
tab: {
|
||||
/** Whether to show the tab */
|
||||
visible: boolean;
|
||||
/**
|
||||
* Whether to cache the tab
|
||||
*
|
||||
* If cache, the tabs will get from the local storage when the page is refreshed
|
||||
*/
|
||||
cache: boolean;
|
||||
/** Tab height */
|
||||
height: number;
|
||||
/** Tab mode */
|
||||
mode: UnionKey.ThemeTabMode;
|
||||
};
|
||||
/** Fixed header and tab */
|
||||
fixedHeaderAndTab: boolean;
|
||||
/** Sider */
|
||||
sider: {
|
||||
/** Inverted sider */
|
||||
inverted: boolean;
|
||||
/** Sider width */
|
||||
width: number;
|
||||
/** Collapsed sider width */
|
||||
collapsedWidth: number;
|
||||
/** Sider width when the layout is 'vertical-mix' or 'horizontal-mix' */
|
||||
mixWidth: number;
|
||||
/** Collapsed sider width when the layout is 'vertical-mix' or 'horizontal-mix' */
|
||||
mixCollapsedWidth: number;
|
||||
/** Child menu width when the layout is 'vertical-mix' or 'horizontal-mix' */
|
||||
mixChildMenuWidth: number;
|
||||
};
|
||||
/** Footer */
|
||||
footer: {
|
||||
/** Whether to show the footer */
|
||||
visible: boolean;
|
||||
/** Whether fixed the footer */
|
||||
fixed: boolean;
|
||||
/** Footer height */
|
||||
height: number;
|
||||
/** Whether float the footer to the right when the layout is 'horizontal-mix' */
|
||||
right: boolean;
|
||||
};
|
||||
/** Watermark */
|
||||
watermark: {
|
||||
/** Whether to show the watermark */
|
||||
visible: boolean;
|
||||
/** Watermark text */
|
||||
text: string;
|
||||
/** Whether to use user name as watermark text */
|
||||
enableUserName: boolean;
|
||||
};
|
||||
/** define some theme settings tokens, will transform to css variables */
|
||||
tokens: {
|
||||
light: ThemeSettingToken;
|
||||
dark?: {
|
||||
[K in keyof ThemeSettingToken]?: Partial<ThemeSettingToken[K]>;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
interface OtherColor {
|
||||
info: string;
|
||||
success: string;
|
||||
warning: string;
|
||||
error: string;
|
||||
}
|
||||
|
||||
interface ThemeColor extends OtherColor {
|
||||
primary: string;
|
||||
}
|
||||
|
||||
type ThemeColorKey = keyof ThemeColor;
|
||||
|
||||
type ThemePaletteColor = {
|
||||
[key in ThemeColorKey | `${ThemeColorKey}-${ColorPaletteNumber}`]: string;
|
||||
};
|
||||
|
||||
type BaseToken = Record<string, Record<string, string>>;
|
||||
|
||||
interface ThemeSettingTokenColor {
|
||||
/** the progress bar color, if not set, will use the primary color */
|
||||
nprogress?: string;
|
||||
container: string;
|
||||
layout: string;
|
||||
inverted: string;
|
||||
'base-text': string;
|
||||
}
|
||||
|
||||
interface ThemeSettingTokenBoxShadow {
|
||||
header: string;
|
||||
sider: string;
|
||||
tab: string;
|
||||
}
|
||||
|
||||
interface ThemeSettingToken {
|
||||
colors: ThemeSettingTokenColor;
|
||||
boxShadow: ThemeSettingTokenBoxShadow;
|
||||
}
|
||||
|
||||
type ThemeTokenColor = ThemePaletteColor & ThemeSettingTokenColor;
|
||||
|
||||
/** Theme token CSS variables */
|
||||
type ThemeTokenCSSVars = {
|
||||
colors: ThemeTokenColor & { [key: string]: string };
|
||||
boxShadow: ThemeSettingTokenBoxShadow & { [key: string]: string };
|
||||
};
|
||||
}
|
||||
|
||||
/** Global namespace */
|
||||
namespace Global {
|
||||
type VNode = import('vue').VNode;
|
||||
type RouteLocationNormalizedLoaded = import('vue-router').RouteLocationNormalizedLoaded;
|
||||
type RouteKey = import('@elegant-router/types').RouteKey;
|
||||
type RouteMap = import('@elegant-router/types').RouteMap;
|
||||
type RoutePath = import('@elegant-router/types').RoutePath;
|
||||
type LastLevelRouteKey = import('@elegant-router/types').LastLevelRouteKey;
|
||||
|
||||
/** The global header props */
|
||||
interface HeaderProps {
|
||||
/** Whether to show the logo */
|
||||
showLogo?: boolean;
|
||||
/** Whether to show the menu toggler */
|
||||
showMenuToggler?: boolean;
|
||||
/** Whether to show the menu */
|
||||
showMenu?: boolean;
|
||||
}
|
||||
|
||||
/** The global menu */
|
||||
type Menu = {
|
||||
/**
|
||||
* The menu key
|
||||
*
|
||||
* Equal to the route key
|
||||
*/
|
||||
key: string;
|
||||
/** The menu label */
|
||||
label: string;
|
||||
/** The menu i18n key */
|
||||
i18nKey?: I18n.I18nKey | null;
|
||||
/** The route key */
|
||||
routeKey: RouteKey;
|
||||
/** The route path */
|
||||
routePath: RoutePath;
|
||||
/** The menu icon */
|
||||
icon?: () => VNode;
|
||||
/** The menu children */
|
||||
children?: Menu[];
|
||||
};
|
||||
|
||||
type Breadcrumb = Omit<Menu, 'children'> & {
|
||||
options?: Breadcrumb[];
|
||||
};
|
||||
|
||||
/** Tab route */
|
||||
type TabRoute = Pick<RouteLocationNormalizedLoaded, 'name' | 'path' | 'meta'> &
|
||||
Partial<Pick<RouteLocationNormalizedLoaded, 'fullPath' | 'query' | 'matched'>>;
|
||||
|
||||
/** The global tab */
|
||||
type Tab = {
|
||||
/** The tab id */
|
||||
id: string;
|
||||
/** The tab label */
|
||||
label: string;
|
||||
/**
|
||||
* The new tab label
|
||||
*
|
||||
* If set, the tab label will be replaced by this value
|
||||
*/
|
||||
newLabel?: string;
|
||||
/**
|
||||
* The old tab label
|
||||
*
|
||||
* when reset the tab label, the tab label will be replaced by this value
|
||||
*/
|
||||
oldLabel?: string;
|
||||
/** The tab route key */
|
||||
routeKey: LastLevelRouteKey;
|
||||
/** The tab route path */
|
||||
routePath: RouteMap[LastLevelRouteKey];
|
||||
/** The tab route full path */
|
||||
fullPath: string;
|
||||
/** The tab fixed index */
|
||||
fixedIndex?: number | null;
|
||||
/**
|
||||
* Tab icon
|
||||
*
|
||||
* Iconify icon
|
||||
*/
|
||||
icon?: string;
|
||||
/**
|
||||
* Tab local icon
|
||||
*
|
||||
* Local icon
|
||||
*/
|
||||
localIcon?: string;
|
||||
/** I18n key */
|
||||
i18nKey?: I18n.I18nKey | null;
|
||||
};
|
||||
|
||||
/** Form rule */
|
||||
type FormRule = import('element-plus').FormItemRule;
|
||||
|
||||
/** The global dropdown key */
|
||||
type DropdownKey = 'closeCurrent' | 'closeOther' | 'closeLeft' | 'closeRight' | 'closeAll';
|
||||
}
|
||||
|
||||
/**
|
||||
* I18n namespace
|
||||
*
|
||||
* Locales type
|
||||
*/
|
||||
namespace I18n {
|
||||
type RouteKey = import('@elegant-router/types').RouteKey;
|
||||
|
||||
type LangType = 'en-US' | 'zh-CN';
|
||||
|
||||
type LangOption = {
|
||||
label: string;
|
||||
key: LangType;
|
||||
};
|
||||
|
||||
type I18nRouteKey = Exclude<RouteKey, 'root' | 'not-found'>;
|
||||
|
||||
type FormMsg = {
|
||||
required: string;
|
||||
invalid: string;
|
||||
};
|
||||
|
||||
type Schema = {
|
||||
system: {
|
||||
title: string;
|
||||
};
|
||||
common: {
|
||||
action: string;
|
||||
add: string;
|
||||
addSuccess: string;
|
||||
backToHome: string;
|
||||
batchDelete: string;
|
||||
cancel: string;
|
||||
close: string;
|
||||
check: string;
|
||||
expandColumn: string;
|
||||
columnSetting: string;
|
||||
config: string;
|
||||
confirm: string;
|
||||
delete: string;
|
||||
deleteSuccess: string;
|
||||
confirmDelete: string;
|
||||
edit: string;
|
||||
warning: string;
|
||||
error: string;
|
||||
index: string;
|
||||
keywordSearch: string;
|
||||
logout: string;
|
||||
logoutConfirm: string;
|
||||
lookForward: string;
|
||||
modify: string;
|
||||
modifySuccess: string;
|
||||
more: string;
|
||||
noData: string;
|
||||
operate: string;
|
||||
pleaseCheckValue: string;
|
||||
refresh: string;
|
||||
reset: string;
|
||||
search: string;
|
||||
switch: string;
|
||||
tip: string;
|
||||
trigger: string;
|
||||
update: string;
|
||||
updateSuccess: string;
|
||||
userCenter: string;
|
||||
yesOrNo: {
|
||||
yes: string;
|
||||
no: string;
|
||||
};
|
||||
};
|
||||
request: {
|
||||
logout: string;
|
||||
logoutMsg: string;
|
||||
logoutWithModal: string;
|
||||
logoutWithModalMsg: string;
|
||||
refreshToken: string;
|
||||
tokenExpired: string;
|
||||
};
|
||||
theme: {
|
||||
themeSchema: { title: string } & Record<UnionKey.ThemeScheme, string>;
|
||||
grayscale: string;
|
||||
colourWeakness: string;
|
||||
layoutMode: { title: string; reverseHorizontalMix: string } & Record<UnionKey.ThemeLayoutMode, string>;
|
||||
recommendColor: string;
|
||||
recommendColorDesc: string;
|
||||
themeColor: {
|
||||
title: string;
|
||||
followPrimary: string;
|
||||
} & Theme.ThemeColor;
|
||||
scrollMode: { title: string } & Record<UnionKey.ThemeScrollMode, string>;
|
||||
page: {
|
||||
animate: string;
|
||||
mode: { title: string } & Record<UnionKey.ThemePageAnimateMode, string>;
|
||||
};
|
||||
fixedHeaderAndTab: string;
|
||||
header: {
|
||||
height: string;
|
||||
breadcrumb: {
|
||||
visible: string;
|
||||
showIcon: string;
|
||||
};
|
||||
multilingual: {
|
||||
visible: string;
|
||||
};
|
||||
globalSearch: {
|
||||
visible: string;
|
||||
};
|
||||
};
|
||||
tab: {
|
||||
visible: string;
|
||||
cache: string;
|
||||
height: string;
|
||||
mode: { title: string } & Record<UnionKey.ThemeTabMode, string>;
|
||||
};
|
||||
sider: {
|
||||
inverted: string;
|
||||
width: string;
|
||||
collapsedWidth: string;
|
||||
mixWidth: string;
|
||||
mixCollapsedWidth: string;
|
||||
mixChildMenuWidth: string;
|
||||
};
|
||||
footer: {
|
||||
visible: string;
|
||||
fixed: string;
|
||||
height: string;
|
||||
right: string;
|
||||
};
|
||||
watermark: {
|
||||
visible: string;
|
||||
text: string;
|
||||
enableUserName: string;
|
||||
};
|
||||
themeDrawerTitle: string;
|
||||
pageFunTitle: string;
|
||||
configOperation: {
|
||||
copyConfig: string;
|
||||
copySuccessMsg: string;
|
||||
resetConfig: string;
|
||||
resetSuccessMsg: string;
|
||||
};
|
||||
};
|
||||
route: Record<I18nRouteKey, string>;
|
||||
page: {
|
||||
login: {
|
||||
common: {
|
||||
loginOrRegister: string;
|
||||
userNamePlaceholder: string;
|
||||
phonePlaceholder: string;
|
||||
codePlaceholder: string;
|
||||
passwordPlaceholder: string;
|
||||
confirmPasswordPlaceholder: string;
|
||||
codeLogin: string;
|
||||
confirm: string;
|
||||
back: string;
|
||||
validateSuccess: string;
|
||||
loginSuccess: string;
|
||||
welcomeBack: string;
|
||||
};
|
||||
pwdLogin: {
|
||||
title: string;
|
||||
rememberMe: string;
|
||||
forgetPassword: string;
|
||||
register: string;
|
||||
otherAccountLogin: string;
|
||||
otherLoginMode: string;
|
||||
superAdmin: string;
|
||||
admin: string;
|
||||
user: string;
|
||||
};
|
||||
codeLogin: {
|
||||
title: string;
|
||||
getCode: string;
|
||||
reGetCode: string;
|
||||
sendCodeSuccess: string;
|
||||
imageCodePlaceholder: string;
|
||||
};
|
||||
register: {
|
||||
title: string;
|
||||
agreement: string;
|
||||
protocol: string;
|
||||
policy: string;
|
||||
};
|
||||
resetPwd: {
|
||||
title: string;
|
||||
};
|
||||
bindWeChat: {
|
||||
title: string;
|
||||
};
|
||||
};
|
||||
about: {
|
||||
title: string;
|
||||
introduction: string;
|
||||
projectInfo: {
|
||||
title: string;
|
||||
version: string;
|
||||
latestBuildTime: string;
|
||||
githubLink: string;
|
||||
previewLink: string;
|
||||
};
|
||||
prdDep: string;
|
||||
devDep: string;
|
||||
};
|
||||
home: {
|
||||
branchDesc: string;
|
||||
greetingLateNight: string;
|
||||
greetingMorning: string;
|
||||
greetingNoon: string;
|
||||
greetingAfternoon: string;
|
||||
greetingEvening: string;
|
||||
weatherDesc: string;
|
||||
projectCount: string;
|
||||
todo: string;
|
||||
message: string;
|
||||
downloadCount: string;
|
||||
registerCount: string;
|
||||
schedule: string;
|
||||
study: string;
|
||||
work: string;
|
||||
rest: string;
|
||||
entertainment: string;
|
||||
visitCount: string;
|
||||
turnover: string;
|
||||
dealCount: string;
|
||||
projectNews: {
|
||||
title: string;
|
||||
moreNews: string;
|
||||
desc1: string;
|
||||
desc2: string;
|
||||
desc3: string;
|
||||
desc4: string;
|
||||
desc5: string;
|
||||
};
|
||||
creativity: string;
|
||||
};
|
||||
function: {
|
||||
tab: {
|
||||
tabOperate: {
|
||||
title: string;
|
||||
addTab: string;
|
||||
addTabDesc: string;
|
||||
closeTab: string;
|
||||
closeCurrentTab: string;
|
||||
closeAboutTab: string;
|
||||
addMultiTab: string;
|
||||
addMultiTabDesc1: string;
|
||||
addMultiTabDesc2: string;
|
||||
};
|
||||
tabTitle: {
|
||||
title: string;
|
||||
changeTitle: string;
|
||||
change: string;
|
||||
resetTitle: string;
|
||||
reset: string;
|
||||
};
|
||||
};
|
||||
multiTab: {
|
||||
routeParam: string;
|
||||
backTab: string;
|
||||
};
|
||||
toggleAuth: {
|
||||
toggleAccount: string;
|
||||
authHook: string;
|
||||
superAdminVisible: string;
|
||||
adminVisible: string;
|
||||
adminOrUserVisible: string;
|
||||
};
|
||||
request: {
|
||||
repeatedErrorOccurOnce: string;
|
||||
repeatedError: string;
|
||||
repeatedErrorMsg1: string;
|
||||
repeatedErrorMsg2: string;
|
||||
};
|
||||
};
|
||||
system: {
|
||||
common: {
|
||||
status: {
|
||||
enable: string;
|
||||
disable: string;
|
||||
};
|
||||
};
|
||||
role: {
|
||||
title: string;
|
||||
currentRole: string;
|
||||
resourceAuth: string;
|
||||
searchKeyword: string;
|
||||
searchPlaceholder: string;
|
||||
searchMode: string;
|
||||
all: string;
|
||||
roleName: string;
|
||||
roleCode: string;
|
||||
roleStatus: string;
|
||||
roleDesc: string;
|
||||
remark: string;
|
||||
sort: string;
|
||||
createTime: string;
|
||||
saveAuth: string;
|
||||
selectedCount: string;
|
||||
disabledTip: string;
|
||||
emptyRole: string;
|
||||
lastAuthSave: string;
|
||||
unsavedTip: string;
|
||||
form: {
|
||||
roleName: string;
|
||||
roleCode: string;
|
||||
roleStatus: string;
|
||||
roleDesc: string;
|
||||
remark: string;
|
||||
sort: string;
|
||||
resourceKeyword: string;
|
||||
startTime: string;
|
||||
endTime: string;
|
||||
};
|
||||
addRole: string;
|
||||
editRole: string;
|
||||
menuAuth: string;
|
||||
buttonAuth: string;
|
||||
type: {
|
||||
system: string;
|
||||
custom: string;
|
||||
};
|
||||
};
|
||||
user: {
|
||||
title: string;
|
||||
orgTitle: string;
|
||||
orgFilterPlaceholder: string;
|
||||
emptyOrg: string;
|
||||
orgName: string;
|
||||
orgCode: string;
|
||||
orgTypeLabel: string;
|
||||
orgSort: string;
|
||||
orgLeader: string;
|
||||
orgLeaderTitle: string;
|
||||
candidateUser: string;
|
||||
effectiveFrom: string;
|
||||
effectiveUntil: string;
|
||||
relationRemark: string;
|
||||
emptyLeader: string;
|
||||
userName: string;
|
||||
userGender: string;
|
||||
nickName: string;
|
||||
deptName: string;
|
||||
positionName: string;
|
||||
userPhone: string;
|
||||
userEmail: string;
|
||||
userStatus: string;
|
||||
userRole: string;
|
||||
password: string;
|
||||
newPassword: string;
|
||||
confirmPassword: string;
|
||||
remark: string;
|
||||
resignedAt: string;
|
||||
resignedState: string;
|
||||
loginDate: string;
|
||||
createTime: string;
|
||||
form: {
|
||||
userName: string;
|
||||
userGender: string;
|
||||
nickName: string;
|
||||
orgName: string;
|
||||
orgCode: string;
|
||||
orgTypeLabel: string;
|
||||
orgSort: string;
|
||||
parentOrg: string;
|
||||
candidateUser: string;
|
||||
effectiveFrom: string;
|
||||
effectiveUntil: string;
|
||||
relationRemark: string;
|
||||
deptName: string;
|
||||
positionName: string;
|
||||
userPhone: string;
|
||||
userEmail: string;
|
||||
userStatus: string;
|
||||
userRole: string;
|
||||
password: string;
|
||||
newPassword: string;
|
||||
confirmPassword: string;
|
||||
remark: string;
|
||||
resignedAt: string;
|
||||
};
|
||||
addUser: string;
|
||||
editUser: string;
|
||||
addOrg: string;
|
||||
addChildOrg: string;
|
||||
editOrg: string;
|
||||
addLeader: string;
|
||||
editLeader: string;
|
||||
resetPassword: string;
|
||||
resignUser: string;
|
||||
adjustResignUser: string;
|
||||
restoreUser: string;
|
||||
topLevelOrg: string;
|
||||
sections: {
|
||||
basicInfo: string;
|
||||
organizationInfo: string;
|
||||
contactInfo: string;
|
||||
};
|
||||
orgType: {
|
||||
company: string;
|
||||
dept: string;
|
||||
direction: string;
|
||||
team: string;
|
||||
};
|
||||
gender: {
|
||||
unknown: string;
|
||||
male: string;
|
||||
female: string;
|
||||
};
|
||||
resignedStateEnum: {
|
||||
active: string;
|
||||
pending: string;
|
||||
resigned: string;
|
||||
};
|
||||
};
|
||||
menu: {
|
||||
home: string;
|
||||
title: string;
|
||||
id: string;
|
||||
parentId: string;
|
||||
menuType: string;
|
||||
menuName: string;
|
||||
permission: string;
|
||||
routeName: string;
|
||||
routePath: string;
|
||||
routeKind: string;
|
||||
routePropsJson: string;
|
||||
pageResource: string;
|
||||
component: string;
|
||||
componentName: string;
|
||||
iframeUrl: string;
|
||||
externalUrl: string;
|
||||
redirectTarget: string;
|
||||
pathParam: string;
|
||||
layout: string;
|
||||
page: string;
|
||||
i18nKey: string;
|
||||
icon: string;
|
||||
localIcon: string;
|
||||
iconTypeTitle: string;
|
||||
order: string;
|
||||
constant: string;
|
||||
keepAlive: string;
|
||||
href: string;
|
||||
hideInMenu: string;
|
||||
activeMenu: string;
|
||||
multiTab: string;
|
||||
fixedIndexInTab: string;
|
||||
query: string;
|
||||
button: string;
|
||||
buttonCode: string;
|
||||
buttonDesc: string;
|
||||
menuStatus: string;
|
||||
visible: string;
|
||||
alwaysShow: string;
|
||||
createTime: string;
|
||||
topLevel: string;
|
||||
sections: {
|
||||
basic: string;
|
||||
route: string;
|
||||
display: string;
|
||||
};
|
||||
form: {
|
||||
home: string;
|
||||
menuType: string;
|
||||
parentId: string;
|
||||
menuName: string;
|
||||
permission: string;
|
||||
routeName: string;
|
||||
routePath: string;
|
||||
path: string;
|
||||
component: string;
|
||||
componentName: string;
|
||||
routeKind: string;
|
||||
pageResource: string;
|
||||
pageResourceParentMismatch: string;
|
||||
routePropsJson: string;
|
||||
routePropsJsonHint: string;
|
||||
iframeUrl: string;
|
||||
externalUrl: string;
|
||||
redirectTarget: string;
|
||||
pathParam: string;
|
||||
layout: string;
|
||||
page: string;
|
||||
i18nKey: string;
|
||||
icon: string;
|
||||
localIcon: string;
|
||||
order: string;
|
||||
sort: string;
|
||||
keepAlive: string;
|
||||
href: string;
|
||||
hideInMenu: string;
|
||||
activeMenu: string;
|
||||
multiTab: string;
|
||||
fixedInTab: string;
|
||||
fixedIndexInTab: string;
|
||||
queryKey: string;
|
||||
queryValue: string;
|
||||
button: string;
|
||||
buttonCode: string;
|
||||
buttonDesc: string;
|
||||
menuStatus: string;
|
||||
};
|
||||
tips: {
|
||||
routeKind: string;
|
||||
routeKindSummary: string;
|
||||
routeKindItems: {
|
||||
directory: string;
|
||||
view: string;
|
||||
single: string;
|
||||
iframe: string;
|
||||
external: string;
|
||||
redirect: string;
|
||||
};
|
||||
routePath: string;
|
||||
pageResource: string;
|
||||
component: string;
|
||||
};
|
||||
addMenu: string;
|
||||
editMenu: string;
|
||||
addChildMenu: string;
|
||||
type: {
|
||||
directory: string;
|
||||
menu: string;
|
||||
button: string;
|
||||
};
|
||||
iconType: {
|
||||
iconify: string;
|
||||
local: string;
|
||||
};
|
||||
routeKindEnum: {
|
||||
directory: string;
|
||||
view: string;
|
||||
single: string;
|
||||
iframe: string;
|
||||
external: string;
|
||||
redirect: string;
|
||||
};
|
||||
};
|
||||
dict: {
|
||||
typeTitle: string;
|
||||
dataTitle: string;
|
||||
currentType: string;
|
||||
emptyType: string;
|
||||
typeSearchPlaceholder: string;
|
||||
dictName: string;
|
||||
dictCode: string;
|
||||
dictStatus: string;
|
||||
dictLabel: string;
|
||||
dictValue: string;
|
||||
sort: string;
|
||||
remark: string;
|
||||
form: {
|
||||
dictName: string;
|
||||
dictCode: string;
|
||||
dictStatus: string;
|
||||
dictLabel: string;
|
||||
dictValue: string;
|
||||
sort: string;
|
||||
remark: string;
|
||||
};
|
||||
addType: string;
|
||||
editType: string;
|
||||
addData: string;
|
||||
editData: string;
|
||||
};
|
||||
};
|
||||
};
|
||||
form: {
|
||||
required: string;
|
||||
userName: FormMsg;
|
||||
phone: FormMsg;
|
||||
pwd: FormMsg;
|
||||
confirmPwd: FormMsg;
|
||||
code: FormMsg;
|
||||
email: FormMsg;
|
||||
};
|
||||
dropdown: Record<Global.DropdownKey, string>;
|
||||
icon: {
|
||||
themeConfig: string;
|
||||
themeSchema: string;
|
||||
lang: string;
|
||||
fullscreen: string;
|
||||
fullscreenExit: string;
|
||||
reload: string;
|
||||
collapse: string;
|
||||
expand: string;
|
||||
pin: string;
|
||||
unpin: string;
|
||||
};
|
||||
datatable: {
|
||||
itemCount: string;
|
||||
};
|
||||
};
|
||||
|
||||
type GetI18nKey<T extends Record<string, unknown>, K extends keyof T = keyof T> = K extends string
|
||||
? T[K] extends Record<string, unknown>
|
||||
? `${K}.${GetI18nKey<T[K]>}`
|
||||
: K
|
||||
: never;
|
||||
|
||||
type I18nKey = GetI18nKey<Schema>;
|
||||
|
||||
type TranslateOptions<Locales extends string> = import('vue-i18n').TranslateOptions<Locales>;
|
||||
|
||||
interface $T {
|
||||
(key: I18nKey): string;
|
||||
(key: I18nKey, plural: number, options?: TranslateOptions<LangType>): string;
|
||||
(key: I18nKey, defaultMsg: string, options?: TranslateOptions<I18nKey>): string;
|
||||
(key: I18nKey, list: unknown[], options?: TranslateOptions<I18nKey>): string;
|
||||
(key: I18nKey, list: unknown[], plural: number): string;
|
||||
(key: I18nKey, list: unknown[], defaultMsg: string): string;
|
||||
(key: I18nKey, named: Record<string, unknown>, options?: TranslateOptions<LangType>): string;
|
||||
(key: I18nKey, named: Record<string, unknown>, plural: number): string;
|
||||
(key: I18nKey, named: Record<string, unknown>, defaultMsg: string): string;
|
||||
}
|
||||
}
|
||||
|
||||
/** Service namespace */
|
||||
namespace Service {
|
||||
/** Other baseURL key */
|
||||
type OtherBaseURLKey = 'demo';
|
||||
|
||||
interface ServiceConfigItem {
|
||||
/** The backend service base url */
|
||||
baseURL: string;
|
||||
/** The proxy pattern of the backend service base url */
|
||||
proxyPattern: string;
|
||||
}
|
||||
|
||||
interface OtherServiceConfigItem extends ServiceConfigItem {
|
||||
key: OtherBaseURLKey;
|
||||
}
|
||||
|
||||
/** The backend service config */
|
||||
interface ServiceConfig extends ServiceConfigItem {
|
||||
/** Other backend service config */
|
||||
other: OtherServiceConfigItem[];
|
||||
}
|
||||
|
||||
interface SimpleServiceConfig extends Pick<ServiceConfigItem, 'baseURL'> {
|
||||
other: Record<OtherBaseURLKey, string>;
|
||||
}
|
||||
|
||||
/** The backend service response data */
|
||||
type Response<T = unknown> = {
|
||||
/** The backend service response code */
|
||||
code: string;
|
||||
/** The backend service response message */
|
||||
msg: string;
|
||||
/** The backend service response data */
|
||||
data: T;
|
||||
};
|
||||
|
||||
/** The demo backend service response data */
|
||||
type DemoResponse<T = unknown> = {
|
||||
/** The backend service response code */
|
||||
status: string;
|
||||
/** The backend service response message */
|
||||
message: string;
|
||||
/** The backend service response data */
|
||||
result: T;
|
||||
};
|
||||
}
|
||||
}
|
||||
25
src/typings/common.d.ts
vendored
Normal file
25
src/typings/common.d.ts
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
/** The common type namespace */
|
||||
declare namespace CommonType {
|
||||
/** The strategic pattern */
|
||||
interface StrategicPattern {
|
||||
/** The condition */
|
||||
condition: boolean;
|
||||
/** If the condition is true, then call the action function */
|
||||
callback: () => void;
|
||||
}
|
||||
|
||||
/**
|
||||
* The option type
|
||||
*
|
||||
* @property value: The option value
|
||||
* @property label: The option label
|
||||
*/
|
||||
type Option<K = string, M = string> = { value: K; label: M };
|
||||
|
||||
type YesOrNo = 'Y' | 'N';
|
||||
|
||||
/** add null to all properties */
|
||||
type RecordNullable<T> = {
|
||||
[K in keyof T]?: T[K] | undefined;
|
||||
};
|
||||
}
|
||||
145
src/typings/components.d.ts
vendored
Normal file
145
src/typings/components.d.ts
vendored
Normal file
@@ -0,0 +1,145 @@
|
||||
/* eslint-disable */
|
||||
// @ts-nocheck
|
||||
// Generated by unplugin-vue-components
|
||||
// Read more: https://github.com/vuejs/core/pull/3399
|
||||
// biome-ignore lint: disable
|
||||
export {}
|
||||
|
||||
/* prettier-ignore */
|
||||
declare module 'vue' {
|
||||
export interface GlobalComponents {
|
||||
AppProvider: typeof import('./../components/common/app-provider.vue')['default']
|
||||
BetterScroll: typeof import('./../components/custom/better-scroll.vue')['default']
|
||||
BusinessFormDialog: typeof import('./../components/custom/business-form-dialog.vue')['default']
|
||||
BusinessFormDrawer: typeof import('./../components/custom/business-form-drawer.vue')['default']
|
||||
BusinessFormSection: typeof import('./../components/custom/business-form-section.vue')['default']
|
||||
ButtonIcon: typeof import('./../components/custom/button-icon.vue')['default']
|
||||
CountTo: typeof import('./../components/custom/count-to.vue')['default']
|
||||
CustomIconSelect: typeof import('./../components/custom/custom-icon-select.vue')['default']
|
||||
DarkModeContainer: typeof import('./../components/common/dark-mode-container.vue')['default']
|
||||
ElAlert: typeof import('element-plus/es')['ElAlert']
|
||||
ElAvatar: typeof import('element-plus/es')['ElAvatar']
|
||||
ElBreadcrumb: typeof import('element-plus/es')['ElBreadcrumb']
|
||||
ElBreadcrumbItem: typeof import('element-plus/es')['ElBreadcrumbItem']
|
||||
ElButton: typeof import('element-plus/es')['ElButton']
|
||||
ElButtonGroup: typeof import('element-plus/es')['ElButtonGroup']
|
||||
ElCard: typeof import('element-plus/es')['ElCard']
|
||||
ElCheckbox: typeof import('element-plus/es')['ElCheckbox']
|
||||
ElCol: typeof import('element-plus/es')['ElCol']
|
||||
ElCollapse: typeof import('element-plus/es')['ElCollapse']
|
||||
ElCollapseItem: typeof import('element-plus/es')['ElCollapseItem']
|
||||
ElColorPicker: typeof import('element-plus/es')['ElColorPicker']
|
||||
ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider']
|
||||
ElDatePicker: typeof import('element-plus/es')['ElDatePicker']
|
||||
ElDescriptions: typeof import('element-plus/es')['ElDescriptions']
|
||||
ElDescriptionsItem: typeof import('element-plus/es')['ElDescriptionsItem']
|
||||
ElDialog: typeof import('element-plus/es')['ElDialog']
|
||||
ElDivider: typeof import('element-plus/es')['ElDivider']
|
||||
ElDrawer: typeof import('element-plus/es')['ElDrawer']
|
||||
ElDropdown: typeof import('element-plus/es')['ElDropdown']
|
||||
ElDropdownItem: typeof import('element-plus/es')['ElDropdownItem']
|
||||
ElDropdownMenu: typeof import('element-plus/es')['ElDropdownMenu']
|
||||
ElEmpty: typeof import('element-plus/es')['ElEmpty']
|
||||
ElForm: typeof import('element-plus/es')['ElForm']
|
||||
ElFormItem: typeof import('element-plus/es')['ElFormItem']
|
||||
ElIcon: typeof import('element-plus/es')['ElIcon']
|
||||
ElInput: typeof import('element-plus/es')['ElInput']
|
||||
ElInputNumber: typeof import('element-plus/es')['ElInputNumber']
|
||||
ElMenu: typeof import('element-plus/es')['ElMenu']
|
||||
ElMenuItem: typeof import('element-plus/es')['ElMenuItem']
|
||||
ElOption: typeof import('element-plus/es')['ElOption']
|
||||
ElPagination: typeof import('element-plus/es')['ElPagination']
|
||||
ElPopconfirm: typeof import('element-plus/es')['ElPopconfirm']
|
||||
ElPopover: typeof import('element-plus/es')['ElPopover']
|
||||
ElRadio: typeof import('element-plus/es')['ElRadio']
|
||||
ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup']
|
||||
ElRow: typeof import('element-plus/es')['ElRow']
|
||||
ElScrollbar: typeof import('element-plus/es')['ElScrollbar']
|
||||
ElSegmented: typeof import('element-plus/es')['ElSegmented']
|
||||
ElSelect: typeof import('element-plus/es')['ElSelect']
|
||||
ElSpace: typeof import('element-plus/es')['ElSpace']
|
||||
ElStatistic: typeof import('element-plus/es')['ElStatistic']
|
||||
ElSubMenu: typeof import('element-plus/es')['ElSubMenu']
|
||||
ElSwitch: typeof import('element-plus/es')['ElSwitch']
|
||||
ElTable: typeof import('element-plus/es')['ElTable']
|
||||
ElTableColumn: typeof import('element-plus/es')['ElTableColumn']
|
||||
ElTabPane: typeof import('element-plus/es')['ElTabPane']
|
||||
ElTabs: typeof import('element-plus/es')['ElTabs']
|
||||
ElTag: typeof import('element-plus/es')['ElTag']
|
||||
ElTimeline: typeof import('element-plus/es')['ElTimeline']
|
||||
ElTimelineItem: typeof import('element-plus/es')['ElTimelineItem']
|
||||
ElTooltip: typeof import('element-plus/es')['ElTooltip']
|
||||
ElTree: typeof import('element-plus/es')['ElTree']
|
||||
ElTreeSelect: typeof import('element-plus/es')['ElTreeSelect']
|
||||
ElWatermark: typeof import('element-plus/es')['ElWatermark']
|
||||
ExceptionBase: typeof import('./../components/common/exception-base.vue')['default']
|
||||
FullScreen: typeof import('./../components/common/full-screen.vue')['default']
|
||||
GithubLink: typeof import('./../components/custom/github-link.vue')['default']
|
||||
IconAntDesignEnterOutlined: typeof import('~icons/ant-design/enter-outlined')['default']
|
||||
IconAntDesignReloadOutlined: typeof import('~icons/ant-design/reload-outlined')['default']
|
||||
IconAntDesignSettingOutlined: typeof import('~icons/ant-design/setting-outlined')['default']
|
||||
IconCarbonAdd: typeof import('~icons/carbon/add')['default']
|
||||
IconCarbonPlay: typeof import('~icons/carbon/play')['default']
|
||||
IconCarbonStop: typeof import('~icons/carbon/stop')['default']
|
||||
'IconCharm:download': typeof import('~icons/charm/download')['default']
|
||||
IconEpRemoveFilled: typeof import('~icons/ep/remove-filled')['default']
|
||||
IconEpSuccessFilled: typeof import('~icons/ep/success-filled')['default']
|
||||
'IconF7:circleFill': typeof import('~icons/f7/circle-fill')['default']
|
||||
'IconF7:flagCircleFill': typeof import('~icons/f7/flag-circle-fill')['default']
|
||||
'IconFe:question': typeof import('~icons/fe/question')['default']
|
||||
'IconFileIcons:microsoftExcel': typeof import('~icons/file-icons/microsoft-excel')['default']
|
||||
'IconGg:ratio': typeof import('~icons/gg/ratio')['default']
|
||||
IconGridiconsFullscreen: typeof import('~icons/gridicons/fullscreen')['default']
|
||||
IconGridiconsFullscreenExit: typeof import('~icons/gridicons/fullscreen-exit')['default']
|
||||
'IconIc:roundPlus': typeof import('~icons/ic/round-plus')['default']
|
||||
'IconIconParkOutline:equalRatio': typeof import('~icons/icon-park-outline/equal-ratio')['default']
|
||||
IconIcRoundDelete: typeof import('~icons/ic/round-delete')['default']
|
||||
IconIcRoundPlus: typeof import('~icons/ic/round-plus')['default']
|
||||
IconIcRoundRefresh: typeof import('~icons/ic/round-refresh')['default']
|
||||
IconIcRoundRemove: typeof import('~icons/ic/round-remove')['default']
|
||||
IconIcRoundSearch: typeof import('~icons/ic/round-search')['default']
|
||||
IconLocalActivity: typeof import('~icons/local/activity')['default']
|
||||
IconLocalBanner: typeof import('~icons/local/banner')['default']
|
||||
IconLocalCast: typeof import('~icons/local/cast')['default']
|
||||
IconLocalLogo: typeof import('~icons/local/logo')['default']
|
||||
'IconMaterialSymbolsLight:rotate90DegreesCcwOutlineRounded': typeof import('~icons/material-symbols-light/rotate90-degrees-ccw-outline-rounded')['default']
|
||||
'IconMdi:printer': typeof import('~icons/mdi/printer')['default']
|
||||
IconMdiAccountTieOutline: typeof import('~icons/mdi/account-tie-outline')['default']
|
||||
IconMdiArrowDownThin: typeof import('~icons/mdi/arrow-down-thin')['default']
|
||||
IconMdiArrowUpThin: typeof import('~icons/mdi/arrow-up-thin')['default']
|
||||
IconMdiCheck: typeof import('~icons/mdi/check')['default']
|
||||
IconMdiChevronDoubleDown: typeof import('~icons/mdi/chevron-double-down')['default']
|
||||
IconMdiChevronDoubleUp: typeof import('~icons/mdi/chevron-double-up')['default']
|
||||
IconMdiChevronDown: typeof import('~icons/mdi/chevron-down')['default']
|
||||
IconMdiDeleteOutline: typeof import('~icons/mdi/delete-outline')['default']
|
||||
IconMdiDrag: typeof import('~icons/mdi/drag')['default']
|
||||
IconMdiFilterVariant: typeof import('~icons/mdi/filter-variant')['default']
|
||||
IconMdiKeyboardEsc: typeof import('~icons/mdi/keyboard-esc')['default']
|
||||
IconMdiKeyboardReturn: typeof import('~icons/mdi/keyboard-return')['default']
|
||||
IconMdiPencilOutline: typeof import('~icons/mdi/pencil-outline')['default']
|
||||
IconMdiPlus: typeof import('~icons/mdi/plus')['default']
|
||||
IconMdiRefresh: typeof import('~icons/mdi/refresh')['default']
|
||||
'IconMingcute:zoomInLine': typeof import('~icons/mingcute/zoom-in-line')['default']
|
||||
'IconMingcute:zoomOutLine': typeof import('~icons/mingcute/zoom-out-line')['default']
|
||||
IconUilSearch: typeof import('~icons/uil/search')['default']
|
||||
LangSwitch: typeof import('./../components/common/lang-switch.vue')['default']
|
||||
LookForward: typeof import('./../components/custom/look-forward.vue')['default']
|
||||
MenuToggler: typeof import('./../components/common/menu-toggler.vue')['default']
|
||||
PinToggler: typeof import('./../components/common/pin-toggler.vue')['default']
|
||||
ReloadButton: typeof import('./../components/common/reload-button.vue')['default']
|
||||
RouterLink: typeof import('vue-router')['RouterLink']
|
||||
RouterView: typeof import('vue-router')['RouterView']
|
||||
SoybeanAvatar: typeof import('./../components/custom/soybean-avatar.vue')['default']
|
||||
SvgIcon: typeof import('./../components/custom/svg-icon.vue')['default']
|
||||
SystemLogo: typeof import('./../components/common/system-logo.vue')['default']
|
||||
TableColumnSetting: typeof import('./../components/advanced/table-column-setting.vue')['default']
|
||||
TableHeaderOperation: typeof import('./../components/advanced/table-header-operation.vue')['default']
|
||||
TableSearchPanel: typeof import('./../components/custom/table-search-panel.vue')['default']
|
||||
ThemeSchemaSwitch: typeof import('./../components/common/theme-schema-switch.vue')['default']
|
||||
WaveBg: typeof import('./../components/custom/wave-bg.vue')['default']
|
||||
WebSiteLink: typeof import('./../components/custom/web-site-link.vue')['default']
|
||||
}
|
||||
export interface GlobalDirectives {
|
||||
vLoading: typeof import('element-plus/es')['ElLoadingDirective']
|
||||
}
|
||||
}
|
||||
329
src/typings/elegant-router.d.ts
vendored
Normal file
329
src/typings/elegant-router.d.ts
vendored
Normal file
@@ -0,0 +1,329 @@
|
||||
/* eslint-disable */
|
||||
/* prettier-ignore */
|
||||
// Generated by elegant-router
|
||||
// Read more: https://github.com/soybeanjs/elegant-router
|
||||
|
||||
declare module "@elegant-router/types" {
|
||||
type ElegantConstRoute = import('@elegant-router/vue').ElegantConstRoute;
|
||||
|
||||
/**
|
||||
* route layout
|
||||
*/
|
||||
export type RouteLayout = "base" | "blank";
|
||||
|
||||
/**
|
||||
* route map
|
||||
*/
|
||||
export type RouteMap = {
|
||||
"root": "/";
|
||||
"not-found": "/:pathMatch(.*)*";
|
||||
"exception": "/exception";
|
||||
"exception_403": "/exception/403";
|
||||
"exception_404": "/exception/404";
|
||||
"exception_500": "/exception/500";
|
||||
"403": "/403";
|
||||
"404": "/404";
|
||||
"500": "/500";
|
||||
"function": "/function";
|
||||
"function_hide-child": "/function/hide-child";
|
||||
"function_hide-child_one": "/function/hide-child/one";
|
||||
"function_hide-child_three": "/function/hide-child/three";
|
||||
"function_hide-child_two": "/function/hide-child/two";
|
||||
"function_multi-tab": "/function/multi-tab";
|
||||
"function_request": "/function/request";
|
||||
"function_super-page": "/function/super-page";
|
||||
"function_tab": "/function/tab";
|
||||
"function_toggle-auth": "/function/toggle-auth";
|
||||
"iframe-page": "/iframe-page/:url";
|
||||
"login": "/login/:module(pwd-login|reset-pwd)?";
|
||||
"plugin": "/plugin";
|
||||
"plugin_barcode": "/plugin/barcode";
|
||||
"plugin_charts": "/plugin/charts";
|
||||
"plugin_charts_antv": "/plugin/charts/antv";
|
||||
"plugin_charts_echarts": "/plugin/charts/echarts";
|
||||
"plugin_charts_vchart": "/plugin/charts/vchart";
|
||||
"plugin_copy": "/plugin/copy";
|
||||
"plugin_editor": "/plugin/editor";
|
||||
"plugin_editor_markdown": "/plugin/editor/markdown";
|
||||
"plugin_editor_quill": "/plugin/editor/quill";
|
||||
"plugin_excel": "/plugin/excel";
|
||||
"plugin_gantt": "/plugin/gantt";
|
||||
"plugin_gantt_dhtmlx": "/plugin/gantt/dhtmlx";
|
||||
"plugin_gantt_vtable": "/plugin/gantt/vtable";
|
||||
"plugin_icon": "/plugin/icon";
|
||||
"plugin_map": "/plugin/map";
|
||||
"plugin_pdf": "/plugin/pdf";
|
||||
"plugin_pinyin": "/plugin/pinyin";
|
||||
"plugin_print": "/plugin/print";
|
||||
"plugin_swiper": "/plugin/swiper";
|
||||
"plugin_tables": "/plugin/tables";
|
||||
"plugin_tables_vtable": "/plugin/tables/vtable";
|
||||
"plugin_typeit": "/plugin/typeit";
|
||||
"plugin_video": "/plugin/video";
|
||||
"system": "/system";
|
||||
"system_dict": "/system/dict";
|
||||
"system_menu": "/system/menu";
|
||||
"system_post": "/system/post";
|
||||
"system_role": "/system/role";
|
||||
"system_user": "/system/user";
|
||||
"system_user-detail": "/system/user-detail/:id";
|
||||
"user-center": "/user-center";
|
||||
};
|
||||
|
||||
/**
|
||||
* route key
|
||||
*/
|
||||
export type RouteKey = keyof RouteMap;
|
||||
|
||||
/**
|
||||
* route path
|
||||
*/
|
||||
export type RoutePath = RouteMap[RouteKey];
|
||||
|
||||
/**
|
||||
* custom route key
|
||||
*/
|
||||
export type CustomRouteKey = Extract<
|
||||
RouteKey,
|
||||
| "root"
|
||||
| "not-found"
|
||||
| "exception"
|
||||
| "exception_403"
|
||||
| "exception_404"
|
||||
| "exception_500"
|
||||
>;
|
||||
|
||||
/**
|
||||
* the generated route key
|
||||
*/
|
||||
export type GeneratedRouteKey = Exclude<RouteKey, CustomRouteKey>;
|
||||
|
||||
/**
|
||||
* the first level route key, which contain the layout of the route
|
||||
*/
|
||||
export type FirstLevelRouteKey = Extract<
|
||||
RouteKey,
|
||||
| "403"
|
||||
| "404"
|
||||
| "500"
|
||||
| "function"
|
||||
| "iframe-page"
|
||||
| "login"
|
||||
| "plugin"
|
||||
| "system"
|
||||
| "user-center"
|
||||
>;
|
||||
|
||||
/**
|
||||
* the custom first level route key
|
||||
*/
|
||||
export type CustomFirstLevelRouteKey = Extract<
|
||||
CustomRouteKey,
|
||||
| "root"
|
||||
| "not-found"
|
||||
| "exception"
|
||||
>;
|
||||
|
||||
/**
|
||||
* the last level route key, which has the page file
|
||||
*/
|
||||
export type LastLevelRouteKey = Extract<
|
||||
RouteKey,
|
||||
| "403"
|
||||
| "404"
|
||||
| "500"
|
||||
| "iframe-page"
|
||||
| "login"
|
||||
| "function_hide-child_one"
|
||||
| "function_hide-child_three"
|
||||
| "function_hide-child_two"
|
||||
| "function_multi-tab"
|
||||
| "function_request"
|
||||
| "function_super-page"
|
||||
| "function_tab"
|
||||
| "function_toggle-auth"
|
||||
| "plugin_barcode"
|
||||
| "plugin_charts_antv"
|
||||
| "plugin_charts_echarts"
|
||||
| "plugin_charts_vchart"
|
||||
| "plugin_copy"
|
||||
| "plugin_editor_markdown"
|
||||
| "plugin_editor_quill"
|
||||
| "plugin_excel"
|
||||
| "plugin_gantt_dhtmlx"
|
||||
| "plugin_gantt_vtable"
|
||||
| "plugin_icon"
|
||||
| "plugin_map"
|
||||
| "plugin_pdf"
|
||||
| "plugin_pinyin"
|
||||
| "plugin_print"
|
||||
| "plugin_swiper"
|
||||
| "plugin_tables_vtable"
|
||||
| "plugin_typeit"
|
||||
| "plugin_video"
|
||||
| "system_dict"
|
||||
| "system_menu"
|
||||
| "system_post"
|
||||
| "system_role"
|
||||
| "system_user-detail"
|
||||
| "system_user"
|
||||
| "user-center"
|
||||
>;
|
||||
|
||||
/**
|
||||
* the custom last level route key
|
||||
*/
|
||||
export type CustomLastLevelRouteKey = Extract<
|
||||
CustomRouteKey,
|
||||
| "root"
|
||||
| "not-found"
|
||||
| "exception_403"
|
||||
| "exception_404"
|
||||
| "exception_500"
|
||||
>;
|
||||
|
||||
/**
|
||||
* the single level route key
|
||||
*/
|
||||
export type SingleLevelRouteKey = FirstLevelRouteKey & LastLevelRouteKey;
|
||||
|
||||
/**
|
||||
* the custom single level route key
|
||||
*/
|
||||
export type CustomSingleLevelRouteKey = CustomFirstLevelRouteKey & CustomLastLevelRouteKey;
|
||||
|
||||
/**
|
||||
* the first level route key, but not the single level
|
||||
*/
|
||||
export type FirstLevelRouteNotSingleKey = Exclude<FirstLevelRouteKey, SingleLevelRouteKey>;
|
||||
|
||||
/**
|
||||
* the custom first level route key, but not the single level
|
||||
*/
|
||||
export type CustomFirstLevelRouteNotSingleKey = Exclude<CustomFirstLevelRouteKey, CustomSingleLevelRouteKey>;
|
||||
|
||||
/**
|
||||
* the center level route key
|
||||
*/
|
||||
export type CenterLevelRouteKey = Exclude<GeneratedRouteKey, FirstLevelRouteKey | LastLevelRouteKey>;
|
||||
|
||||
/**
|
||||
* the custom center level route key
|
||||
*/
|
||||
export type CustomCenterLevelRouteKey = Exclude<CustomRouteKey, CustomFirstLevelRouteKey | CustomLastLevelRouteKey>;
|
||||
|
||||
/**
|
||||
* the center level route key
|
||||
*/
|
||||
type GetChildRouteKey<K extends RouteKey, T extends RouteKey = RouteKey> = T extends `${K}_${infer R}`
|
||||
? R extends `${string}_${string}`
|
||||
? never
|
||||
: T
|
||||
: never;
|
||||
|
||||
/**
|
||||
* the single level route
|
||||
*/
|
||||
type SingleLevelRoute<K extends SingleLevelRouteKey = SingleLevelRouteKey> = K extends string
|
||||
? Omit<ElegantConstRoute, 'children'> & {
|
||||
name: K;
|
||||
path: RouteMap[K];
|
||||
component: `layout.${RouteLayout}$view.${K}`;
|
||||
}
|
||||
: never;
|
||||
|
||||
/**
|
||||
* the last level route
|
||||
*/
|
||||
type LastLevelRoute<K extends GeneratedRouteKey> = K extends LastLevelRouteKey
|
||||
? Omit<ElegantConstRoute, 'children'> & {
|
||||
name: K;
|
||||
path: RouteMap[K];
|
||||
component: `view.${K}`;
|
||||
}
|
||||
: never;
|
||||
|
||||
/**
|
||||
* the center level route
|
||||
*/
|
||||
type CenterLevelRoute<K extends GeneratedRouteKey> = K extends CenterLevelRouteKey
|
||||
? Omit<ElegantConstRoute, 'component'> & {
|
||||
name: K;
|
||||
path: RouteMap[K];
|
||||
children: (CenterLevelRoute<GetChildRouteKey<K>> | LastLevelRoute<GetChildRouteKey<K>>)[];
|
||||
}
|
||||
: never;
|
||||
|
||||
/**
|
||||
* the multi level route
|
||||
*/
|
||||
type MultiLevelRoute<K extends FirstLevelRouteNotSingleKey = FirstLevelRouteNotSingleKey> = K extends string
|
||||
? ElegantConstRoute & {
|
||||
name: K;
|
||||
path: RouteMap[K];
|
||||
component: `layout.${RouteLayout}`;
|
||||
children: (CenterLevelRoute<GetChildRouteKey<K>> | LastLevelRoute<GetChildRouteKey<K>>)[];
|
||||
}
|
||||
: never;
|
||||
|
||||
/**
|
||||
* the custom first level route
|
||||
*/
|
||||
type CustomSingleLevelRoute<K extends CustomFirstLevelRouteKey = CustomFirstLevelRouteKey> = K extends string
|
||||
? Omit<ElegantConstRoute, 'children'> & {
|
||||
name: K;
|
||||
path: RouteMap[K];
|
||||
component?: `layout.${RouteLayout}$view.${LastLevelRouteKey}`;
|
||||
}
|
||||
: never;
|
||||
|
||||
/**
|
||||
* the custom last level route
|
||||
*/
|
||||
type CustomLastLevelRoute<K extends CustomRouteKey> = K extends CustomLastLevelRouteKey
|
||||
? Omit<ElegantConstRoute, 'children'> & {
|
||||
name: K;
|
||||
path: RouteMap[K];
|
||||
component?: `view.${LastLevelRouteKey}`;
|
||||
}
|
||||
: never;
|
||||
|
||||
/**
|
||||
* the custom center level route
|
||||
*/
|
||||
type CustomCenterLevelRoute<K extends CustomRouteKey> = K extends CustomCenterLevelRouteKey
|
||||
? Omit<ElegantConstRoute, 'component'> & {
|
||||
name: K;
|
||||
path: RouteMap[K];
|
||||
children: (CustomCenterLevelRoute<GetChildRouteKey<K>> | CustomLastLevelRoute<GetChildRouteKey<K>>)[];
|
||||
}
|
||||
: never;
|
||||
|
||||
/**
|
||||
* the custom multi level route
|
||||
*/
|
||||
type CustomMultiLevelRoute<K extends CustomFirstLevelRouteNotSingleKey = CustomFirstLevelRouteNotSingleKey> =
|
||||
K extends string
|
||||
? ElegantConstRoute & {
|
||||
name: K;
|
||||
path: RouteMap[K];
|
||||
component: `layout.${RouteLayout}`;
|
||||
children: (CustomCenterLevelRoute<GetChildRouteKey<K>> | CustomLastLevelRoute<GetChildRouteKey<K>>)[];
|
||||
}
|
||||
: never;
|
||||
|
||||
/**
|
||||
* the custom route
|
||||
*/
|
||||
type CustomRoute = CustomSingleLevelRoute | CustomMultiLevelRoute;
|
||||
|
||||
/**
|
||||
* the generated route
|
||||
*/
|
||||
type GeneratedRoute = SingleLevelRoute | MultiLevelRoute;
|
||||
|
||||
/**
|
||||
* the elegant route
|
||||
*/
|
||||
type ElegantRoute = GeneratedRoute | CustomRoute;
|
||||
}
|
||||
17
src/typings/global.d.ts
vendored
Normal file
17
src/typings/global.d.ts
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
export {};
|
||||
|
||||
declare global {
|
||||
export interface Window {
|
||||
/** NProgress instance */
|
||||
NProgress?: import('nprogress').NProgress;
|
||||
/** MessageBox instance */
|
||||
$messageBox?: import('element-plus').IElMessageBox;
|
||||
/** Message instance */
|
||||
$message?: import('element-plus').Message;
|
||||
/** Notification instance */
|
||||
$notification?: import('element-plus').Notify;
|
||||
}
|
||||
|
||||
/** Build time of the project */
|
||||
export const BUILD_TIME: string;
|
||||
}
|
||||
20
src/typings/package.d.ts
vendored
Normal file
20
src/typings/package.d.ts
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
/// <reference types="@amap/amap-jsapi-types" />
|
||||
/// <reference types="bmapgl" />
|
||||
|
||||
declare namespace BMap {
|
||||
class Map extends BMapGL.Map {}
|
||||
class Point extends BMapGL.Point {}
|
||||
}
|
||||
|
||||
declare const TMap: any;
|
||||
|
||||
interface Window {
|
||||
/**
|
||||
* make baidu map request under https protocol
|
||||
*
|
||||
* - 0: http
|
||||
* - 1: https
|
||||
* - 2: https
|
||||
*/
|
||||
HOST_TYPE: '0' | '1' | '2';
|
||||
}
|
||||
72
src/typings/router.d.ts
vendored
Normal file
72
src/typings/router.d.ts
vendored
Normal file
@@ -0,0 +1,72 @@
|
||||
import 'vue-router';
|
||||
|
||||
declare module 'vue-router' {
|
||||
interface RouteMeta {
|
||||
/**
|
||||
* Title of the route
|
||||
*
|
||||
* It can be used in document title
|
||||
*/
|
||||
title: string;
|
||||
/**
|
||||
* I18n key of the route
|
||||
*
|
||||
* It's used in i18n, if it is set, the title will be ignored
|
||||
*/
|
||||
i18nKey?: App.I18n.I18nKey | null;
|
||||
/**
|
||||
* Roles of the route
|
||||
*
|
||||
* Route can be accessed if the current user has at least one of the roles
|
||||
*
|
||||
* It only works when the route mode is "static", if the route mode is "dynamic", it will be ignored
|
||||
*/
|
||||
roles?: string[];
|
||||
/** Whether to cache the route */
|
||||
keepAlive?: boolean | undefined;
|
||||
/**
|
||||
* Is constant route
|
||||
*
|
||||
* when it is set to true, there will be no login verification and no permission verification to access the route
|
||||
*/
|
||||
constant?: boolean | undefined;
|
||||
/**
|
||||
* Iconify icon
|
||||
*
|
||||
* It can be used in the menu or breadcrumb
|
||||
*/
|
||||
icon?: string;
|
||||
/**
|
||||
* Local icon
|
||||
*
|
||||
* In "src/assets/svg-icon", if it is set, the icon will be ignored
|
||||
*/
|
||||
localIcon?: string;
|
||||
/** Icon size. width and height are the same. */
|
||||
iconFontSize?: number;
|
||||
/** Router order */
|
||||
order?: number | undefined;
|
||||
/** The outer link of the route */
|
||||
href?: string | null;
|
||||
/** Whether to hide the route in the menu */
|
||||
hideInMenu?: boolean | undefined;
|
||||
/**
|
||||
* The menu key will be activated when entering the route
|
||||
*
|
||||
* The route is not in the menu
|
||||
*
|
||||
* @example
|
||||
* the route is "user_detail", if it is set to "user_list", the menu "user_list" will be activated
|
||||
*/
|
||||
activeMenu?: import('@elegant-router/types').RouteKey | undefined;
|
||||
/**
|
||||
* By default, the same route path will use one tab, even with different query, if set true, the route with
|
||||
* different query will use different tabs
|
||||
*/
|
||||
multiTab?: boolean | undefined;
|
||||
/** If set, the route will be fixed in tabs, and the value is the order of fixed tabs */
|
||||
fixedIndexInTab?: number | undefined;
|
||||
/** if set query parameters, it will be automatically carried when entering the route */
|
||||
query?: { key: string; value: string }[] | null;
|
||||
}
|
||||
}
|
||||
44
src/typings/storage.d.ts
vendored
Normal file
44
src/typings/storage.d.ts
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
/** The storage namespace */
|
||||
declare namespace StorageType {
|
||||
interface Session {
|
||||
/** The theme color */
|
||||
themeColor: string;
|
||||
// /**
|
||||
// * the theme settings
|
||||
// */
|
||||
// themeSettings: App.Theme.ThemeSetting;
|
||||
}
|
||||
|
||||
interface Local {
|
||||
/** The i18n language */
|
||||
lang: App.I18n.LangType;
|
||||
/** The token */
|
||||
token: string;
|
||||
/** Fixed sider with mix-menu */
|
||||
mixSiderFixed: CommonType.YesOrNo;
|
||||
/** The refresh token */
|
||||
refreshToken: string;
|
||||
/** The theme color */
|
||||
themeColor: string;
|
||||
/** The dark mode */
|
||||
darkMode: boolean;
|
||||
/** The theme settings */
|
||||
themeSettings: App.Theme.ThemeSetting;
|
||||
/**
|
||||
* The override theme flags
|
||||
*
|
||||
* The value is the build time of the project
|
||||
*/
|
||||
overrideThemeFlag: string;
|
||||
/** The global tabs */
|
||||
globalTabs: App.Global.Tab[];
|
||||
/** The backup theme setting before is mobile */
|
||||
backupThemeSettingBeforeIsMobile: {
|
||||
layout: UnionKey.ThemeLayoutMode;
|
||||
siderCollapse: boolean;
|
||||
};
|
||||
|
||||
/** The last login user id */
|
||||
lastLoginUserId: string;
|
||||
}
|
||||
}
|
||||
33
src/typings/ui.d.ts
vendored
Normal file
33
src/typings/ui.d.ts
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
declare namespace UI {
|
||||
type ThemeColor = 'danger' | 'primary' | 'info' | 'success' | 'warning';
|
||||
|
||||
type DataTableBaseColumn<T> = Partial<import('element-plus').TableColumnCtx<T extends object ? T : never>>;
|
||||
|
||||
type TableColumnCheck = import('@sa/hooks').TableColumnCheck;
|
||||
|
||||
type SetTableColumnKey<C, T> = Omit<C, 'prop'> & { prop?: keyof T | (string & {}) };
|
||||
|
||||
type TableColumnWithKey<T> = SetTableColumnKey<DataTableBaseColumn<T>, T>;
|
||||
|
||||
type TableColumn<T> = DataTableBaseColumn<T>;
|
||||
|
||||
/**
|
||||
* the type of table operation
|
||||
*
|
||||
* - add: add table item
|
||||
* - edit: edit table item
|
||||
*/
|
||||
type TableOperateType = 'add' | 'edit';
|
||||
}
|
||||
|
||||
// ======================================== element-plus ========================================
|
||||
|
||||
declare module 'element-plus/dist/locale/zh-cn.mjs' {
|
||||
const locale: any;
|
||||
export default locale;
|
||||
}
|
||||
|
||||
declare module 'element-plus/dist/locale/en.mjs' {
|
||||
const locale: any;
|
||||
export default locale;
|
||||
}
|
||||
146
src/typings/union-key.d.ts
vendored
Normal file
146
src/typings/union-key.d.ts
vendored
Normal file
@@ -0,0 +1,146 @@
|
||||
/** The union key namespace */
|
||||
declare namespace UnionKey {
|
||||
/**
|
||||
* The login module
|
||||
*
|
||||
* - pwd-login: password login
|
||||
* - reset-pwd: reset password
|
||||
*/
|
||||
type LoginModule = 'pwd-login' | 'reset-pwd';
|
||||
|
||||
/** Theme scheme */
|
||||
type ThemeScheme = 'light' | 'dark' | 'auto';
|
||||
|
||||
/**
|
||||
* The layout mode
|
||||
*
|
||||
* - vertical: the vertical menu in left
|
||||
* - horizontal: the horizontal menu in top
|
||||
* - vertical-mix: two vertical mixed menus in left
|
||||
* - horizontal-mix: the vertical first level menus in left and horizontal child level menus in top
|
||||
*/
|
||||
type ThemeLayoutMode = 'vertical' | 'horizontal' | 'vertical-mix' | 'horizontal-mix';
|
||||
|
||||
/**
|
||||
* The scroll mode when content overflow
|
||||
*
|
||||
* - wrapper: the wrapper component's root element overflow
|
||||
* - content: the content component overflow
|
||||
*/
|
||||
type ThemeScrollMode = import('@sa/materials').LayoutScrollMode;
|
||||
|
||||
/** Page animate mode */
|
||||
type ThemePageAnimateMode = 'fade' | 'fade-slide' | 'fade-bottom' | 'fade-scale' | 'zoom-fade' | 'zoom-out' | 'none';
|
||||
|
||||
/**
|
||||
* Tab mode
|
||||
*
|
||||
* - chrome: chrome style
|
||||
* - button: button style
|
||||
*/
|
||||
type ThemeTabMode = import('@sa/materials').PageTabMode;
|
||||
|
||||
/** Unocss animate key */
|
||||
type UnoCssAnimateKey =
|
||||
| 'pulse'
|
||||
| 'bounce'
|
||||
| 'spin'
|
||||
| 'ping'
|
||||
| 'bounce-alt'
|
||||
| 'flash'
|
||||
| 'pulse-alt'
|
||||
| 'rubber-band'
|
||||
| 'shake-x'
|
||||
| 'shake-y'
|
||||
| 'head-shake'
|
||||
| 'swing'
|
||||
| 'tada'
|
||||
| 'wobble'
|
||||
| 'jello'
|
||||
| 'heart-beat'
|
||||
| 'hinge'
|
||||
| 'jack-in-the-box'
|
||||
| 'light-speed-in-left'
|
||||
| 'light-speed-in-right'
|
||||
| 'light-speed-out-left'
|
||||
| 'light-speed-out-right'
|
||||
| 'flip'
|
||||
| 'flip-in-x'
|
||||
| 'flip-in-y'
|
||||
| 'flip-out-x'
|
||||
| 'flip-out-y'
|
||||
| 'rotate-in'
|
||||
| 'rotate-in-down-left'
|
||||
| 'rotate-in-down-right'
|
||||
| 'rotate-in-up-left'
|
||||
| 'rotate-in-up-right'
|
||||
| 'rotate-out'
|
||||
| 'rotate-out-down-left'
|
||||
| 'rotate-out-down-right'
|
||||
| 'rotate-out-up-left'
|
||||
| 'rotate-out-up-right'
|
||||
| 'roll-in'
|
||||
| 'roll-out'
|
||||
| 'zoom-in'
|
||||
| 'zoom-in-down'
|
||||
| 'zoom-in-left'
|
||||
| 'zoom-in-right'
|
||||
| 'zoom-in-up'
|
||||
| 'zoom-out'
|
||||
| 'zoom-out-down'
|
||||
| 'zoom-out-left'
|
||||
| 'zoom-out-right'
|
||||
| 'zoom-out-up'
|
||||
| 'bounce-in'
|
||||
| 'bounce-in-down'
|
||||
| 'bounce-in-left'
|
||||
| 'bounce-in-right'
|
||||
| 'bounce-in-up'
|
||||
| 'bounce-out'
|
||||
| 'bounce-out-down'
|
||||
| 'bounce-out-left'
|
||||
| 'bounce-out-right'
|
||||
| 'bounce-out-up'
|
||||
| 'slide-in-down'
|
||||
| 'slide-in-left'
|
||||
| 'slide-in-right'
|
||||
| 'slide-in-up'
|
||||
| 'slide-out-down'
|
||||
| 'slide-out-left'
|
||||
| 'slide-out-right'
|
||||
| 'slide-out-up'
|
||||
| 'fade-in'
|
||||
| 'fade-in-down'
|
||||
| 'fade-in-down-big'
|
||||
| 'fade-in-left'
|
||||
| 'fade-in-left-big'
|
||||
| 'fade-in-right'
|
||||
| 'fade-in-right-big'
|
||||
| 'fade-in-up'
|
||||
| 'fade-in-up-big'
|
||||
| 'fade-in-top-left'
|
||||
| 'fade-in-top-right'
|
||||
| 'fade-in-bottom-left'
|
||||
| 'fade-in-bottom-right'
|
||||
| 'fade-out'
|
||||
| 'fade-out-down'
|
||||
| 'fade-out-down-big'
|
||||
| 'fade-out-left'
|
||||
| 'fade-out-left-big'
|
||||
| 'fade-out-right'
|
||||
| 'fade-out-right-big'
|
||||
| 'fade-out-up'
|
||||
| 'fade-out-up-big'
|
||||
| 'fade-out-top-left'
|
||||
| 'fade-out-top-right'
|
||||
| 'fade-out-bottom-left'
|
||||
| 'fade-out-bottom-right'
|
||||
| 'back-in-up'
|
||||
| 'back-in-down'
|
||||
| 'back-in-right'
|
||||
| 'back-in-left'
|
||||
| 'back-out-up'
|
||||
| 'back-out-down'
|
||||
| 'back-out-right'
|
||||
| 'back-out-left';
|
||||
}
|
||||
118
src/typings/vite-env.d.ts
vendored
Normal file
118
src/typings/vite-env.d.ts
vendored
Normal file
@@ -0,0 +1,118 @@
|
||||
/**
|
||||
* Namespace Env
|
||||
*
|
||||
* It is used to declare the type of the import.meta object
|
||||
*/
|
||||
declare namespace Env {
|
||||
/** The router history mode */
|
||||
type RouterHistoryMode = 'hash' | 'history' | 'memory';
|
||||
|
||||
/** Interface for import.meta */
|
||||
// eslint-disable-next-line @typescript-eslint/no-shadow
|
||||
interface ImportMeta extends ImportMetaEnv {
|
||||
/** The base url of the application */
|
||||
readonly VITE_BASE_URL: string;
|
||||
/** The title of the application */
|
||||
readonly VITE_APP_TITLE: string;
|
||||
/** The description of the application */
|
||||
readonly VITE_APP_DESC: string;
|
||||
/** The router history mode */
|
||||
readonly VITE_ROUTER_HISTORY_MODE?: RouterHistoryMode;
|
||||
/** The prefix of the iconify icon */
|
||||
readonly VITE_ICON_PREFIX: 'icon';
|
||||
/**
|
||||
* The prefix of the local icon
|
||||
*
|
||||
* This prefix is start with the icon prefix
|
||||
*/
|
||||
readonly VITE_ICON_LOCAL_PREFIX: 'icon-local';
|
||||
/** backend service base url */
|
||||
readonly VITE_SERVICE_BASE_URL: string;
|
||||
/**
|
||||
* success code of backend service
|
||||
*
|
||||
* when the code is received, the request is successful
|
||||
*/
|
||||
readonly VITE_SERVICE_SUCCESS_CODE: string;
|
||||
/**
|
||||
* logout codes of backend service
|
||||
*
|
||||
* when the code is received, the user will be logged out and redirected to login page
|
||||
*
|
||||
* use "," to separate multiple codes
|
||||
*/
|
||||
readonly VITE_SERVICE_LOGOUT_CODES: string;
|
||||
/**
|
||||
* modal logout codes of backend service
|
||||
*
|
||||
* when the code is received, the user will be logged out by displaying a modal
|
||||
*
|
||||
* use "," to separate multiple codes
|
||||
*/
|
||||
readonly VITE_SERVICE_MODAL_LOGOUT_CODES: string;
|
||||
/**
|
||||
* token expired codes of backend service
|
||||
*
|
||||
* when the code is received, it will refresh the token and resend the request
|
||||
*
|
||||
* use "," to separate multiple codes
|
||||
*/
|
||||
readonly VITE_SERVICE_EXPIRED_TOKEN_CODES: string;
|
||||
/** when the route mode is static, the defined super role */
|
||||
readonly VITE_STATIC_SUPER_ROLE: string;
|
||||
/**
|
||||
* other backend service base url
|
||||
*
|
||||
* the value is a json
|
||||
*/
|
||||
readonly VITE_OTHER_SERVICE_BASE_URL: string;
|
||||
/**
|
||||
* Whether to enable the http proxy
|
||||
*
|
||||
* Only valid in the development environment
|
||||
*/
|
||||
readonly VITE_HTTP_PROXY?: CommonType.YesOrNo;
|
||||
/**
|
||||
* The auth route mode
|
||||
*
|
||||
* - Static: the auth routes is generated in front-end
|
||||
* - Dynamic: the auth routes is generated in back-end
|
||||
*/
|
||||
readonly VITE_AUTH_ROUTE_MODE: 'static' | 'dynamic';
|
||||
/**
|
||||
* The home route key
|
||||
*
|
||||
* It only has effect when the auth route mode is static, if the route mode is dynamic, the home route key is
|
||||
* defined in the back-end
|
||||
*/
|
||||
readonly VITE_ROUTE_HOME: import('@elegant-router/types').LastLevelRouteKey;
|
||||
/**
|
||||
* Default menu icon if menu icon is not set
|
||||
*
|
||||
* Iconify icon name
|
||||
*/
|
||||
readonly VITE_MENU_ICON: string;
|
||||
/** Whether to build with sourcemap */
|
||||
readonly VITE_SOURCE_MAP?: CommonType.YesOrNo;
|
||||
/**
|
||||
* Iconify api provider url
|
||||
*
|
||||
* If the project is deployed in intranet, you can set the api provider url to the local iconify server
|
||||
*
|
||||
* @link https://docs.iconify.design/api/providers.html
|
||||
*/
|
||||
readonly VITE_ICONIFY_URL?: string;
|
||||
/** Used to differentiate storage across different domains */
|
||||
readonly VITE_STORAGE_PREFIX?: string;
|
||||
/** show proxy url log in terminal */
|
||||
readonly VITE_PROXY_LOG?: CommonType.YesOrNo;
|
||||
/** Whether to enable vue devtools overlay in development */
|
||||
readonly VITE_DEVTOOLS_ENABLED?: CommonType.YesOrNo;
|
||||
/** The launch editor */
|
||||
readonly VITE_DEVTOOLS_LAUNCH_EDITOR?: import('vite-plugin-vue-devtools').VitePluginVueDevToolsOptions['launchEditor'];
|
||||
}
|
||||
}
|
||||
|
||||
interface ImportMeta {
|
||||
readonly env: Env.ImportMeta;
|
||||
}
|
||||
Reference in New Issue
Block a user