@gct-paas/core 0.1.6-dev.9 → 6.0.0-dev.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +322 -0
- package/dist/index.esm.min.js +2 -1
- package/dist/{redirect-index-Ck5Ddtcb.js → redirect-index-DZ5iDlhA.js} +1 -0
- package/es/_virtual/_rolldown/runtime.mjs +13 -0
- package/es/constants/expression-type/modeCfg.mjs +6 -0
- package/es/constants/index.d.ts +4 -0
- package/es/constants/index.mjs +5 -1
- package/es/enums/app-designer/index.d.ts +29 -3
- package/es/enums/app-designer/index.mjs +33 -4
- package/es/enums/appEnum.d.ts +5 -1
- package/es/enums/appEnum.mjs +6 -1
- package/es/enums/authActionEnum.d.ts +5 -1
- package/es/enums/authActionEnum.mjs +4 -0
- package/es/enums/developer-center/integration.d.ts +6 -0
- package/es/enums/developer-center/integration.mjs +8 -1
- package/es/enums/expressionEnum.d.ts +4 -2
- package/es/enums/expressionEnum.mjs +2 -0
- package/es/enums/globalEnum.d.ts +30 -0
- package/es/enums/globalEnum.mjs +40 -1
- package/es/enums/index.d.ts +11 -0
- package/es/enums/index.mjs +13 -1
- package/es/enums/page-designer/designer.d.ts +2 -0
- package/es/enums/page-designer/designer.mjs +2 -0
- package/es/enums/page-designer/panel.d.ts +9 -2
- package/es/enums/page-designer/panel.mjs +10 -2
- package/es/enums/pageEnum.d.ts +2 -1
- package/es/enums/pageEnum.mjs +1 -0
- package/es/enums/process.d.ts +5 -0
- package/es/enums/process.mjs +9 -0
- package/es/enums/sizeEnum.d.ts +4 -0
- package/es/enums/sizeEnum.mjs +6 -1
- package/es/global/gct/gct.d.ts +25 -19
- package/es/global/gct/gct.mjs +9 -5
- package/es/hooks/index.d.ts +1 -0
- package/es/hooks/index.mjs +1 -0
- package/es/hooks/useDebouncePromise.d.ts +14 -0
- package/es/hooks/useDebouncePromise.mjs +56 -0
- package/es/index.d.ts +2 -0
- package/es/index.mjs +36 -27
- package/es/interface/i-action-item/i-action-item.d.ts +65 -0
- package/es/interface/i-app-context/i-app-context.d.ts +25 -0
- package/es/interface/i-dictionary/i-dictionary-item.d.ts +80 -0
- package/es/interface/i-pinia-action/i-global-actions.d.ts +9 -0
- package/es/interface/i-pinia-getter/i-global-getters.d.ts +22 -1
- package/es/interface/i-pinia-state/i-global-state.d.ts +9 -2
- package/es/interface/index.d.ts +2 -1
- package/es/interface/open-util/i-confirm-util/i-confirm-util.d.ts +65 -0
- package/es/interface/open-util/i-drawer-options/i-drawer-options.d.ts +298 -0
- package/es/interface/open-util/i-modal/i-modal.d.ts +14 -1
- package/es/interface/open-util/i-modal-data/i-modal-data.d.ts +3 -3
- package/es/interface/open-util/i-modal-options/i-modal-options.d.ts +2 -1
- package/es/interface/open-util/i-overlay-controller/i-overlay-controller.d.ts +9 -0
- package/es/interface/open-util/index.d.ts +2 -0
- package/es/locale/auto-register.d.ts +2 -0
- package/es/locale/auto-register.mjs +13 -0
- package/es/locale/index.d.ts +25 -1
- package/es/locale/index.mjs +57 -3
- package/es/locale/sys/model.mjs +9 -0
- package/es/locale/sys.d.ts +17 -0
- package/es/locale/sys.mjs +26 -0
- package/es/modules/env-manager/env-manager.const.d.ts +2 -0
- package/es/modules/env-manager/env-manager.const.mjs +4 -2
- package/es/modules/env-manager/env-manager.d.ts +8 -13
- package/es/modules/env-manager/env-manager.interface.d.ts +5 -9
- package/es/modules/env-manager/env-manager.interface.mjs +2 -0
- package/es/modules/env-manager/env-manager.mjs +19 -27
- package/es/modules/env-manager/env-manager.util.d.ts +5 -0
- package/es/modules/env-manager/env-manager.util.mjs +11 -0
- package/es/modules/env-manager/index.d.ts +1 -0
- package/es/modules/env-manager/index.mjs +1 -0
- package/es/modules/mqtt/interfaces/i-mqtt.d.ts +6 -2
- package/es/modules/mqtt/mqtt-client.d.ts +8 -7
- package/es/modules/mqtt/mqtt-client.mjs +30 -19
- package/es/modules/platform-config/constants/theme.const.d.ts +9 -1
- package/es/modules/platform-config/constants/theme.const.mjs +13 -2
- package/es/modules/platform-config/enums/login.enum.d.ts +3 -1
- package/es/modules/platform-config/enums/login.enum.mjs +2 -0
- package/es/modules/platform-config/store.d.ts +18 -18
- package/es/modules/platform-config/useDeploySetting.d.ts +1 -2
- package/es/modules/platform-config/useDeploySetting.mjs +6 -3
- package/es/modules/platform-config/useLoginSetting.d.ts +2 -2
- package/es/modules/platform-config/useLoginSetting.mjs +29 -31
- package/es/modules/platform-config/useOrgSetting.d.ts +2 -2
- package/es/modules/platform-config/useOrgSetting.mjs +4 -6
- package/es/modules/platform-config/useSecuritySetting.d.ts +2 -2
- package/es/modules/platform-config/useSecuritySetting.mjs +2 -3
- package/es/modules/platform-config/useThemeSetting.d.ts +1 -1
- package/es/modules/platform-config/useThemeSetting.mjs +32 -4
- package/es/modules/platform-config/useWatermarkSetting.d.ts +5 -2
- package/es/modules/platform-config/useWatermarkSetting.mjs +2 -3
- package/es/modules/sign-log/index.d.ts +1 -0
- package/es/modules/sign-log/index.mjs +1 -0
- package/es/modules/sign-log/sign-log.d.ts +10 -0
- package/es/modules/sign-log/sign-log.mjs +109 -0
- package/es/modules/sign-log/sing-log.interface.d.ts +9 -0
- package/es/modules/system-mqtt/index.d.ts +2 -0
- package/es/modules/system-mqtt/index.mjs +1 -0
- package/es/modules/system-mqtt/system-mqtt.interface.d.ts +71 -0
- package/es/modules/system-mqtt/system-mqtt.service.d.ts +104 -0
- package/es/modules/system-mqtt/system-mqtt.service.mjs +199 -0
- package/es/modules/user-stores/store/permission.store.d.ts +1 -0
- package/es/modules/user-stores/store/permission.store.mjs +10 -0
- package/es/modules/user-stores/store/user.store.mjs +4 -2
- package/es/router/guard/index.d.ts +4 -0
- package/es/router/guard/index.mjs +41 -0
- package/es/router/index.mjs +2 -0
- package/es/setup-app.mjs +2 -9
- package/es/state/global-pinia-state/global-pinia-state.d.ts +6 -0
- package/es/state/global-pinia-state/global-pinia-state.mjs +6 -0
- package/es/store/global-store.mjs +15 -1
- package/es/types/index.d.ts +7 -0
- package/es/utils/auth-util/auth-util.d.ts +37 -0
- package/es/utils/auth-util/auth-util.mjs +79 -0
- package/es/utils/axios/check-status.d.ts +1 -0
- package/es/utils/axios/check-status.mjs +64 -0
- package/es/utils/axios/interceptors.mjs +30 -0
- package/es/utils/deviceFingerprint.mjs +5 -1
- package/es/utils/i18n/index.mjs +1 -0
- package/es/utils/index.d.ts +4 -2
- package/es/utils/index.mjs +3 -1
- package/es/utils/openUtil/modal/modal.d.ts +1 -1
- package/es/utils/openUtil/modal/modal.mjs +1 -1
- package/es/utils/openUtil/overlay-container/overlay-container.mjs +1 -1
- package/es/utils/select-user-utils.d.ts +50 -0
- package/es/utils/select-user-utils.mjs +129 -0
- package/es/utils/tools/tools.d.ts +6 -0
- package/es/utils/tools/tools.mjs +12 -3
- package/package.json +5 -3
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { UserLoginResp } from '@gct-paas/api/platform';
|
|
1
2
|
import { ProjectName } from '../../enums';
|
|
2
3
|
import { IAppContext } from '..';
|
|
3
4
|
/**
|
|
@@ -19,6 +20,12 @@ export interface IGlobalActions {
|
|
|
19
20
|
* @param {ProjectName} name
|
|
20
21
|
*/
|
|
21
22
|
setProjectName(name: ProjectName): void;
|
|
23
|
+
/**
|
|
24
|
+
* 设置页面加载状态
|
|
25
|
+
*
|
|
26
|
+
* @param {boolean} loading
|
|
27
|
+
*/
|
|
28
|
+
setPageLoading(loading: boolean): void;
|
|
22
29
|
/**
|
|
23
30
|
* 设置租户标识
|
|
24
31
|
*
|
|
@@ -36,4 +43,6 @@ export interface IGlobalActions {
|
|
|
36
43
|
setContext(state: Partial<IAppContext>): void;
|
|
37
44
|
/**设置应用标识 */
|
|
38
45
|
setAid(aid: string): void;
|
|
46
|
+
/** 更新个人信息 */
|
|
47
|
+
updateUserInfo(info: UserLoginResp): void;
|
|
39
48
|
}
|
|
@@ -8,7 +8,28 @@ import { IGlobalState } from '../i-pinia-state/i-global-state';
|
|
|
8
8
|
* @extends {_GettersTree<IGlobalState>}
|
|
9
9
|
*/
|
|
10
10
|
export interface IGlobalGetters extends _GettersTree<IGlobalState> {
|
|
11
|
+
/**
|
|
12
|
+
* 当前项目名称
|
|
13
|
+
*
|
|
14
|
+
* @return {*} {string}
|
|
15
|
+
*/
|
|
11
16
|
getProjectName(): string;
|
|
12
|
-
|
|
17
|
+
/**
|
|
18
|
+
* 空值显示内容
|
|
19
|
+
*
|
|
20
|
+
* @return {*} {string}
|
|
21
|
+
*/
|
|
13
22
|
getEmptyDisplay(): string;
|
|
23
|
+
/**
|
|
24
|
+
* 获取用户信息
|
|
25
|
+
*
|
|
26
|
+
* @return {*} {IObject}
|
|
27
|
+
*/
|
|
28
|
+
getAppInfo(): IObject;
|
|
29
|
+
/**
|
|
30
|
+
* 获取页面加载状态
|
|
31
|
+
*
|
|
32
|
+
* @return {*} {boolean}
|
|
33
|
+
*/
|
|
34
|
+
getPageLoading(): boolean;
|
|
14
35
|
}
|
|
@@ -2,6 +2,7 @@ import { StateTree } from 'pinia';
|
|
|
2
2
|
import { ProjectName, nullDisplayEnum } from '../../enums';
|
|
3
3
|
import { IAppContext } from '../i-app-context/i-app-context';
|
|
4
4
|
import { UserLoginResp } from '@gct-paas/api/platform';
|
|
5
|
+
import { GetAppResponse } from '@gct-paas/api/apaas';
|
|
5
6
|
/**
|
|
6
7
|
* 全局 store 状态
|
|
7
8
|
*
|
|
@@ -21,12 +22,18 @@ export interface IGlobalState extends StateTree {
|
|
|
21
22
|
* @type {ProjectName}
|
|
22
23
|
*/
|
|
23
24
|
projectName: ProjectName;
|
|
25
|
+
/**
|
|
26
|
+
* setting 中的页面加载配置开启时,路由守卫中会触发 loading
|
|
27
|
+
*
|
|
28
|
+
* @type {boolean}
|
|
29
|
+
*/
|
|
30
|
+
pageLoading: boolean;
|
|
24
31
|
/**
|
|
25
32
|
* 应用信息, todo: 等 api 包完成后,实际类型从 api 导入
|
|
26
33
|
*
|
|
27
|
-
* @type {
|
|
34
|
+
* @type {GetAppResponse}
|
|
28
35
|
*/
|
|
29
|
-
appInfo:
|
|
36
|
+
appInfo: GetAppResponse;
|
|
30
37
|
/**
|
|
31
38
|
* 用户信息(user.store.ts 中加载后赋值)
|
|
32
39
|
*
|
package/es/interface/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export type * from './i-app-context/i-app-context';
|
|
2
2
|
export type { IGlobalRegister } from './i-global-register/i-global-register';
|
|
3
3
|
export type { IDictionary } from './i-dictionary/i-dictionary';
|
|
4
|
-
export type { IDictionaryItem } from './i-dictionary/i-dictionary-item';
|
|
4
|
+
export type { IDictionaryItem, ICodeItem, } from './i-dictionary/i-dictionary-item';
|
|
5
5
|
export type { IFieldCodeChain } from './i-field-code-chain/i-field-code-chain';
|
|
6
6
|
export type { GlobalVar } from './i-global-var/i-global-var';
|
|
7
7
|
export type { IMobileHomeMenuItem } from './i-mobile-home-menu-item/i-mobile-home-menu-item';
|
|
@@ -10,6 +10,7 @@ export type { IGlobalActions } from './i-pinia-action/i-global-actions';
|
|
|
10
10
|
export type { IGlobalGetters } from './i-pinia-getter/i-global-getters';
|
|
11
11
|
export type { IGlobalState, emptyDisplayType, } from './i-pinia-state/i-global-state';
|
|
12
12
|
export type { IPopoverOptions } from './i-popover-options/i-popover-options';
|
|
13
|
+
export type { IActionItem } from './i-action-item/i-action-item';
|
|
13
14
|
export type * from './model-designer/entity';
|
|
14
15
|
export * from './model-designer/serial';
|
|
15
16
|
export type * from './open-util';
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 确认工具接口
|
|
3
|
+
*
|
|
4
|
+
* @export
|
|
5
|
+
* @interface IConfirmParams
|
|
6
|
+
*/
|
|
7
|
+
export interface IConfirmParams {
|
|
8
|
+
/**
|
|
9
|
+
* 确认框标题
|
|
10
|
+
*
|
|
11
|
+
* @type {string}
|
|
12
|
+
*/
|
|
13
|
+
title: string;
|
|
14
|
+
/**
|
|
15
|
+
* 确认框内容
|
|
16
|
+
*
|
|
17
|
+
* @type {string}
|
|
18
|
+
*/
|
|
19
|
+
content: string;
|
|
20
|
+
/**
|
|
21
|
+
* 确认框确认按钮文本
|
|
22
|
+
*
|
|
23
|
+
* @type {string}
|
|
24
|
+
*/
|
|
25
|
+
okText?: string;
|
|
26
|
+
/**
|
|
27
|
+
* 确认框取消按钮文本
|
|
28
|
+
*
|
|
29
|
+
* @type {string}
|
|
30
|
+
*/
|
|
31
|
+
cancelText?: string;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* 确认工具接口
|
|
35
|
+
*
|
|
36
|
+
* @export
|
|
37
|
+
* @interface IConfirmUtil
|
|
38
|
+
*/
|
|
39
|
+
export interface IConfirmUtil {
|
|
40
|
+
/**
|
|
41
|
+
* 弹出确认框
|
|
42
|
+
*
|
|
43
|
+
*/
|
|
44
|
+
confirm(options: IConfirmParams): Promise<boolean>;
|
|
45
|
+
/**
|
|
46
|
+
* 弹出信息提示框
|
|
47
|
+
*
|
|
48
|
+
*/
|
|
49
|
+
info(options: IConfirmParams): Promise<void>;
|
|
50
|
+
/**
|
|
51
|
+
* 弹出成功提示框
|
|
52
|
+
*
|
|
53
|
+
*/
|
|
54
|
+
success(options: IConfirmParams): Promise<void>;
|
|
55
|
+
/**
|
|
56
|
+
* 弹出警告提示框
|
|
57
|
+
*
|
|
58
|
+
*/
|
|
59
|
+
warning(options: IConfirmParams): Promise<void>;
|
|
60
|
+
/**
|
|
61
|
+
* 弹出错误提示框
|
|
62
|
+
*
|
|
63
|
+
*/
|
|
64
|
+
error(options: IConfirmParams): Promise<void>;
|
|
65
|
+
}
|
|
@@ -0,0 +1,298 @@
|
|
|
1
|
+
import { CSSProperties } from 'vue';
|
|
2
|
+
/**
|
|
3
|
+
* 模态飘窗配置项
|
|
4
|
+
*
|
|
5
|
+
* @author zhanghanrui
|
|
6
|
+
* @date 2024-03-29 13:03:31
|
|
7
|
+
* @export
|
|
8
|
+
* @interface IDrawerOptions
|
|
9
|
+
*/
|
|
10
|
+
export interface IDrawerOptions {
|
|
11
|
+
/**
|
|
12
|
+
* 抽屉展开后是否将焦点切换至其 Dom 节点
|
|
13
|
+
*
|
|
14
|
+
* @default true
|
|
15
|
+
* @author zhanghanrui
|
|
16
|
+
* @date 2024-03-29 13:03:51
|
|
17
|
+
* @type {boolean}
|
|
18
|
+
*/
|
|
19
|
+
autofocus?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* 可用于设置 Drawer 内容部分的样式
|
|
22
|
+
*
|
|
23
|
+
* @author zhanghanrui
|
|
24
|
+
* @date 2024-03-29 13:03:26
|
|
25
|
+
* @type {CSSProperties}
|
|
26
|
+
*/
|
|
27
|
+
bodyStyle?: CSSProperties;
|
|
28
|
+
/**
|
|
29
|
+
* 对话框外层容器的类名
|
|
30
|
+
*
|
|
31
|
+
* @author zhanghanrui
|
|
32
|
+
* @date 2024-03-29 13:03:57
|
|
33
|
+
* @type {string}
|
|
34
|
+
*/
|
|
35
|
+
class?: string;
|
|
36
|
+
/**
|
|
37
|
+
* 是否显示左上角的关闭按钮
|
|
38
|
+
*
|
|
39
|
+
* @default true
|
|
40
|
+
* @author zhanghanrui
|
|
41
|
+
* @date 2024-03-29 13:03:23
|
|
42
|
+
* @type {boolean}
|
|
43
|
+
*/
|
|
44
|
+
closable?: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* 自定义关闭图标
|
|
47
|
+
*
|
|
48
|
+
* @author zhanghanrui
|
|
49
|
+
* @date 2024-03-29 13:03:30
|
|
50
|
+
* @type {*}
|
|
51
|
+
*/
|
|
52
|
+
closeIcon?: unknown;
|
|
53
|
+
/**
|
|
54
|
+
* 可用于设置 Drawer 包裹内容部分的样式
|
|
55
|
+
*
|
|
56
|
+
* @author zhanghanrui
|
|
57
|
+
* @date 2024-03-29 13:03:39
|
|
58
|
+
* @type {CSSProperties}
|
|
59
|
+
*/
|
|
60
|
+
contentWrapperStyle?: CSSProperties;
|
|
61
|
+
/**
|
|
62
|
+
* 关闭时销毁 Drawer 里的子元素
|
|
63
|
+
*
|
|
64
|
+
* @default false
|
|
65
|
+
* @author zhanghanrui
|
|
66
|
+
* @date 2024-03-29 13:03:25
|
|
67
|
+
* @type {boolean}
|
|
68
|
+
*/
|
|
69
|
+
destroyOnClose?: boolean;
|
|
70
|
+
/**
|
|
71
|
+
* 用于设置 Drawer 弹出层的样式
|
|
72
|
+
*
|
|
73
|
+
* @author zhanghanrui
|
|
74
|
+
* @date 2024-03-29 13:03:52
|
|
75
|
+
* @type {Object}
|
|
76
|
+
*/
|
|
77
|
+
drawerStyle?: object;
|
|
78
|
+
/**
|
|
79
|
+
* 抽屉右上角的操作区域
|
|
80
|
+
*
|
|
81
|
+
* @author zhanghanrui
|
|
82
|
+
* @date 2024-03-29 13:03:16
|
|
83
|
+
* @type {(VNode | slot)}
|
|
84
|
+
*/
|
|
85
|
+
extra?: unknown;
|
|
86
|
+
/**
|
|
87
|
+
* 抽屉的页脚
|
|
88
|
+
*
|
|
89
|
+
* @author zhanghanrui
|
|
90
|
+
* @date 2024-03-29 13:03:04
|
|
91
|
+
* @type {(VNode | slot)}
|
|
92
|
+
*/
|
|
93
|
+
footer?: unknown;
|
|
94
|
+
/**
|
|
95
|
+
* 抽屉页脚部件的样式
|
|
96
|
+
*
|
|
97
|
+
* @author zhanghanrui
|
|
98
|
+
* @date 2024-03-29 13:03:23
|
|
99
|
+
* @type {CSSProperties}
|
|
100
|
+
*/
|
|
101
|
+
footerStyle?: CSSProperties;
|
|
102
|
+
/**
|
|
103
|
+
* 预渲染 Drawer 内元素
|
|
104
|
+
*
|
|
105
|
+
* @default false
|
|
106
|
+
* @author zhanghanrui
|
|
107
|
+
* @date 2024-03-29 13:03:10
|
|
108
|
+
* @type {boolean}
|
|
109
|
+
*/
|
|
110
|
+
forceRender?: boolean;
|
|
111
|
+
/**
|
|
112
|
+
* 指定 Drawer 挂载的 HTML 节点
|
|
113
|
+
*
|
|
114
|
+
* @author zhanghanrui
|
|
115
|
+
* @date 2024-03-29 13:03:49
|
|
116
|
+
*/
|
|
117
|
+
getContainer?: HTMLElement;
|
|
118
|
+
/**
|
|
119
|
+
* 用于设置 Drawer 头部的样式
|
|
120
|
+
*
|
|
121
|
+
* @author zhanghanrui
|
|
122
|
+
* @date 2024-03-29 13:03:25
|
|
123
|
+
* @type {CSSProperties}
|
|
124
|
+
*/
|
|
125
|
+
headerStyle?: CSSProperties;
|
|
126
|
+
/**
|
|
127
|
+
* 高度, 在 placement 为 top 或 bottom 时使用
|
|
128
|
+
*
|
|
129
|
+
* @author zhanghanrui
|
|
130
|
+
* @date 2024-03-29 13:03:40
|
|
131
|
+
* @type {(string | number)}
|
|
132
|
+
*/
|
|
133
|
+
height?: string | number;
|
|
134
|
+
/**
|
|
135
|
+
* 是否支持键盘 esc 关闭
|
|
136
|
+
*
|
|
137
|
+
* @default true
|
|
138
|
+
* @author zhanghanrui
|
|
139
|
+
* @date 2024-03-29 13:03:54
|
|
140
|
+
* @type {boolean}
|
|
141
|
+
*/
|
|
142
|
+
keyboard?: boolean;
|
|
143
|
+
/**
|
|
144
|
+
* 是否展示遮罩
|
|
145
|
+
*
|
|
146
|
+
* @default true
|
|
147
|
+
* @author zhanghanrui
|
|
148
|
+
* @date 2024-03-29 13:03:17
|
|
149
|
+
* @type {boolean}
|
|
150
|
+
*/
|
|
151
|
+
mask?: boolean;
|
|
152
|
+
/**
|
|
153
|
+
* 点击蒙层是否允许关闭
|
|
154
|
+
*
|
|
155
|
+
* @default true
|
|
156
|
+
* @author zhanghanrui
|
|
157
|
+
* @date 2024-03-29 13:03:34
|
|
158
|
+
* @type {boolean}
|
|
159
|
+
*/
|
|
160
|
+
maskClosable?: boolean;
|
|
161
|
+
/**
|
|
162
|
+
* 遮罩样式
|
|
163
|
+
*
|
|
164
|
+
* @author zhanghanrui
|
|
165
|
+
* @date 2024-03-29 13:03:49
|
|
166
|
+
* @type {CSSProperties}
|
|
167
|
+
*/
|
|
168
|
+
maskStyle?: CSSProperties;
|
|
169
|
+
/**
|
|
170
|
+
* 抽屉的方向
|
|
171
|
+
*
|
|
172
|
+
* @default 'right'
|
|
173
|
+
* @author zhanghanrui
|
|
174
|
+
* @date 2024-03-29 13:03:05
|
|
175
|
+
* @type {('top' | 'right' | 'bottom' | 'left')}
|
|
176
|
+
*/
|
|
177
|
+
placement?: 'top' | 'right' | 'bottom' | 'left';
|
|
178
|
+
/**
|
|
179
|
+
* 用于设置多层 Drawer 的推动行为
|
|
180
|
+
*
|
|
181
|
+
* @default { distance: 180 }
|
|
182
|
+
* @author zhanghanrui
|
|
183
|
+
* @date 2024-03-29 13:03:27
|
|
184
|
+
* @type {(boolean | { distance: string | number })}
|
|
185
|
+
*/
|
|
186
|
+
push?: boolean | {
|
|
187
|
+
distance: string | number;
|
|
188
|
+
};
|
|
189
|
+
/**
|
|
190
|
+
* 预设抽屉宽度(或高度)
|
|
191
|
+
*
|
|
192
|
+
* @default 'default'
|
|
193
|
+
* @author zhanghanrui
|
|
194
|
+
* @date 2024-03-29 13:03:01
|
|
195
|
+
* @type {('default' | 'large')}
|
|
196
|
+
*/
|
|
197
|
+
size?: 'default' | 'large';
|
|
198
|
+
/**
|
|
199
|
+
* 可用于设置 Drawer 最外层容器的样式,和 drawerStyle 的区别是作用节点包括 mask
|
|
200
|
+
*
|
|
201
|
+
* @author zhanghanrui
|
|
202
|
+
* @date 2024-03-29 13:03:23
|
|
203
|
+
* @type {CSSProperties}
|
|
204
|
+
*/
|
|
205
|
+
style?: CSSProperties;
|
|
206
|
+
/**
|
|
207
|
+
* 抽屉的标题
|
|
208
|
+
*
|
|
209
|
+
* @author zhanghanrui
|
|
210
|
+
* @date 2024-03-29 13:03:32
|
|
211
|
+
* @type {string}
|
|
212
|
+
*/
|
|
213
|
+
title?: string;
|
|
214
|
+
/**
|
|
215
|
+
* (v-model) Drawer 是否可见
|
|
216
|
+
*
|
|
217
|
+
* @author zhanghanrui
|
|
218
|
+
* @date 2024-03-29 13:03:41
|
|
219
|
+
* @type {boolean}
|
|
220
|
+
*/
|
|
221
|
+
visible?: boolean;
|
|
222
|
+
/**
|
|
223
|
+
* 宽度
|
|
224
|
+
*
|
|
225
|
+
* @default 378
|
|
226
|
+
* @author zhanghanrui
|
|
227
|
+
* @date 2024-03-29 13:03:58
|
|
228
|
+
* @type {(string | number)}
|
|
229
|
+
*/
|
|
230
|
+
width?: string | number;
|
|
231
|
+
/**
|
|
232
|
+
* 设置 Drawer 的 z-index
|
|
233
|
+
*
|
|
234
|
+
* @default 1000
|
|
235
|
+
* @author zhanghanrui
|
|
236
|
+
* @date 2024-03-29 13:03:21
|
|
237
|
+
* @type {number}
|
|
238
|
+
*/
|
|
239
|
+
zIndex?: number;
|
|
240
|
+
/**
|
|
241
|
+
* 是否为详情模式
|
|
242
|
+
*
|
|
243
|
+
* @author zhanghanrui
|
|
244
|
+
* @date 2024-03-29 13:03:34
|
|
245
|
+
* @type {boolean}
|
|
246
|
+
*/
|
|
247
|
+
isDetail?: boolean;
|
|
248
|
+
/**
|
|
249
|
+
* loading 状态
|
|
250
|
+
*
|
|
251
|
+
* @default false
|
|
252
|
+
* @author zhanghanrui
|
|
253
|
+
* @date 2024-03-29 13:03:48
|
|
254
|
+
* @type {boolean}
|
|
255
|
+
*/
|
|
256
|
+
loading?: boolean;
|
|
257
|
+
/**
|
|
258
|
+
* loading 文本
|
|
259
|
+
*
|
|
260
|
+
* @author zhanghanrui
|
|
261
|
+
* @date 2024-03-29 13:03:02
|
|
262
|
+
* @type {string}
|
|
263
|
+
*/
|
|
264
|
+
loadingText?: string;
|
|
265
|
+
/**
|
|
266
|
+
* isDetail=true 状态下是否显示返回按钮
|
|
267
|
+
*
|
|
268
|
+
* @default true
|
|
269
|
+
* @author zhanghanrui
|
|
270
|
+
* @date 2024-03-29 14:03:03
|
|
271
|
+
* @type {boolean}
|
|
272
|
+
*/
|
|
273
|
+
showDetailBack?: boolean;
|
|
274
|
+
/**
|
|
275
|
+
* 自定义关闭函数,返回true关闭,否则不关闭
|
|
276
|
+
*
|
|
277
|
+
* @author zhanghanrui
|
|
278
|
+
* @date 2024-03-29 14:03:42
|
|
279
|
+
*/
|
|
280
|
+
closeFunc?: () => Promise<boolean>;
|
|
281
|
+
/**
|
|
282
|
+
* 是否显示底部
|
|
283
|
+
*
|
|
284
|
+
* @author zhanghanrui
|
|
285
|
+
* @date 2024-03-29 14:03:55
|
|
286
|
+
* @type {boolean}
|
|
287
|
+
*/
|
|
288
|
+
showFooter?: boolean;
|
|
289
|
+
/**
|
|
290
|
+
* 底部区域高度
|
|
291
|
+
*
|
|
292
|
+
* @default 60
|
|
293
|
+
* @author zhanghanrui
|
|
294
|
+
* @date 2024-03-29 14:03:22
|
|
295
|
+
* @type {number}
|
|
296
|
+
*/
|
|
297
|
+
footerHeight?: number;
|
|
298
|
+
}
|
|
@@ -32,6 +32,18 @@ export interface IModal {
|
|
|
32
32
|
* @type {IModalHooks}
|
|
33
33
|
*/
|
|
34
34
|
hooks: IModalHooks;
|
|
35
|
+
/**
|
|
36
|
+
* 模态界面状态
|
|
37
|
+
*
|
|
38
|
+
* @type {{
|
|
39
|
+
* okDisabled?: boolean; // 确认按钮是否禁用
|
|
40
|
+
* cancelDisabled?: boolean; // 取消按钮是否禁用
|
|
41
|
+
* }}
|
|
42
|
+
*/
|
|
43
|
+
state: {
|
|
44
|
+
okDisabled?: boolean;
|
|
45
|
+
cancelDisabled?: boolean;
|
|
46
|
+
};
|
|
35
47
|
/**
|
|
36
48
|
* 统一关闭入口
|
|
37
49
|
*
|
|
@@ -58,8 +70,9 @@ export interface IModal {
|
|
|
58
70
|
* @author zhanghanrui
|
|
59
71
|
* @date 2024-03-29 11:03:03
|
|
60
72
|
* @param {(() => Promise<IModalData | null>)} ok
|
|
73
|
+
* @param {(() => Promise<boolean>)} [cancel]
|
|
61
74
|
*/
|
|
62
|
-
callback(ok: () => Promise<IModalData | null>): void;
|
|
75
|
+
callback(ok: () => Promise<IModalData | null>, cancel?: () => Promise<boolean>): void;
|
|
63
76
|
/**
|
|
64
77
|
* 取消操作
|
|
65
78
|
*
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* @export
|
|
7
7
|
* @interface IModalData
|
|
8
8
|
*/
|
|
9
|
-
export interface IModalData {
|
|
9
|
+
export interface IModalData<T = IData> {
|
|
10
10
|
/**
|
|
11
11
|
* 关闭模态窗时是否操作成功
|
|
12
12
|
*
|
|
@@ -26,9 +26,9 @@ export interface IModalData {
|
|
|
26
26
|
*
|
|
27
27
|
* @author zhanghanrui
|
|
28
28
|
* @date 2024-03-19 20:03:44
|
|
29
|
-
* @type {
|
|
29
|
+
* @type {T[]}
|
|
30
30
|
*/
|
|
31
|
-
data?:
|
|
31
|
+
data?: T[];
|
|
32
32
|
/**
|
|
33
33
|
* 额外参数
|
|
34
34
|
*
|
|
@@ -2,6 +2,7 @@ import { ComputePositionConfig } from '@floating-ui/dom';
|
|
|
2
2
|
import { IOverlayContainer } from '../i-overlay-container/i-overlay-container';
|
|
3
3
|
import { IModalOptions } from '../i-modal-options/i-modal-options';
|
|
4
4
|
import { IModalData } from '../i-modal-data/i-modal-data';
|
|
5
|
+
import { IDrawerOptions } from '../i-drawer-options/i-drawer-options';
|
|
5
6
|
import { IPopoverOptions } from '../../i-popover-options/i-popover-options';
|
|
6
7
|
import { IOverlayPopoverContainer } from '../i-overlay-popover-container/i-overlay-popover-container';
|
|
7
8
|
import { IAppFullScreenContainerOptions } from '../i-app-full-screen-container-options/i-app-full-screen-container-options';
|
|
@@ -38,6 +39,14 @@ export interface IOverlayController {
|
|
|
38
39
|
* @return {*} {IOverlayContainer}
|
|
39
40
|
*/
|
|
40
41
|
createModal(component: unknown, props?: IParams, opts?: IModalOptions): IOverlayContainer;
|
|
42
|
+
/**
|
|
43
|
+
* 抽屉打开组件
|
|
44
|
+
*/
|
|
45
|
+
drawer<T = IModalData>(component: unknown, props?: IParams, opts?: IDrawerOptions): Promise<T>;
|
|
46
|
+
/**
|
|
47
|
+
* 创建全局抽屉容器
|
|
48
|
+
*/
|
|
49
|
+
createDrawer(component: unknown, props?: IParams, opts?: IDrawerOptions): IOverlayContainer;
|
|
41
50
|
/**
|
|
42
51
|
* 飘窗打开组件
|
|
43
52
|
*
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
export type { IDrawerOptions } from './i-drawer-options/i-drawer-options';
|
|
1
2
|
export type { IAppFullScreenContainerOptions } from './i-app-full-screen-container-options/i-app-full-screen-container-options';
|
|
3
|
+
export type { IConfirmParams, IConfirmUtil, } from './i-confirm-util/i-confirm-util';
|
|
2
4
|
export type { IMessageParams, IMessageUtil, } from './i-message-util/i-message-util';
|
|
3
5
|
export type { IModal } from './i-modal/i-modal';
|
|
4
6
|
export type { IModalData } from './i-modal-data/i-modal-data';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { model_exports } from "./sys/model.mjs";
|
|
2
|
+
import { sys_exports } from "./sys.mjs";
|
|
3
|
+
//#region src/locale/auto-register.ts
|
|
4
|
+
var localeModules = /* @__PURE__ */ Object.assign({
|
|
5
|
+
"./sys/model.ts": model_exports,
|
|
6
|
+
"./sys.ts": sys_exports
|
|
7
|
+
});
|
|
8
|
+
/** 注册 core 包的 locale 多语言资源 */
|
|
9
|
+
function registerCoreLocale() {
|
|
10
|
+
_gct.i18nUtil.autoRegisterLocale(localeModules);
|
|
11
|
+
}
|
|
12
|
+
//#endregion
|
|
13
|
+
export { registerCoreLocale };
|
package/es/locale/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { I18n } from 'vue-i18n';
|
|
2
2
|
import { App } from 'vue';
|
|
3
3
|
import { I18nConfigResponse } from '@gct-paas/api/platform';
|
|
4
|
+
import { EnvironmentType } from '../modules/env-manager';
|
|
4
5
|
type localeItem = Pick<I18nConfigResponse, 'id' | 'configured' | 'defaultLanguage' | 'language' | 'languageTag' | 'state'>;
|
|
5
6
|
type ILocaleMessages = Record<string, string>;
|
|
6
7
|
type ILocaleDeclarations = Record<string, ILocaleMessages>;
|
|
@@ -33,14 +34,37 @@ export declare class LocaleUtil {
|
|
|
33
34
|
/**加载语言列表 */
|
|
34
35
|
protected loadLocales(): Promise<void>;
|
|
35
36
|
protected loadMessages(url?: string, locale?: string): Promise<void>;
|
|
37
|
+
/**
|
|
38
|
+
* 容错解析多语言文件内容。
|
|
39
|
+
* 兼容:已解析的 JSON 对象、JSON 字符串、双重编码的 JSON 字符串、旧版按行 key:value 文本。
|
|
40
|
+
*
|
|
41
|
+
* @param data 接口返回的多语言内容
|
|
42
|
+
* @returns 解析后的 key→文案 映射
|
|
43
|
+
*/
|
|
44
|
+
private parseMessages;
|
|
36
45
|
getMessageUrl(payload: {
|
|
37
46
|
locale: string;
|
|
38
47
|
} | {
|
|
39
48
|
locale: string;
|
|
40
49
|
app: string;
|
|
41
|
-
env:
|
|
50
|
+
env: EnvironmentType;
|
|
42
51
|
branch?: string;
|
|
43
52
|
}): string;
|
|
53
|
+
/**
|
|
54
|
+
* 自动注册 import.meta.glob 扫描到的 locale 模块。
|
|
55
|
+
* 根据文件路径生成 key(去除 locale 目录和 .ts 后缀,/ 替换为 .),
|
|
56
|
+
* 构建嵌套对象后合并到 i18n 实例。
|
|
57
|
+
*
|
|
58
|
+
* @param globResult - import.meta.glob 返回的模块映射
|
|
59
|
+
* @param locale - 目标语言标识,默认 'zh-CN'
|
|
60
|
+
*/
|
|
61
|
+
autoRegisterLocale(globResult: Record<string, {
|
|
62
|
+
default: Record<string, unknown>;
|
|
63
|
+
}>, locale?: string): void;
|
|
64
|
+
/** 路径转 key: './sys/pageDesigner.ts' → 'sys.pageDesigner',排除 index */
|
|
65
|
+
private pathToLocaleKey;
|
|
66
|
+
/** 将嵌套对象展平为点号路径: { a: { b: 'hi' } }, 'prefix' → { 'prefix.a.b': 'hi' } */
|
|
67
|
+
private flattenObject;
|
|
44
68
|
/**
|
|
45
69
|
* 设置 HTML 根元素的 lang 属性,供浏览器、辅助技术识别当前语言
|
|
46
70
|
*
|