- 新增产品管理相关路由和页面(dashboard、list、requirement、setting) - 实现产品基础信息编辑弹窗组件(base-info-dialog.vue) - 添加运行时字典功能(dict-select、dict-text、dict-tag组件) - 集成字典管理store和API调用 - 规范ID类型定义为string避免精度丢失问题 - 完善国际化资源文件支持中英文对照 - 新增对象上下文业务域入口页导航实现说明 - 添加Vue DevTools浮动入口注释说明 - 统一权限控制支持全局和对象作用域区分 - 规范分页查询参数类型定义与使用方式
983 lines
28 KiB
TypeScript
983 lines
28 KiB
TypeScript
/** 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;
|
|
};
|
|
scopeType: {
|
|
global: string;
|
|
object: string;
|
|
};
|
|
objectType: {
|
|
product: string;
|
|
project: 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;
|
|
currentRoleCount: string;
|
|
globalRoleTitle: string;
|
|
objectRoleTitle: string;
|
|
globalRoleSummary: string;
|
|
objectRoleSummary: string;
|
|
objectRoleSummaryProduct: string;
|
|
objectRoleSummaryProject: 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;
|
|
scopeType: string;
|
|
objectType: string;
|
|
resourceCode: string;
|
|
routeName: string;
|
|
routePath: string;
|
|
routeKind: string;
|
|
routePropsJson: string;
|
|
pageResource: string;
|
|
boundRoute: 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;
|
|
contextEyebrow: string;
|
|
contextTitle: string;
|
|
contextDescription: string;
|
|
currentContext: string;
|
|
currentResourceCount: string;
|
|
editorMode: string;
|
|
editorModeGlobal: string;
|
|
editorModeObject: string;
|
|
globalResourceTitle: string;
|
|
objectResourceTitle: string;
|
|
globalResourceSummary: string;
|
|
objectResourceSummary: string;
|
|
objectResourceSummaryProduct: string;
|
|
objectResourceSummaryProject: string;
|
|
scopeHintGlobal: string;
|
|
scopeHintObject: string;
|
|
objectTypePlaceholder: string;
|
|
contextReady: string;
|
|
contextPending: string;
|
|
objectTypeRequiredTitle: string;
|
|
objectTypeRequiredDescription: string;
|
|
objectModeTipTitle: string;
|
|
objectModeTipDescription: string;
|
|
sections: {
|
|
basic: string;
|
|
route: string;
|
|
display: string;
|
|
};
|
|
form: {
|
|
home: string;
|
|
menuType: string;
|
|
parentId: string;
|
|
menuName: string;
|
|
permission: string;
|
|
resourceCode: string;
|
|
routeName: string;
|
|
routePath: string;
|
|
path: string;
|
|
component: string;
|
|
componentName: string;
|
|
routeKind: string;
|
|
pageResource: string;
|
|
boundRoute: 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;
|
|
boundRoute: string;
|
|
component: string;
|
|
};
|
|
addMenu: string;
|
|
editMenu: string;
|
|
addChildMenu: string;
|
|
type: {
|
|
directory: string;
|
|
menu: string;
|
|
button: string;
|
|
navigation: string;
|
|
actionButton: 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;
|
|
};
|
|
}
|
|
}
|