初始化项目
This commit is contained in:
40
src/typings/antd.d.ts
vendored
Normal file
40
src/typings/antd.d.ts
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
declare namespace AntDesign {
|
||||
type TableColumnType<T> = import('ant-design-vue').TableColumnType<T>;
|
||||
type TableColumnGroupType<T> = import('ant-design-vue').TableColumnGroupType<T>;
|
||||
type TablePaginationConfig = import('ant-design-vue').TablePaginationConfig;
|
||||
type TableColumnCheck = import('@sa/hooks').TableColumnCheck;
|
||||
type TableDataWithIndex<T> = import('@sa/hooks').TableDataWithIndex<T>;
|
||||
type FlatResponseData<T> = import('@sa/axios').FlatResponseData<T>;
|
||||
|
||||
type TableData<T = object> = Api.Common.CommonRecord<T>;
|
||||
|
||||
/**
|
||||
* the custom column key
|
||||
*
|
||||
* if you want to add a custom column, you should add a key to this type
|
||||
*/
|
||||
type CustomColumnKey = 'operate';
|
||||
|
||||
type SetTableColumnKey<C, T> = Omit<C, 'key'> & { key?: keyof T | CustomColumnKey };
|
||||
|
||||
type TableColumn<T> = SetTableColumnKey<TableColumnType<T>, T> | SetTableColumnKey<TableColumnGroupType<T>, T>;
|
||||
|
||||
type TableApiFn<T = any, R = Api.SystemManage.CommonSearchParams> = (
|
||||
params: R
|
||||
) => Promise<FlatResponseData<Api.Common.PaginatingQueryRecord<T>>>;
|
||||
|
||||
/**
|
||||
* the type of table operation
|
||||
*
|
||||
* - add: add table item
|
||||
* - edit: edit table item
|
||||
*/
|
||||
type TableOperateType = 'add' | 'edit';
|
||||
|
||||
type GetTableData<A extends TableApiFn> = A extends TableApiFn<infer T> ? T : never;
|
||||
|
||||
type AntDesignTableConfig<A extends TableApiFn> = Pick<
|
||||
import('@sa/hooks').TableConfig<A, GetTableData<A>, TableColumn<TableDataWithIndex<GetTableData<A>>>>,
|
||||
'apiFn' | 'apiParams' | 'columns' | 'immediate' | 'rowKey'
|
||||
>;
|
||||
}
|
||||
406
src/typings/api.d.ts
vendored
Normal file
406
src/typings/api.d.ts
vendored
Normal file
@@ -0,0 +1,406 @@
|
||||
/**
|
||||
* Namespace Api
|
||||
*
|
||||
* All backend api type
|
||||
*/
|
||||
declare namespace Api {
|
||||
namespace Common {
|
||||
/** common params of paginating */
|
||||
interface PaginatingCommonParams {
|
||||
/** total count */
|
||||
total: number;
|
||||
}
|
||||
|
||||
/** common params of paginating query list data */
|
||||
interface PaginatingQueryRecord<T = any> extends PaginatingCommonParams {
|
||||
rows: T[];
|
||||
}
|
||||
|
||||
/**
|
||||
* enable status
|
||||
*
|
||||
* - "0": enabled
|
||||
* - "1": disabled
|
||||
*/
|
||||
type EnableStatus = '1' | '0';
|
||||
|
||||
/** common record */
|
||||
type CommonRecord<T = any> = {
|
||||
/** record creator */
|
||||
createBy: string;
|
||||
/** record create time */
|
||||
createTime: string;
|
||||
/** record updater */
|
||||
updateBy: string;
|
||||
/** record update time */
|
||||
updateTime: string;
|
||||
/** record status */
|
||||
status: EnableStatus;
|
||||
} & T;
|
||||
|
||||
type CommonTree = {
|
||||
id: number;
|
||||
label: string;
|
||||
children?: CommonTree[];
|
||||
}[];
|
||||
}
|
||||
|
||||
namespace Department {
|
||||
interface Dept {
|
||||
createBy: any;
|
||||
createTime: any;
|
||||
updateBy: any;
|
||||
updateTime: any;
|
||||
remark: any;
|
||||
deptId: number;
|
||||
parentId: number;
|
||||
ancestors: string;
|
||||
deptName: string;
|
||||
orderNum: number;
|
||||
leader: string;
|
||||
phone: any;
|
||||
email: any;
|
||||
status: string;
|
||||
delFlag: any;
|
||||
parentName: any;
|
||||
children: any[];
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Namespace Auth
|
||||
*
|
||||
* Backend api module: "auth"
|
||||
*/
|
||||
namespace Auth {
|
||||
interface LoginToken {
|
||||
access_token: string;
|
||||
refreshToken: string;
|
||||
}
|
||||
/** User info */
|
||||
interface UserInfo {
|
||||
user: User | null;
|
||||
roles: string[];
|
||||
buttons: string[];
|
||||
/** permissions */
|
||||
permissions: string[];
|
||||
}
|
||||
|
||||
interface User {
|
||||
createBy: string;
|
||||
createTime: string;
|
||||
updateBy: any;
|
||||
updateTime: any;
|
||||
remark: string;
|
||||
userId: number;
|
||||
deptId: number;
|
||||
userName: string;
|
||||
nickName: string;
|
||||
email: string;
|
||||
phonenumber: string;
|
||||
sex: string;
|
||||
avatar: string;
|
||||
password: string;
|
||||
status: '0' | '1';
|
||||
delFlag: string;
|
||||
loginIp: string;
|
||||
loginDate: string;
|
||||
dept: Department.Dept;
|
||||
roles: Role[];
|
||||
roleId: string;
|
||||
postIds: number[];
|
||||
roleIds: number[];
|
||||
admin: boolean;
|
||||
}
|
||||
|
||||
interface Role {
|
||||
remark: any;
|
||||
roleId: number;
|
||||
roleName: string;
|
||||
roleKey: string;
|
||||
roleSort: number;
|
||||
dataScope: string;
|
||||
menuCheckStrictly: boolean;
|
||||
deptCheckStrictly: boolean;
|
||||
status: string;
|
||||
delFlag: '0' | '1';
|
||||
flag: boolean;
|
||||
menuIds: number[] | null;
|
||||
deptIds: number[] | null;
|
||||
permissions: any;
|
||||
admin: boolean;
|
||||
}
|
||||
|
||||
interface LoginBody {
|
||||
username: string;
|
||||
password: string;
|
||||
code: string;
|
||||
uuid: string;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Namespace Route
|
||||
*
|
||||
* Backend api module: "route"
|
||||
*/
|
||||
namespace Route {
|
||||
type ElegantConstRoute = import('@elegant-router/types').ElegantConstRoute;
|
||||
|
||||
interface MenuRoute extends ElegantConstRoute {
|
||||
id: string;
|
||||
}
|
||||
|
||||
interface UserRoute {
|
||||
routes: MenuRoute[];
|
||||
home: import('@elegant-router/types').LastLevelRouteKey;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* namespace SystemManage
|
||||
*
|
||||
* backend api module: "systemManage"
|
||||
*/
|
||||
namespace SystemManage {
|
||||
type CommonSearchParams = {
|
||||
/** page number */
|
||||
pageNum: number;
|
||||
/** page size */
|
||||
pageSize: number;
|
||||
};
|
||||
|
||||
/** role */
|
||||
type Role = Common.CommonRecord<{
|
||||
remark: string;
|
||||
roleId: number;
|
||||
roleName: string;
|
||||
roleKey: string;
|
||||
roleSort: number;
|
||||
dataScope: string;
|
||||
menuCheckStrictly: boolean;
|
||||
deptCheckStrictly: boolean;
|
||||
status: string;
|
||||
delFlag: '0' | '1';
|
||||
flag: boolean;
|
||||
menuIds: number[] | null;
|
||||
deptIds: number[] | null;
|
||||
permissions: string;
|
||||
admin: boolean;
|
||||
}>;
|
||||
|
||||
/** role search params */
|
||||
type RoleSearchParams = Partial<
|
||||
Pick<Api.SystemManage.Role, 'roleName' | 'roleKey' | 'status'> & CommonSearchParams
|
||||
>;
|
||||
|
||||
/** role list */
|
||||
type RoleList = Common.PaginatingQueryRecord<Role>;
|
||||
|
||||
/** all role */
|
||||
type AllRole = Pick<Role, 'roleId' | 'roleName' | 'remark' | 'roleKey'>;
|
||||
|
||||
/**
|
||||
* user gender
|
||||
*
|
||||
* - "1": "male"
|
||||
* - "2": "female"
|
||||
*/
|
||||
type UserGender = '1' | '2';
|
||||
|
||||
/** user */
|
||||
type UserInfo = Common.CommonRecord<{
|
||||
/** user name */
|
||||
username: string;
|
||||
/** user gender */
|
||||
userGender: UserGender | null;
|
||||
/** user nick name */
|
||||
nickName: string;
|
||||
/** user phone */
|
||||
userPhone: string;
|
||||
/** user email */
|
||||
userEmail: string;
|
||||
/** user role code collection */
|
||||
userRoles: string[];
|
||||
}>;
|
||||
|
||||
/** user search params */
|
||||
type UserSearchParams = Partial<
|
||||
Pick<Auth.User, 'userName' | 'nickName' | 'phonenumber' | 'status' | 'sex' | 'email' | 'deptId'> &
|
||||
CommonSearchParams
|
||||
>;
|
||||
|
||||
/** user list */
|
||||
type UserList = Common.PaginatingQueryRecord<Auth.User>;
|
||||
|
||||
type UserPostsAndRoles = {
|
||||
posts: Post[];
|
||||
roles: Role[];
|
||||
postIds: number[];
|
||||
roleIds: number[];
|
||||
};
|
||||
|
||||
/**
|
||||
* menu type
|
||||
*
|
||||
* - "1": directory
|
||||
* - "2": menu
|
||||
*/
|
||||
type MenuType = 'M' | 'C' | 'F';
|
||||
|
||||
type MenuButton = {
|
||||
/**
|
||||
* button code
|
||||
*
|
||||
* it can be used to control the button permission
|
||||
*/
|
||||
code: string;
|
||||
/** button description */
|
||||
desc: string;
|
||||
};
|
||||
|
||||
/**
|
||||
* icon type
|
||||
*
|
||||
* - "1": iconify icon
|
||||
* - "2": local icon
|
||||
*/
|
||||
type IconType = '1' | '2';
|
||||
|
||||
type Menu = Common.CommonRecord<{
|
||||
/** parent menu id */
|
||||
parentId: number;
|
||||
/** menu type */
|
||||
menuType: MenuType;
|
||||
/** menu name */
|
||||
menuName: string;
|
||||
/** route name */
|
||||
routeName: string;
|
||||
/** route path */
|
||||
routePath: string;
|
||||
/** component */
|
||||
component?: string;
|
||||
menuId: number;
|
||||
path: string;
|
||||
/**
|
||||
* i18n key
|
||||
*
|
||||
* it is for internationalization
|
||||
*/
|
||||
i18nKey?: App.I18n.I18nKey;
|
||||
/** iconify icon name or local icon name */
|
||||
icon: string;
|
||||
/** icon type */
|
||||
iconType: IconType;
|
||||
/** menu order */
|
||||
orderNum: number;
|
||||
/** whether to cache the route */
|
||||
keepAlive?: '0' | '1';
|
||||
/** outer link */
|
||||
href?: string;
|
||||
/** whether to retain the route */
|
||||
status: '0' | '1';
|
||||
/** whether to hide the route in the menu */
|
||||
hideInMenu?: '0' | '1';
|
||||
/**
|
||||
* 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').LastLevelRouteKey;
|
||||
/** By default, the same route path will use one tab, if set to true, it will use multiple tabs */
|
||||
multiTab?: boolean;
|
||||
/** If set, the route will be fixed in tabs, and the value is the order of fixed tabs */
|
||||
fixedIndexInTab?: number;
|
||||
/** menu buttons */
|
||||
buttons?: MenuButton[];
|
||||
/** children menu */
|
||||
children?: Menu[];
|
||||
/** is external link */
|
||||
isFrame: '0' | '1';
|
||||
/** perms to request api */
|
||||
perms: string;
|
||||
/** menu name(path combine) */
|
||||
name: string;
|
||||
isCache: '0' | '1';
|
||||
visible: '0' | '1';
|
||||
}>;
|
||||
|
||||
/** menu list */
|
||||
type MenuList = Common.PaginatingQueryRecord<Menu>;
|
||||
|
||||
type MenuTree = {
|
||||
id: number;
|
||||
label: string;
|
||||
pId: number;
|
||||
children?: MenuTree[];
|
||||
};
|
||||
|
||||
// dept api
|
||||
/** dept */
|
||||
type Dept = {
|
||||
createBy: string;
|
||||
createTime: string;
|
||||
updateBy: string;
|
||||
updateTime: string;
|
||||
remark: string;
|
||||
deptId: number;
|
||||
parentId: number;
|
||||
ancestors: string;
|
||||
deptName: string;
|
||||
orderNum: number;
|
||||
leader: string;
|
||||
phone: string;
|
||||
email: string;
|
||||
status: '0' | '1';
|
||||
delFlag: string;
|
||||
parentName: string;
|
||||
children: Dept[];
|
||||
};
|
||||
|
||||
type DeptList = Common.PaginatingQueryRecord<Dept>;
|
||||
|
||||
/** dept search params */
|
||||
type DeptSearchParams = Partial<Pick<Dept, 'deptName' | 'status'> & CommonSearchParams>;
|
||||
|
||||
// post api
|
||||
type Post = {
|
||||
createBy: string;
|
||||
createTime: string;
|
||||
updateBy: any;
|
||||
updateTime: any;
|
||||
remark: string;
|
||||
postId: number;
|
||||
postCode: string;
|
||||
postName: string;
|
||||
postSort: number;
|
||||
status: '0' | '1';
|
||||
flag: boolean;
|
||||
};
|
||||
|
||||
type PostSearchParams = Partial<Pick<Post, 'postName' | 'status' | 'postCode'> & CommonSearchParams>;
|
||||
|
||||
type PostList = Common.PaginatingQueryRecord<Post>;
|
||||
|
||||
// dict api
|
||||
type Dict = {
|
||||
createBy: string;
|
||||
createTime: string;
|
||||
updateBy: string;
|
||||
updateTime: string;
|
||||
remark: string;
|
||||
dictId: number;
|
||||
dictName: string;
|
||||
dictType: string;
|
||||
status: '0' | '1';
|
||||
delFlag: string;
|
||||
};
|
||||
|
||||
type DictSearchParams = Partial<Pick<Dict, 'dictName' | 'dictType' | 'status'> & CommonSearchParams>;
|
||||
|
||||
type DictList = Common.PaginatingQueryRecord<Dict>;
|
||||
}
|
||||
}
|
||||
718
src/typings/app.d.ts
vendored
Normal file
718
src/typings/app.d.ts
vendored
Normal file
@@ -0,0 +1,718 @@
|
||||
/** The global namespace for the app */
|
||||
declare namespace App {
|
||||
/** Theme namespace */
|
||||
namespace Theme {
|
||||
type ColorPaletteNumber = import('@sa/color-palette').ColorPaletteNumber;
|
||||
|
||||
/** Theme token */
|
||||
type ThemeToken = {
|
||||
colors: ThemeTokenColor;
|
||||
boxShadow: {
|
||||
header: string;
|
||||
sider: string;
|
||||
tab: string;
|
||||
};
|
||||
};
|
||||
|
||||
/** Theme setting */
|
||||
interface ThemeSetting {
|
||||
/** Theme scheme */
|
||||
themeScheme: UnionKey.ThemeScheme;
|
||||
/** 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;
|
||||
};
|
||||
/** 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;
|
||||
};
|
||||
};
|
||||
/** 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;
|
||||
};
|
||||
}
|
||||
|
||||
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 ThemeTokenColor extends ThemePaletteColor {
|
||||
nprogress: string;
|
||||
container: string;
|
||||
layout: string;
|
||||
inverted: string;
|
||||
base_text: string;
|
||||
[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 */
|
||||
interface Menu {
|
||||
/**
|
||||
* The menu key
|
||||
*
|
||||
* Equal to the route key
|
||||
*/
|
||||
key: string;
|
||||
/** The menu label */
|
||||
label: string;
|
||||
/** The menu i18n key */
|
||||
i18nKey?: I18n.I18nKey;
|
||||
/** The route key */
|
||||
routeKey: RouteKey;
|
||||
/** The route path */
|
||||
routePath: RoutePath;
|
||||
/** The menu icon */
|
||||
icon?: () => VNode;
|
||||
/** The tooltip title */
|
||||
title?: string;
|
||||
/** The menu children */
|
||||
children?: Menu[];
|
||||
}
|
||||
|
||||
/** 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;
|
||||
/**
|
||||
* Tab icon
|
||||
*
|
||||
* Iconify icon
|
||||
*/
|
||||
icon?: string;
|
||||
/**
|
||||
* Tab local icon
|
||||
*
|
||||
* Local icon
|
||||
*/
|
||||
localIcon?: string;
|
||||
/** I18n key */
|
||||
i18nKey?: I18n.I18nKey;
|
||||
};
|
||||
|
||||
/** Form rule */
|
||||
type FormRule = import('ant-design-vue/es/form/interface.d.ts').Rule;
|
||||
|
||||
/** 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;
|
||||
columnSetting: string;
|
||||
config: string;
|
||||
confirm: string;
|
||||
delete: string;
|
||||
deleteSuccess: string;
|
||||
confirmDelete: string;
|
||||
edit: string;
|
||||
index: string;
|
||||
keywordSearch: string;
|
||||
logout: string;
|
||||
logoutConfirm: string;
|
||||
lookForward: string;
|
||||
modify: string;
|
||||
modifySuccess: 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>;
|
||||
layoutMode: { title: string } & Record<UnionKey.ThemeLayoutMode, 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;
|
||||
};
|
||||
};
|
||||
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;
|
||||
};
|
||||
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;
|
||||
checkCode: 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: {
|
||||
greeting: 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;
|
||||
};
|
||||
};
|
||||
manage: {
|
||||
common: {
|
||||
status: {
|
||||
enable: string;
|
||||
disable: string;
|
||||
};
|
||||
};
|
||||
role: {
|
||||
title: string;
|
||||
roleName: string;
|
||||
roleCode: string;
|
||||
roleStatus: string;
|
||||
roleDesc: string;
|
||||
form: {
|
||||
roleName: string;
|
||||
roleCode: string;
|
||||
roleStatus: string;
|
||||
roleDesc: string;
|
||||
};
|
||||
addRole: string;
|
||||
editRole: string;
|
||||
menuAuth: string;
|
||||
buttonAuth: string;
|
||||
};
|
||||
user: {
|
||||
userName: string;
|
||||
nickName: string;
|
||||
email: string;
|
||||
phonenumber: string;
|
||||
status: string;
|
||||
dept: string;
|
||||
title: string;
|
||||
addUser: string;
|
||||
remark: string;
|
||||
editUser: string;
|
||||
post: string;
|
||||
role: string;
|
||||
password: string;
|
||||
form: {
|
||||
userName: string;
|
||||
email: string;
|
||||
status: string;
|
||||
nickName: string;
|
||||
phonenumber: string;
|
||||
remark: string;
|
||||
password: string;
|
||||
dept: string;
|
||||
};
|
||||
};
|
||||
menu: {
|
||||
home: string;
|
||||
title: string;
|
||||
id: string;
|
||||
parentId: string;
|
||||
menuType: string;
|
||||
menuName: string;
|
||||
routeName: string;
|
||||
routePath: string;
|
||||
routeParams: string;
|
||||
layout: string;
|
||||
page: string;
|
||||
i18nKey: string;
|
||||
icon: string;
|
||||
localIcon: string;
|
||||
iconTypeTitle: string;
|
||||
order: string;
|
||||
keepAlive: string;
|
||||
href: string;
|
||||
hideInMenu: string;
|
||||
activeMenu: string;
|
||||
multiTab: string;
|
||||
fixedIndexInTab: string;
|
||||
button: string;
|
||||
buttonCode: string;
|
||||
buttonDesc: string;
|
||||
menuStatus: string;
|
||||
form: {
|
||||
home: string;
|
||||
menuType: string;
|
||||
menuName: string;
|
||||
routeName: string;
|
||||
routePath: string;
|
||||
layout: string;
|
||||
page: string;
|
||||
i18nKey: string;
|
||||
icon: string;
|
||||
localIcon: string;
|
||||
order: string;
|
||||
keepAlive: string;
|
||||
href: string;
|
||||
hideInMenu: string;
|
||||
activeMenu: string;
|
||||
multiTab: string;
|
||||
fixedInTab: string;
|
||||
fixedIndexInTab: string;
|
||||
button: string;
|
||||
buttonCode: string;
|
||||
buttonDesc: string;
|
||||
menuStatus: string;
|
||||
};
|
||||
addMenu: string;
|
||||
editMenu: string;
|
||||
addChildMenu: string;
|
||||
type: {
|
||||
directory: string;
|
||||
menu: string;
|
||||
};
|
||||
iconType: {
|
||||
iconify: string;
|
||||
local: string;
|
||||
};
|
||||
};
|
||||
dept: {
|
||||
deptName: string;
|
||||
leader: string;
|
||||
status: string;
|
||||
form: {
|
||||
deptName: string;
|
||||
leader: string;
|
||||
status: string;
|
||||
};
|
||||
};
|
||||
post: {
|
||||
addPost: string;
|
||||
editPost: string;
|
||||
postName: string;
|
||||
postCode: string;
|
||||
postSort: string;
|
||||
status: string;
|
||||
remark: string;
|
||||
title: string;
|
||||
form: {
|
||||
postName: string;
|
||||
postCode: string;
|
||||
postSort: string;
|
||||
remark: string;
|
||||
status: string;
|
||||
};
|
||||
};
|
||||
|
||||
dict: {
|
||||
title: string;
|
||||
dictName: string;
|
||||
dictType: string;
|
||||
status: string;
|
||||
remark: string;
|
||||
form: {
|
||||
dictName: string;
|
||||
dictType: string;
|
||||
status: string;
|
||||
remark: string;
|
||||
};
|
||||
addDict: string;
|
||||
editDict: 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;
|
||||
};
|
||||
};
|
||||
|
||||
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<LangType>): string;
|
||||
(key: I18nKey, list: unknown[], options?: TranslateOptions<LangType>): 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;
|
||||
};
|
||||
}
|
||||
}
|
||||
420
src/typings/auto-imports.d.ts
vendored
Normal file
420
src/typings/auto-imports.d.ts
vendored
Normal file
@@ -0,0 +1,420 @@
|
||||
/* eslint-disable */
|
||||
/* prettier-ignore */
|
||||
// @ts-nocheck
|
||||
// noinspection JSUnusedGlobalSymbols
|
||||
// Generated by unplugin-auto-import
|
||||
export {}
|
||||
declare global {
|
||||
const $message: typeof import('ant-design-vue')['message']
|
||||
const $modal: typeof import('ant-design-vue')['Modal']
|
||||
const $notification: typeof import('ant-design-vue')['notification']
|
||||
const EffectScope: typeof import('vue')['EffectScope']
|
||||
const acceptHMRUpdate: typeof import('pinia')['acceptHMRUpdate']
|
||||
const addThemeVarsToHtml: typeof import('../store/modules/theme/shared')['addThemeVarsToHtml']
|
||||
const afterAll: typeof import('vitest')['afterAll']
|
||||
const afterEach: typeof import('vitest')['afterEach']
|
||||
const assert: typeof import('vitest')['assert']
|
||||
const assign: typeof import('lodash-es')['assign']
|
||||
const asyncComputed: typeof import('@vueuse/core')['asyncComputed']
|
||||
const autoResetRef: typeof import('@vueuse/core')['autoResetRef']
|
||||
const beforeAll: typeof import('vitest')['beforeAll']
|
||||
const beforeEach: typeof import('vitest')['beforeEach']
|
||||
const chai: typeof import('vitest')['chai']
|
||||
const clearAuthStorage: typeof import('../store/modules/auth/shared')['clearAuthStorage']
|
||||
const cloneDeep: typeof import('lodash-es')['cloneDeep']
|
||||
const computed: typeof import('vue')['computed']
|
||||
const computedAsync: typeof import('@vueuse/core')['computedAsync']
|
||||
const computedEager: typeof import('@vueuse/core')['computedEager']
|
||||
const computedInject: typeof import('@vueuse/core')['computedInject']
|
||||
const computedWithControl: typeof import('@vueuse/core')['computedWithControl']
|
||||
const controlledComputed: typeof import('@vueuse/core')['controlledComputed']
|
||||
const controlledRef: typeof import('@vueuse/core')['controlledRef']
|
||||
const createApp: typeof import('vue')['createApp']
|
||||
const createEventHook: typeof import('@vueuse/core')['createEventHook']
|
||||
const createGlobalState: typeof import('@vueuse/core')['createGlobalState']
|
||||
const createInjectionState: typeof import('@vueuse/core')['createInjectionState']
|
||||
const createPinia: typeof import('pinia')['createPinia']
|
||||
const createReactiveFn: typeof import('@vueuse/core')['createReactiveFn']
|
||||
const createReusableTemplate: typeof import('@vueuse/core')['createReusableTemplate']
|
||||
const createServiceConfig: typeof import('../utils/service')['createServiceConfig']
|
||||
const createSharedComposable: typeof import('@vueuse/core')['createSharedComposable']
|
||||
const createTemplatePromise: typeof import('@vueuse/core')['createTemplatePromise']
|
||||
const createThemeToken: typeof import('../store/modules/theme/shared')['createThemeToken']
|
||||
const createUnrefFn: typeof import('@vueuse/core')['createUnrefFn']
|
||||
const customRef: typeof import('vue')['customRef']
|
||||
const debouncedRef: typeof import('@vueuse/core')['debouncedRef']
|
||||
const debouncedWatch: typeof import('@vueuse/core')['debouncedWatch']
|
||||
const defineAsyncComponent: typeof import('vue')['defineAsyncComponent']
|
||||
const defineComponent: typeof import('vue')['defineComponent']
|
||||
const defineStore: typeof import('pinia')['defineStore']
|
||||
const describe: typeof import('vitest')['describe']
|
||||
const doAddDept: typeof import('../service/api/dept')['doAddDept']
|
||||
const doAddDict: typeof import('../service/api/dict')['doAddDict']
|
||||
const doAddMenu: typeof import('../service/api/menu')['doAddMenu']
|
||||
const doAddPost: typeof import('../service/api/post')['doAddPost']
|
||||
const doDeleteDept: typeof import('../service/api/dept')['doDeleteDept']
|
||||
const doDeleteDict: typeof import('../service/api/dict')['doDeleteDict']
|
||||
const doDeleteLogout: typeof import('../service/api/auth')['doDeleteLogout']
|
||||
const doDeleteMenu: typeof import('../service/api/menu')['doDeleteMenu']
|
||||
const doDeletePost: typeof import('../service/api/post')['doDeletePost']
|
||||
const doDeleteRole: typeof import('../service/api/role')['doDeleteRole']
|
||||
const doDeleteUser: typeof import('../service/api/user')['doDeleteUser']
|
||||
const doEditDept: typeof import('../service/api/dept')['doEditDept']
|
||||
const doEditDict: typeof import('../service/api/dict')['doEditDict']
|
||||
const doEditMenu: typeof import('../service/api/menu')['doEditMenu']
|
||||
const doEditPost: typeof import('../service/api/post')['doEditPost']
|
||||
const doGetAdminUserPostsAndRoles: typeof import('../service/api/user')['doGetAdminUserPostsAndRoles']
|
||||
const doGetCheckCode: typeof import('../service/api/auth')['doGetCheckCode']
|
||||
const doGetDeptInfo: typeof import('../service/api/dept')['doGetDeptInfo']
|
||||
const doGetDeptList: typeof import('../service/api/dept')['doGetDeptList']
|
||||
const doGetDictList: typeof import('../service/api/dict')['doGetDictList']
|
||||
const doGetMenuDetail: typeof import('../service/api/menu')['doGetMenuDetail']
|
||||
const doGetMenuList: typeof import('../service/api/menu')['doGetMenuList']
|
||||
const doGetPostDetail: typeof import('../service/api/post')['doGetPostDetail']
|
||||
const doGetPostList: typeof import('../service/api/post')['doGetPostList']
|
||||
const doGetRoleList: typeof import('../service/api/role')['doGetRoleList']
|
||||
const doGetRoleMenuList: typeof import('../service/api/menu')['doGetRoleMenuList']
|
||||
const doGetUserDeptTree: typeof import('../service/api/user')['doGetUserDeptTree']
|
||||
const doGetUserInfo: typeof import('../service/api/auth')['doGetUserInfo']
|
||||
const doGetUserList: typeof import('../service/api/user')['doGetUserList']
|
||||
const doGetUserPostsAndRoles: typeof import('../service/api/user')['doGetUserPostsAndRoles']
|
||||
const doGetUserRoutes: typeof import('../service/api/route')['doGetUserRoutes']
|
||||
const doPostRole: typeof import('../service/api/role')['doPostRole']
|
||||
const doPostUser: typeof import('../service/api/user')['doPostUser']
|
||||
const doPutRole: typeof import('../service/api/role')['doPutRole']
|
||||
const doPutUser: typeof import('../service/api/user')['doPutUser']
|
||||
const eagerComputed: typeof import('@vueuse/core')['eagerComputed']
|
||||
const effectScope: typeof import('vue')['effectScope']
|
||||
const emptyInfo: typeof import('../store/modules/auth/shared')['emptyInfo']
|
||||
const expect: typeof import('vitest')['expect']
|
||||
const extendRef: typeof import('@vueuse/core')['extendRef']
|
||||
const extractTabsByAllRoutes: typeof import('../store/modules/tab/shared')['extractTabsByAllRoutes']
|
||||
const fetchCustomBackendError: typeof import('../service/api/auth')['fetchCustomBackendError']
|
||||
const fetchGetAllPages: typeof import('../service/api/menu')['fetchGetAllPages']
|
||||
const fetchGetConstantRoutes: typeof import('../service/api/route')['fetchGetConstantRoutes']
|
||||
const fetchGetMenuTree: typeof import('../service/api/menu')['fetchGetMenuTree']
|
||||
const fetchIsRouteExist: typeof import('../service/api/route')['fetchIsRouteExist']
|
||||
const fetchLogin: typeof import('../service/api/auth')['fetchLogin']
|
||||
const fetchRefreshToken: typeof import('../service/api/auth')['fetchRefreshToken']
|
||||
const filterAuthRoutesByRoles: typeof import('../store/modules/route/shared')['filterAuthRoutesByRoles']
|
||||
const filterTabsById: typeof import('../store/modules/tab/shared')['filterTabsById']
|
||||
const filterTabsByIds: typeof import('../store/modules/tab/shared')['filterTabsByIds']
|
||||
const findTabByRouteName: typeof import('../store/modules/tab/shared')['findTabByRouteName']
|
||||
const getActivePinia: typeof import('pinia')['getActivePinia']
|
||||
const getAllTabs: typeof import('../store/modules/tab/shared')['getAllTabs']
|
||||
const getAntdTheme: typeof import('../store/modules/theme/shared')['getAntdTheme']
|
||||
const getBreadcrumbsByRoute: typeof import('../store/modules/route/shared')['getBreadcrumbsByRoute']
|
||||
const getCacheRouteNames: typeof import('../store/modules/route/shared')['getCacheRouteNames']
|
||||
const getCurrentInstance: typeof import('vue')['getCurrentInstance']
|
||||
const getCurrentScope: typeof import('vue')['getCurrentScope']
|
||||
const getDefaultHomeTab: typeof import('../store/modules/tab/shared')['getDefaultHomeTab']
|
||||
const getFixedTabIds: typeof import('../store/modules/tab/shared')['getFixedTabIds']
|
||||
const getFixedTabs: typeof import('../store/modules/tab/shared')['getFixedTabs']
|
||||
const getGlobalMenusByAuthRoutes: typeof import('../store/modules/route/shared')['getGlobalMenusByAuthRoutes']
|
||||
const getRouteIcons: typeof import('../store/modules/tab/shared')['getRouteIcons']
|
||||
const getSelectedMenuKeyPathByKey: typeof import('../store/modules/route/shared')['getSelectedMenuKeyPathByKey']
|
||||
const getServiceBaseURL: typeof import('../utils/service')['getServiceBaseURL']
|
||||
const getTabByRoute: typeof import('../store/modules/tab/shared')['getTabByRoute']
|
||||
const getTabIdByRoute: typeof import('../store/modules/tab/shared')['getTabIdByRoute']
|
||||
const getToken: typeof import('../store/modules/auth/shared')['getToken']
|
||||
const h: typeof import('vue')['h']
|
||||
const ignorableWatch: typeof import('@vueuse/core')['ignorableWatch']
|
||||
const initThemeSettings: typeof import('../store/modules/theme/shared')['initThemeSettings']
|
||||
const inject: typeof import('vue')['inject']
|
||||
const injectLocal: typeof import('@vueuse/core')['injectLocal']
|
||||
const isDefined: typeof import('@vueuse/core')['isDefined']
|
||||
const isProxy: typeof import('vue')['isProxy']
|
||||
const isReactive: typeof import('vue')['isReactive']
|
||||
const isReadonly: typeof import('vue')['isReadonly']
|
||||
const isRef: typeof import('vue')['isRef']
|
||||
const isRouteExistByRouteName: typeof import('../store/modules/route/shared')['isRouteExistByRouteName']
|
||||
const isShowBtn: typeof import('../utils/permission')['isShowBtn']
|
||||
const isTabInTabs: typeof import('../store/modules/tab/shared')['isTabInTabs']
|
||||
const it: typeof import('vitest')['it']
|
||||
const localStg: typeof import('../utils/storage')['localStg']
|
||||
const localforage: typeof import('../utils/storage')['localforage']
|
||||
const makeDestructurable: typeof import('@vueuse/core')['makeDestructurable']
|
||||
const mapActions: typeof import('pinia')['mapActions']
|
||||
const mapGetters: typeof import('pinia')['mapGetters']
|
||||
const mapState: typeof import('pinia')['mapState']
|
||||
const mapStores: typeof import('pinia')['mapStores']
|
||||
const mapWritableState: typeof import('pinia')['mapWritableState']
|
||||
const markRaw: typeof import('vue')['markRaw']
|
||||
const nextTick: typeof import('vue')['nextTick']
|
||||
const omit: typeof import('lodash-es')['omit']
|
||||
const onActivated: typeof import('vue')['onActivated']
|
||||
const onBeforeMount: typeof import('vue')['onBeforeMount']
|
||||
const onBeforeRouteLeave: typeof import('vue-router')['onBeforeRouteLeave']
|
||||
const onBeforeRouteUpdate: typeof import('vue-router')['onBeforeRouteUpdate']
|
||||
const onBeforeUnmount: typeof import('vue')['onBeforeUnmount']
|
||||
const onBeforeUpdate: typeof import('vue')['onBeforeUpdate']
|
||||
const onClickOutside: typeof import('@vueuse/core')['onClickOutside']
|
||||
const onDeactivated: typeof import('vue')['onDeactivated']
|
||||
const onErrorCaptured: typeof import('vue')['onErrorCaptured']
|
||||
const onKeyStroke: typeof import('@vueuse/core')['onKeyStroke']
|
||||
const onLongPress: typeof import('@vueuse/core')['onLongPress']
|
||||
const onMounted: typeof import('vue')['onMounted']
|
||||
const onRenderTracked: typeof import('vue')['onRenderTracked']
|
||||
const onRenderTriggered: typeof import('vue')['onRenderTriggered']
|
||||
const onScopeDispose: typeof import('vue')['onScopeDispose']
|
||||
const onServerPrefetch: typeof import('vue')['onServerPrefetch']
|
||||
const onStartTyping: typeof import('@vueuse/core')['onStartTyping']
|
||||
const onUnmounted: typeof import('vue')['onUnmounted']
|
||||
const onUpdated: typeof import('vue')['onUpdated']
|
||||
const pausableWatch: typeof import('@vueuse/core')['pausableWatch']
|
||||
const pick: typeof import('lodash-es')['pick']
|
||||
const provide: typeof import('vue')['provide']
|
||||
const provideLocal: typeof import('@vueuse/core')['provideLocal']
|
||||
const reactify: typeof import('@vueuse/core')['reactify']
|
||||
const reactifyObject: typeof import('@vueuse/core')['reactifyObject']
|
||||
const reactive: typeof import('vue')['reactive']
|
||||
const reactiveComputed: typeof import('@vueuse/core')['reactiveComputed']
|
||||
const reactiveOmit: typeof import('@vueuse/core')['reactiveOmit']
|
||||
const reactivePick: typeof import('@vueuse/core')['reactivePick']
|
||||
const readonly: typeof import('vue')['readonly']
|
||||
const ref: typeof import('vue')['ref']
|
||||
const refAutoReset: typeof import('@vueuse/core')['refAutoReset']
|
||||
const refDebounced: typeof import('@vueuse/core')['refDebounced']
|
||||
const refDefault: typeof import('@vueuse/core')['refDefault']
|
||||
const refThrottled: typeof import('@vueuse/core')['refThrottled']
|
||||
const refWithControl: typeof import('@vueuse/core')['refWithControl']
|
||||
const removeEmptyChildren: typeof import('../utils/menu')['removeEmptyChildren']
|
||||
const resolveComponent: typeof import('vue')['resolveComponent']
|
||||
const resolveRef: typeof import('@vueuse/core')['resolveRef']
|
||||
const resolveUnref: typeof import('@vueuse/core')['resolveUnref']
|
||||
const sessionStg: typeof import('../utils/storage')['sessionStg']
|
||||
const setActivePinia: typeof import('pinia')['setActivePinia']
|
||||
const setMapStoreSuffix: typeof import('pinia')['setMapStoreSuffix']
|
||||
const shallowReactive: typeof import('vue')['shallowReactive']
|
||||
const shallowReadonly: typeof import('vue')['shallowReadonly']
|
||||
const shallowRef: typeof import('vue')['shallowRef']
|
||||
const sortRoutesByOrder: typeof import('../store/modules/route/shared')['sortRoutesByOrder']
|
||||
const storeToRefs: typeof import('pinia')['storeToRefs']
|
||||
const suite: typeof import('vitest')['suite']
|
||||
const syncRef: typeof import('@vueuse/core')['syncRef']
|
||||
const syncRefs: typeof import('@vueuse/core')['syncRefs']
|
||||
const templateRef: typeof import('@vueuse/core')['templateRef']
|
||||
const test: typeof import('vitest')['test']
|
||||
const throttledRef: typeof import('@vueuse/core')['throttledRef']
|
||||
const throttledWatch: typeof import('@vueuse/core')['throttledWatch']
|
||||
const toRaw: typeof import('vue')['toRaw']
|
||||
const toReactive: typeof import('@vueuse/core')['toReactive']
|
||||
const toRef: typeof import('vue')['toRef']
|
||||
const toRefs: typeof import('vue')['toRefs']
|
||||
const toValue: typeof import('vue')['toValue']
|
||||
const toggleCssDarkMode: typeof import('../store/modules/theme/shared')['toggleCssDarkMode']
|
||||
const transformListToTree: typeof import('../utils/menu')['transformListToTree']
|
||||
const transformMenuChildWithRootIds: typeof import('../utils/menu')['transformMenuChildWithRootIds']
|
||||
const transformMenuToSearchMenus: typeof import('../store/modules/route/shared')['transformMenuToSearchMenus']
|
||||
const transformRecordToOption: typeof import('../utils/common')['transformRecordToOption']
|
||||
const translateOptions: typeof import('../utils/common')['translateOptions']
|
||||
const triggerRef: typeof import('vue')['triggerRef']
|
||||
const tryOnBeforeMount: typeof import('@vueuse/core')['tryOnBeforeMount']
|
||||
const tryOnBeforeUnmount: typeof import('@vueuse/core')['tryOnBeforeUnmount']
|
||||
const tryOnMounted: typeof import('@vueuse/core')['tryOnMounted']
|
||||
const tryOnScopeDispose: typeof import('@vueuse/core')['tryOnScopeDispose']
|
||||
const tryOnUnmounted: typeof import('@vueuse/core')['tryOnUnmounted']
|
||||
const unref: typeof import('vue')['unref']
|
||||
const unrefElement: typeof import('@vueuse/core')['unrefElement']
|
||||
const until: typeof import('@vueuse/core')['until']
|
||||
const updateLocaleOfGlobalMenus: typeof import('../store/modules/route/shared')['updateLocaleOfGlobalMenus']
|
||||
const updateTabByI18nKey: typeof import('../store/modules/tab/shared')['updateTabByI18nKey']
|
||||
const updateTabsByI18nKey: typeof import('../store/modules/tab/shared')['updateTabsByI18nKey']
|
||||
const useActiveElement: typeof import('@vueuse/core')['useActiveElement']
|
||||
const useAnimate: typeof import('@vueuse/core')['useAnimate']
|
||||
const useAntdForm: typeof import('../hooks/common/form')['useAntdForm']
|
||||
const useAppStore: typeof import('../store/modules/app/index')['useAppStore']
|
||||
const useArrayDifference: typeof import('@vueuse/core')['useArrayDifference']
|
||||
const useArrayEvery: typeof import('@vueuse/core')['useArrayEvery']
|
||||
const useArrayFilter: typeof import('@vueuse/core')['useArrayFilter']
|
||||
const useArrayFind: typeof import('@vueuse/core')['useArrayFind']
|
||||
const useArrayFindIndex: typeof import('@vueuse/core')['useArrayFindIndex']
|
||||
const useArrayFindLast: typeof import('@vueuse/core')['useArrayFindLast']
|
||||
const useArrayIncludes: typeof import('@vueuse/core')['useArrayIncludes']
|
||||
const useArrayJoin: typeof import('@vueuse/core')['useArrayJoin']
|
||||
const useArrayMap: typeof import('@vueuse/core')['useArrayMap']
|
||||
const useArrayReduce: typeof import('@vueuse/core')['useArrayReduce']
|
||||
const useArraySome: typeof import('@vueuse/core')['useArraySome']
|
||||
const useArrayUnique: typeof import('@vueuse/core')['useArrayUnique']
|
||||
const useAsyncQueue: typeof import('@vueuse/core')['useAsyncQueue']
|
||||
const useAsyncState: typeof import('@vueuse/core')['useAsyncState']
|
||||
const useAttrs: typeof import('vue')['useAttrs']
|
||||
const useAuthStore: typeof import('../store/modules/auth/index')['useAuthStore']
|
||||
const useBase64: typeof import('@vueuse/core')['useBase64']
|
||||
const useBattery: typeof import('@vueuse/core')['useBattery']
|
||||
const useBluetooth: typeof import('@vueuse/core')['useBluetooth']
|
||||
const useBreakpoints: typeof import('@vueuse/core')['useBreakpoints']
|
||||
const useBroadcastChannel: typeof import('@vueuse/core')['useBroadcastChannel']
|
||||
const useBrowserLocation: typeof import('@vueuse/core')['useBrowserLocation']
|
||||
const useCached: typeof import('@vueuse/core')['useCached']
|
||||
const useClipboard: typeof import('@vueuse/core')['useClipboard']
|
||||
const useClipboardItems: typeof import('@vueuse/core')['useClipboardItems']
|
||||
const useCloned: typeof import('@vueuse/core')['useCloned']
|
||||
const useColorMode: typeof import('@vueuse/core')['useColorMode']
|
||||
const useConfirmDialog: typeof import('@vueuse/core')['useConfirmDialog']
|
||||
const useCounter: typeof import('@vueuse/core')['useCounter']
|
||||
const useCssModule: typeof import('vue')['useCssModule']
|
||||
const useCssVar: typeof import('@vueuse/core')['useCssVar']
|
||||
const useCssVars: typeof import('vue')['useCssVars']
|
||||
const useCurrentElement: typeof import('@vueuse/core')['useCurrentElement']
|
||||
const useCycleList: typeof import('@vueuse/core')['useCycleList']
|
||||
const useDark: typeof import('@vueuse/core')['useDark']
|
||||
const useDateFormat: typeof import('@vueuse/core')['useDateFormat']
|
||||
const useDebounce: typeof import('@vueuse/core')['useDebounce']
|
||||
const useDebounceFn: typeof import('@vueuse/core')['useDebounceFn']
|
||||
const useDebouncedRefHistory: typeof import('@vueuse/core')['useDebouncedRefHistory']
|
||||
const useDeviceMotion: typeof import('@vueuse/core')['useDeviceMotion']
|
||||
const useDeviceOrientation: typeof import('@vueuse/core')['useDeviceOrientation']
|
||||
const useDevicePixelRatio: typeof import('@vueuse/core')['useDevicePixelRatio']
|
||||
const useDevicesList: typeof import('@vueuse/core')['useDevicesList']
|
||||
const useDisplayMedia: typeof import('@vueuse/core')['useDisplayMedia']
|
||||
const useDocumentVisibility: typeof import('@vueuse/core')['useDocumentVisibility']
|
||||
const useDraggable: typeof import('@vueuse/core')['useDraggable']
|
||||
const useDropZone: typeof import('@vueuse/core')['useDropZone']
|
||||
const useEcharts: typeof import('../hooks/common/echarts')['useEcharts']
|
||||
const useElementBounding: typeof import('@vueuse/core')['useElementBounding']
|
||||
const useElementByPoint: typeof import('@vueuse/core')['useElementByPoint']
|
||||
const useElementHover: typeof import('@vueuse/core')['useElementHover']
|
||||
const useElementSize: typeof import('@vueuse/core')['useElementSize']
|
||||
const useElementVisibility: typeof import('@vueuse/core')['useElementVisibility']
|
||||
const useEventBus: typeof import('@vueuse/core')['useEventBus']
|
||||
const useEventListener: typeof import('@vueuse/core')['useEventListener']
|
||||
const useEventSource: typeof import('@vueuse/core')['useEventSource']
|
||||
const useEyeDropper: typeof import('@vueuse/core')['useEyeDropper']
|
||||
const useFavicon: typeof import('@vueuse/core')['useFavicon']
|
||||
const useFetch: typeof import('@vueuse/core')['useFetch']
|
||||
const useFileDialog: typeof import('@vueuse/core')['useFileDialog']
|
||||
const useFileSystemAccess: typeof import('@vueuse/core')['useFileSystemAccess']
|
||||
const useFocus: typeof import('@vueuse/core')['useFocus']
|
||||
const useFocusWithin: typeof import('@vueuse/core')['useFocusWithin']
|
||||
const useFormRules: typeof import('../hooks/common/form')['useFormRules']
|
||||
const useFps: typeof import('@vueuse/core')['useFps']
|
||||
const useFullscreen: typeof import('@vueuse/core')['useFullscreen']
|
||||
const useGamepad: typeof import('@vueuse/core')['useGamepad']
|
||||
const useGeolocation: typeof import('@vueuse/core')['useGeolocation']
|
||||
const useIdle: typeof import('@vueuse/core')['useIdle']
|
||||
const useImage: typeof import('@vueuse/core')['useImage']
|
||||
const useInfiniteScroll: typeof import('@vueuse/core')['useInfiniteScroll']
|
||||
const useIntersectionObserver: typeof import('@vueuse/core')['useIntersectionObserver']
|
||||
const useInterval: typeof import('@vueuse/core')['useInterval']
|
||||
const useIntervalFn: typeof import('@vueuse/core')['useIntervalFn']
|
||||
const useKeyModifier: typeof import('@vueuse/core')['useKeyModifier']
|
||||
const useLastChanged: typeof import('@vueuse/core')['useLastChanged']
|
||||
const useLink: typeof import('vue-router')['useLink']
|
||||
const useLocalStorage: typeof import('@vueuse/core')['useLocalStorage']
|
||||
const useMagicKeys: typeof import('@vueuse/core')['useMagicKeys']
|
||||
const useManualRefHistory: typeof import('@vueuse/core')['useManualRefHistory']
|
||||
const useMediaControls: typeof import('@vueuse/core')['useMediaControls']
|
||||
const useMediaQuery: typeof import('@vueuse/core')['useMediaQuery']
|
||||
const useMemoize: typeof import('@vueuse/core')['useMemoize']
|
||||
const useMemory: typeof import('@vueuse/core')['useMemory']
|
||||
const useMounted: typeof import('@vueuse/core')['useMounted']
|
||||
const useMouse: typeof import('@vueuse/core')['useMouse']
|
||||
const useMouseInElement: typeof import('@vueuse/core')['useMouseInElement']
|
||||
const useMousePressed: typeof import('@vueuse/core')['useMousePressed']
|
||||
const useMutationObserver: typeof import('@vueuse/core')['useMutationObserver']
|
||||
const useNavigatorLanguage: typeof import('@vueuse/core')['useNavigatorLanguage']
|
||||
const useNetwork: typeof import('@vueuse/core')['useNetwork']
|
||||
const useNow: typeof import('@vueuse/core')['useNow']
|
||||
const useObjectUrl: typeof import('@vueuse/core')['useObjectUrl']
|
||||
const useOffsetPagination: typeof import('@vueuse/core')['useOffsetPagination']
|
||||
const useOnline: typeof import('@vueuse/core')['useOnline']
|
||||
const usePageLeave: typeof import('@vueuse/core')['usePageLeave']
|
||||
const useParallax: typeof import('@vueuse/core')['useParallax']
|
||||
const useParentElement: typeof import('@vueuse/core')['useParentElement']
|
||||
const usePerformanceObserver: typeof import('@vueuse/core')['usePerformanceObserver']
|
||||
const usePermission: typeof import('@vueuse/core')['usePermission']
|
||||
const usePointer: typeof import('@vueuse/core')['usePointer']
|
||||
const usePointerLock: typeof import('@vueuse/core')['usePointerLock']
|
||||
const usePointerSwipe: typeof import('@vueuse/core')['usePointerSwipe']
|
||||
const usePreferredColorScheme: typeof import('@vueuse/core')['usePreferredColorScheme']
|
||||
const usePreferredContrast: typeof import('@vueuse/core')['usePreferredContrast']
|
||||
const usePreferredDark: typeof import('@vueuse/core')['usePreferredDark']
|
||||
const usePreferredLanguages: typeof import('@vueuse/core')['usePreferredLanguages']
|
||||
const usePreferredReducedMotion: typeof import('@vueuse/core')['usePreferredReducedMotion']
|
||||
const usePrevious: typeof import('@vueuse/core')['usePrevious']
|
||||
const useRafFn: typeof import('@vueuse/core')['useRafFn']
|
||||
const useRefHistory: typeof import('@vueuse/core')['useRefHistory']
|
||||
const useResizeObserver: typeof import('@vueuse/core')['useResizeObserver']
|
||||
const useRoute: typeof import('vue-router')['useRoute']
|
||||
const useRouteStore: typeof import('../store/modules/route/index')['useRouteStore']
|
||||
const useRouter: typeof import('vue-router')['useRouter']
|
||||
const useRouterPush: typeof import('../hooks/common/router')['useRouterPush']
|
||||
const useScreenOrientation: typeof import('@vueuse/core')['useScreenOrientation']
|
||||
const useScreenSafeArea: typeof import('@vueuse/core')['useScreenSafeArea']
|
||||
const useScriptTag: typeof import('@vueuse/core')['useScriptTag']
|
||||
const useScroll: typeof import('@vueuse/core')['useScroll']
|
||||
const useScrollLock: typeof import('@vueuse/core')['useScrollLock']
|
||||
const useSessionStorage: typeof import('@vueuse/core')['useSessionStorage']
|
||||
const useShare: typeof import('@vueuse/core')['useShare']
|
||||
const useSlots: typeof import('vue')['useSlots']
|
||||
const useSorted: typeof import('@vueuse/core')['useSorted']
|
||||
const useSpeechRecognition: typeof import('@vueuse/core')['useSpeechRecognition']
|
||||
const useSpeechSynthesis: typeof import('@vueuse/core')['useSpeechSynthesis']
|
||||
const useStepper: typeof import('@vueuse/core')['useStepper']
|
||||
const useStorage: typeof import('@vueuse/core')['useStorage']
|
||||
const useStorageAsync: typeof import('@vueuse/core')['useStorageAsync']
|
||||
const useStyleTag: typeof import('@vueuse/core')['useStyleTag']
|
||||
const useSupported: typeof import('@vueuse/core')['useSupported']
|
||||
const useSvgIcon: typeof import('../hooks/common/icon')['useSvgIcon']
|
||||
const useSwipe: typeof import('@vueuse/core')['useSwipe']
|
||||
const useTabStore: typeof import('../store/modules/tab/index')['useTabStore']
|
||||
const useTable: typeof import('../hooks/common/table')['useTable']
|
||||
const useTableOperate: typeof import('../hooks/common/table')['useTableOperate']
|
||||
const useTemplateRefsList: typeof import('@vueuse/core')['useTemplateRefsList']
|
||||
const useTextDirection: typeof import('@vueuse/core')['useTextDirection']
|
||||
const useTextSelection: typeof import('@vueuse/core')['useTextSelection']
|
||||
const useTextareaAutosize: typeof import('@vueuse/core')['useTextareaAutosize']
|
||||
const useThemeStore: typeof import('../store/modules/theme/index')['useThemeStore']
|
||||
const useThrottle: typeof import('@vueuse/core')['useThrottle']
|
||||
const useThrottleFn: typeof import('@vueuse/core')['useThrottleFn']
|
||||
const useThrottledRefHistory: typeof import('@vueuse/core')['useThrottledRefHistory']
|
||||
const useTimeAgo: typeof import('@vueuse/core')['useTimeAgo']
|
||||
const useTimeout: typeof import('@vueuse/core')['useTimeout']
|
||||
const useTimeoutFn: typeof import('@vueuse/core')['useTimeoutFn']
|
||||
const useTimeoutPoll: typeof import('@vueuse/core')['useTimeoutPoll']
|
||||
const useTimestamp: typeof import('@vueuse/core')['useTimestamp']
|
||||
const useTitle: typeof import('@vueuse/core')['useTitle']
|
||||
const useToNumber: typeof import('@vueuse/core')['useToNumber']
|
||||
const useToString: typeof import('@vueuse/core')['useToString']
|
||||
const useToggle: typeof import('@vueuse/core')['useToggle']
|
||||
const useTransition: typeof import('@vueuse/core')['useTransition']
|
||||
const useUrlSearchParams: typeof import('@vueuse/core')['useUrlSearchParams']
|
||||
const useUserMedia: typeof import('@vueuse/core')['useUserMedia']
|
||||
const useVModel: typeof import('@vueuse/core')['useVModel']
|
||||
const useVModels: typeof import('@vueuse/core')['useVModels']
|
||||
const useVibrate: typeof import('@vueuse/core')['useVibrate']
|
||||
const useVirtualList: typeof import('@vueuse/core')['useVirtualList']
|
||||
const useWakeLock: typeof import('@vueuse/core')['useWakeLock']
|
||||
const useWebNotification: typeof import('@vueuse/core')['useWebNotification']
|
||||
const useWebSocket: typeof import('@vueuse/core')['useWebSocket']
|
||||
const useWebWorker: typeof import('@vueuse/core')['useWebWorker']
|
||||
const useWebWorkerFn: typeof import('@vueuse/core')['useWebWorkerFn']
|
||||
const useWindowFocus: typeof import('@vueuse/core')['useWindowFocus']
|
||||
const useWindowScroll: typeof import('@vueuse/core')['useWindowScroll']
|
||||
const useWindowSize: typeof import('@vueuse/core')['useWindowSize']
|
||||
const vi: typeof import('vitest')['vi']
|
||||
const vitest: typeof import('vitest')['vitest']
|
||||
const watch: typeof import('vue')['watch']
|
||||
const watchArray: typeof import('@vueuse/core')['watchArray']
|
||||
const watchAtMost: typeof import('@vueuse/core')['watchAtMost']
|
||||
const watchDebounced: typeof import('@vueuse/core')['watchDebounced']
|
||||
const watchDeep: typeof import('@vueuse/core')['watchDeep']
|
||||
const watchEffect: typeof import('vue')['watchEffect']
|
||||
const watchIgnorable: typeof import('@vueuse/core')['watchIgnorable']
|
||||
const watchImmediate: typeof import('@vueuse/core')['watchImmediate']
|
||||
const watchOnce: typeof import('@vueuse/core')['watchOnce']
|
||||
const watchPausable: typeof import('@vueuse/core')['watchPausable']
|
||||
const watchPostEffect: typeof import('vue')['watchPostEffect']
|
||||
const watchSyncEffect: typeof import('vue')['watchSyncEffect']
|
||||
const watchThrottled: typeof import('@vueuse/core')['watchThrottled']
|
||||
const watchTriggerable: typeof import('@vueuse/core')['watchTriggerable']
|
||||
const watchWithFilter: typeof import('@vueuse/core')['watchWithFilter']
|
||||
const whenever: typeof import('@vueuse/core')['whenever']
|
||||
}
|
||||
// for type re-export
|
||||
declare global {
|
||||
// @ts-ignore
|
||||
export type { Component, ComponentPublicInstance, ComputedRef, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InjectionKey, PropType, Ref, VNode, WritableComputedRef } from 'vue'
|
||||
import('vue')
|
||||
}
|
||||
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> = { value: K; label: string };
|
||||
|
||||
type YesOrNo = 'Y' | 'N';
|
||||
|
||||
/** add null to all properties */
|
||||
type RecordNullable<T> = {
|
||||
[K in keyof T]?: T[K] | null;
|
||||
};
|
||||
}
|
||||
90
src/typings/components.d.ts
vendored
Normal file
90
src/typings/components.d.ts
vendored
Normal file
@@ -0,0 +1,90 @@
|
||||
/* eslint-disable */
|
||||
// @ts-nocheck
|
||||
// Generated by unplugin-vue-components
|
||||
// Read more: https://github.com/vuejs/core/pull/3399
|
||||
export {}
|
||||
|
||||
/* prettier-ignore */
|
||||
declare module 'vue' {
|
||||
export interface GlobalComponents {
|
||||
ABreadcrumb: typeof import('ant-design-vue/es')['Breadcrumb']
|
||||
ABreadcrumbItem: typeof import('ant-design-vue/es')['BreadcrumbItem']
|
||||
AButton: typeof import('ant-design-vue/es')['Button']
|
||||
ACard: typeof import('ant-design-vue/es')['Card']
|
||||
ACheckbox: typeof import('ant-design-vue/es')['Checkbox']
|
||||
ACol: typeof import('ant-design-vue/es')['Col']
|
||||
ADescriptions: typeof import('ant-design-vue/es')['Descriptions']
|
||||
ADescriptionsItem: typeof import('ant-design-vue/es')['DescriptionsItem']
|
||||
ADivider: typeof import('ant-design-vue/es')['Divider']
|
||||
ADrawer: typeof import('ant-design-vue/es')['Drawer']
|
||||
ADropdown: typeof import('ant-design-vue/es')['Dropdown']
|
||||
AForm: typeof import('ant-design-vue/es')['Form']
|
||||
AFormItem: typeof import('ant-design-vue/es')['FormItem']
|
||||
AImage: typeof import('ant-design-vue/es')['Image']
|
||||
AInput: typeof import('ant-design-vue/es')['Input']
|
||||
AInputNumber: typeof import('ant-design-vue/es')['InputNumber']
|
||||
AInputPassword: typeof import('ant-design-vue/es')['InputPassword']
|
||||
AInputSearch: typeof import('ant-design-vue/es')['InputSearch']
|
||||
AList: typeof import('ant-design-vue/es')['List']
|
||||
AListItem: typeof import('ant-design-vue/es')['ListItem']
|
||||
AListItemMeta: typeof import('ant-design-vue/es')['ListItemMeta']
|
||||
AMenu: typeof import('ant-design-vue/es')['Menu']
|
||||
AMenuDivider: typeof import('ant-design-vue/es')['MenuDivider']
|
||||
AMenuItem: typeof import('ant-design-vue/es')['MenuItem']
|
||||
AModal: typeof import('ant-design-vue/es')['Modal']
|
||||
AntTree: typeof import('./../components/custom/ant-tree.vue')['default']
|
||||
APopconfirm: typeof import('ant-design-vue/es')['Popconfirm']
|
||||
APopover: typeof import('ant-design-vue/es')['Popover']
|
||||
AppLoading: typeof import('./../components/common/app-loading.vue')['default']
|
||||
AppProvider: typeof import('./../components/common/app-provider.vue')['default']
|
||||
ARadio: typeof import('ant-design-vue/es')['Radio']
|
||||
ARadioGroup: typeof import('ant-design-vue/es')['RadioGroup']
|
||||
ARow: typeof import('ant-design-vue/es')['Row']
|
||||
ASegmented: typeof import('ant-design-vue/es')['Segmented']
|
||||
ASelect: typeof import('ant-design-vue/es')['Select']
|
||||
ASelectOption: typeof import('ant-design-vue/es')['SelectOption']
|
||||
ASpace: typeof import('ant-design-vue/es')['Space']
|
||||
ASpin: typeof import('ant-design-vue/es')['Spin']
|
||||
AStatistic: typeof import('ant-design-vue/es')['Statistic']
|
||||
ASwitch: typeof import('ant-design-vue/es')['Switch']
|
||||
ATable: typeof import('ant-design-vue/es')['Table']
|
||||
ATag: typeof import('ant-design-vue/es')['Tag']
|
||||
ATextarea: typeof import('ant-design-vue/es')['Textarea']
|
||||
ATooltip: typeof import('ant-design-vue/es')['Tooltip']
|
||||
ATree: typeof import('ant-design-vue/es')['Tree']
|
||||
ATreeSelect: typeof import('ant-design-vue/es')['TreeSelect']
|
||||
BetterScroll: typeof import('./../components/custom/better-scroll.vue')['default']
|
||||
ButtonIcon: typeof import('./../components/custom/button-icon.vue')['default']
|
||||
CountTo: typeof import('./../components/custom/count-to.vue')['default']
|
||||
DarkModeContainer: typeof import('./../components/common/dark-mode-container.vue')['default']
|
||||
ExceptionBase: typeof import('./../components/common/exception-base.vue')['default']
|
||||
FullScreen: typeof import('./../components/common/full-screen.vue')['default']
|
||||
IconAntDesignReloadOutlined: typeof import('~icons/ant-design/reload-outlined')['default']
|
||||
IconAntDesignSettingOutlined: typeof import('~icons/ant-design/setting-outlined')['default']
|
||||
IconGridiconsFullscreen: typeof import('~icons/gridicons/fullscreen')['default']
|
||||
IconGridiconsFullscreenExit: typeof import('~icons/gridicons/fullscreen-exit')['default']
|
||||
IconIcRoundDelete: typeof import('~icons/ic/round-delete')['default']
|
||||
IconIcRoundMenu: typeof import('~icons/ic/round-menu')['default']
|
||||
IconIcRoundPlus: typeof import('~icons/ic/round-plus')['default']
|
||||
IconIcRoundRefresh: typeof import('~icons/ic/round-refresh')['default']
|
||||
IconIcRoundSearch: typeof import('~icons/ic/round-search')['default']
|
||||
IconLocalBanner: typeof import('~icons/local/banner')['default']
|
||||
IconLocalLogo: typeof import('~icons/local/logo')['default']
|
||||
IconMdiDrag: typeof import('~icons/mdi/drag')['default']
|
||||
IconMdiRefresh: typeof import('~icons/mdi/refresh')['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']
|
||||
ThemeSchemaSwitch: typeof import('./../components/common/theme-schema-switch.vue')['default']
|
||||
WaveBg: typeof import('./../components/custom/wave-bg.vue')['default']
|
||||
}
|
||||
}
|
||||
292
src/typings/elegant-router.d.ts
vendored
Normal file
292
src/typings/elegant-router.d.ts
vendored
Normal file
@@ -0,0 +1,292 @@
|
||||
/* 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";
|
||||
"about": "/about";
|
||||
"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";
|
||||
"home": "/home";
|
||||
"login": "/login/:module(pwd-login|code-login|register|reset-pwd|bind-wechat)?";
|
||||
"manage": "/manage";
|
||||
"manage_dept": "/manage/dept";
|
||||
"manage_dict": "/manage/dict";
|
||||
"manage_menu": "/manage/menu";
|
||||
"manage_post": "/manage/post";
|
||||
"manage_role": "/manage/role";
|
||||
"manage_route": "/manage/route";
|
||||
"manage_user": "/manage/user";
|
||||
"manage_user-detail": "/manage/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"
|
||||
| "about"
|
||||
| "function"
|
||||
| "home"
|
||||
| "login"
|
||||
| "manage"
|
||||
| "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"
|
||||
| "login"
|
||||
| "about"
|
||||
| "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"
|
||||
| "home"
|
||||
| "manage_dept"
|
||||
| "manage_dict"
|
||||
| "manage_menu"
|
||||
| "manage_post"
|
||||
| "manage_role"
|
||||
| "manage_route"
|
||||
| "manage_user-detail"
|
||||
| "manage_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;
|
||||
}
|
||||
105
src/typings/env.d.ts
vendored
Normal file
105
src/typings/env.d.ts
vendored
Normal file
@@ -0,0 +1,105 @@
|
||||
/**
|
||||
* 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 */
|
||||
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: 'local-icon';
|
||||
/** 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;
|
||||
}
|
||||
}
|
||||
25
src/typings/global.d.ts
vendored
Normal file
25
src/typings/global.d.ts
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
interface Window {
|
||||
/** NProgress instance */
|
||||
NProgress?: import('nprogress').NProgress;
|
||||
/** Ant-design-vue message instance */
|
||||
$message?: import('ant-design-vue/es/message/interface').MessageInstance;
|
||||
/** Ant-design-vue modal instance */
|
||||
$modal?: Omit<import('ant-design-vue/es/modal/confirm').ModalStaticFunctions, 'warn'>;
|
||||
/** Ant-design-vue notification instance */
|
||||
$notification?: import('ant-design-vue/es/notification/interface').NotificationInstance;
|
||||
}
|
||||
|
||||
interface ViewTransition {
|
||||
ready: Promise<void>;
|
||||
}
|
||||
|
||||
interface Document {
|
||||
startViewTransition?: (callback: () => Promise<void> | void) => ViewTransition;
|
||||
}
|
||||
|
||||
interface ImportMeta {
|
||||
readonly env: Env.ImportMeta;
|
||||
}
|
||||
|
||||
/** Build time of the project */
|
||||
declare const BUILD_TIME: string;
|
||||
65
src/typings/router.d.ts
vendored
Normal file
65
src/typings/router.d.ts
vendored
Normal file
@@ -0,0 +1,65 @@
|
||||
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;
|
||||
/**
|
||||
* Roles of the route
|
||||
*
|
||||
* Route can be accessed if the current user has at least one of the roles
|
||||
*/
|
||||
roles?: string[];
|
||||
/** Whether to cache the route */
|
||||
keepAlive?: boolean;
|
||||
/**
|
||||
* Is constant route
|
||||
*
|
||||
* Does not need to login, and the route is defined in the front-end
|
||||
*/
|
||||
constant?: boolean;
|
||||
/**
|
||||
* 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;
|
||||
/** Router order */
|
||||
order?: number;
|
||||
/** The outer link of the route */
|
||||
href?: string;
|
||||
/** Whether to hide the route in the menu */
|
||||
hideInMenu?: boolean;
|
||||
/**
|
||||
* 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;
|
||||
/** By default, the same route path will use one tab, if set to true, it will use multiple tabs */
|
||||
multiTab?: boolean;
|
||||
/** If set, the route will be fixed in tabs, and the value is the order of fixed tabs */
|
||||
fixedIndexInTab?: number;
|
||||
/** if set query parameters, it will be automatically carried when entering the route */
|
||||
query?: Record<string, string>;
|
||||
}
|
||||
}
|
||||
34
src/typings/storage.d.ts
vendored
Normal file
34
src/typings/storage.d.ts
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
/** 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;
|
||||
/** The refresh token */
|
||||
refreshToken: string;
|
||||
/** The user info */
|
||||
userInfo: Api.Auth.UserInfo;
|
||||
/** The theme color */
|
||||
themeColor: string;
|
||||
/** 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[];
|
||||
}
|
||||
}
|
||||
149
src/typings/union-key.d.ts
vendored
Normal file
149
src/typings/union-key.d.ts
vendored
Normal file
@@ -0,0 +1,149 @@
|
||||
/** The union key namespace */
|
||||
declare namespace UnionKey {
|
||||
/**
|
||||
* The login module
|
||||
*
|
||||
* - pwd-login: password login
|
||||
* - code-login: phone code login
|
||||
* - register: register
|
||||
* - reset-pwd: reset password
|
||||
* - bind-wechat: bind wechat
|
||||
*/
|
||||
type LoginModule = 'pwd-login' | 'code-login' | 'register' | 'reset-pwd' | 'bind-wechat';
|
||||
|
||||
/** 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 menu in left and horizontal menu 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';
|
||||
}
|
||||
Reference in New Issue
Block a user