@gct-paas/core 0.1.6-dev.4 → 0.1.6-dev.40

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.
Files changed (135) hide show
  1. package/dist/index.esm.min.js +2 -1
  2. package/dist/{redirect-index-Ck5Ddtcb.js → redirect-index-CAuJHvTp.js} +1 -0
  3. package/es/_virtual/_rolldown/runtime.mjs +13 -0
  4. package/es/constants/expression-type/modeCfg.mjs +6 -0
  5. package/es/constants/index.d.ts +4 -0
  6. package/es/constants/index.mjs +5 -1
  7. package/es/create-app-vue.d.ts +1 -1
  8. package/es/create-app-vue.mjs +1 -1
  9. package/es/enums/app-designer/index.d.ts +29 -3
  10. package/es/enums/app-designer/index.mjs +33 -4
  11. package/es/enums/appEnum.d.ts +5 -1
  12. package/es/enums/appEnum.mjs +6 -1
  13. package/es/enums/authActionEnum.d.ts +5 -1
  14. package/es/enums/authActionEnum.mjs +4 -0
  15. package/es/enums/developer-center/integration.d.ts +6 -0
  16. package/es/enums/developer-center/integration.mjs +8 -1
  17. package/es/enums/expressionEnum.d.ts +4 -2
  18. package/es/enums/expressionEnum.mjs +2 -0
  19. package/es/enums/globalEnum.d.ts +30 -0
  20. package/es/enums/globalEnum.mjs +40 -1
  21. package/es/enums/index.d.ts +11 -0
  22. package/es/enums/index.mjs +13 -1
  23. package/es/enums/page-designer/designer.d.ts +2 -0
  24. package/es/enums/page-designer/designer.mjs +2 -0
  25. package/es/enums/page-designer/panel.d.ts +9 -2
  26. package/es/enums/page-designer/panel.mjs +10 -2
  27. package/es/enums/pageEnum.d.ts +2 -1
  28. package/es/enums/pageEnum.mjs +1 -0
  29. package/es/enums/process.d.ts +5 -0
  30. package/es/enums/process.mjs +9 -0
  31. package/es/enums/sizeEnum.d.ts +4 -0
  32. package/es/enums/sizeEnum.mjs +6 -1
  33. package/es/global/gct/gct.d.ts +25 -19
  34. package/es/global/gct/gct.mjs +10 -5
  35. package/es/hooks/index.d.ts +1 -0
  36. package/es/hooks/index.mjs +1 -0
  37. package/es/hooks/useDebouncePromise.d.ts +14 -0
  38. package/es/hooks/useDebouncePromise.mjs +56 -0
  39. package/es/index.d.ts +2 -0
  40. package/es/index.mjs +54 -34
  41. package/es/interface/i-action-item/i-action-item.d.ts +65 -0
  42. package/es/interface/i-app-context/i-app-context.d.ts +25 -0
  43. package/es/interface/i-dictionary/i-dictionary-item.d.ts +80 -0
  44. package/es/interface/i-kit-plugin-module/i-kit-plugin-module.d.ts +2 -2
  45. package/es/interface/i-pinia-action/i-global-actions.d.ts +9 -0
  46. package/es/interface/i-pinia-getter/i-global-getters.d.ts +22 -1
  47. package/es/interface/i-pinia-state/i-global-state.d.ts +9 -2
  48. package/es/interface/index.d.ts +2 -1
  49. package/es/interface/open-util/i-confirm-util/i-confirm-util.d.ts +65 -0
  50. package/es/interface/open-util/i-drawer-options/i-drawer-options.d.ts +298 -0
  51. package/es/interface/open-util/i-modal/i-modal.d.ts +14 -1
  52. package/es/interface/open-util/i-modal-data/i-modal-data.d.ts +3 -3
  53. package/es/interface/open-util/i-modal-options/i-modal-options.d.ts +2 -1
  54. package/es/interface/open-util/i-overlay-controller/i-overlay-controller.d.ts +9 -0
  55. package/es/interface/open-util/index.d.ts +2 -0
  56. package/es/locale/auto-register.d.ts +2 -0
  57. package/es/locale/auto-register.mjs +13 -0
  58. package/es/locale/index.d.ts +17 -1
  59. package/es/locale/index.mjs +34 -0
  60. package/es/locale/sys/model.mjs +9 -0
  61. package/es/locale/sys.d.ts +17 -0
  62. package/es/locale/sys.mjs +26 -0
  63. package/es/modules/env-manager/env-manager.const.d.ts +2 -0
  64. package/es/modules/env-manager/env-manager.const.mjs +4 -2
  65. package/es/modules/env-manager/env-manager.d.ts +8 -13
  66. package/es/modules/env-manager/env-manager.interface.d.ts +5 -9
  67. package/es/modules/env-manager/env-manager.interface.mjs +2 -0
  68. package/es/modules/env-manager/env-manager.mjs +20 -26
  69. package/es/modules/env-manager/env-manager.util.d.ts +5 -0
  70. package/es/modules/env-manager/env-manager.util.mjs +11 -0
  71. package/es/modules/env-manager/index.d.ts +1 -0
  72. package/es/modules/env-manager/index.mjs +4 -0
  73. package/es/modules/mqtt/interfaces/i-mqtt.d.ts +6 -2
  74. package/es/modules/mqtt/mqtt-client.d.ts +8 -7
  75. package/es/modules/mqtt/mqtt-client.mjs +30 -19
  76. package/es/modules/platform-config/constants/theme.const.d.ts +9 -1
  77. package/es/modules/platform-config/constants/theme.const.mjs +13 -2
  78. package/es/modules/platform-config/enums/login.enum.d.ts +3 -1
  79. package/es/modules/platform-config/enums/login.enum.mjs +2 -0
  80. package/es/modules/platform-config/store.d.ts +18 -18
  81. package/es/modules/platform-config/useDeploySetting.d.ts +1 -2
  82. package/es/modules/platform-config/useDeploySetting.mjs +6 -3
  83. package/es/modules/platform-config/useLoginSetting.d.ts +2 -2
  84. package/es/modules/platform-config/useLoginSetting.mjs +29 -31
  85. package/es/modules/platform-config/useOrgSetting.d.ts +2 -2
  86. package/es/modules/platform-config/useOrgSetting.mjs +4 -6
  87. package/es/modules/platform-config/useSecuritySetting.d.ts +2 -2
  88. package/es/modules/platform-config/useSecuritySetting.mjs +2 -3
  89. package/es/modules/platform-config/useThemeSetting.d.ts +1 -1
  90. package/es/modules/platform-config/useThemeSetting.mjs +32 -4
  91. package/es/modules/platform-config/useWatermarkSetting.d.ts +5 -2
  92. package/es/modules/platform-config/useWatermarkSetting.mjs +2 -3
  93. package/es/modules/sign-log/index.d.ts +1 -0
  94. package/es/modules/sign-log/index.mjs +1 -0
  95. package/es/modules/sign-log/sign-log.d.ts +10 -0
  96. package/es/modules/sign-log/sign-log.mjs +109 -0
  97. package/es/modules/sign-log/sing-log.interface.d.ts +9 -0
  98. package/es/modules/system-mqtt/index.d.ts +2 -0
  99. package/es/modules/system-mqtt/index.mjs +1 -0
  100. package/es/modules/system-mqtt/system-mqtt.interface.d.ts +71 -0
  101. package/es/modules/system-mqtt/system-mqtt.service.d.ts +104 -0
  102. package/es/modules/system-mqtt/system-mqtt.service.mjs +199 -0
  103. package/es/modules/user-stores/store/permission.store.d.ts +1 -0
  104. package/es/modules/user-stores/store/permission.store.mjs +10 -0
  105. package/es/modules/user-stores/store/user.store.mjs +4 -2
  106. package/es/router/guard/index.d.ts +4 -0
  107. package/es/router/guard/index.mjs +41 -0
  108. package/es/router/index.mjs +2 -0
  109. package/es/setup-app.mjs +2 -9
  110. package/es/state/global-pinia-state/global-pinia-state.d.ts +6 -0
  111. package/es/state/global-pinia-state/global-pinia-state.mjs +6 -0
  112. package/es/store/global-store.mjs +18 -4
  113. package/es/store/index.d.ts +1 -1
  114. package/es/store/session-store.d.ts +1 -0
  115. package/es/store/session-store.mjs +2 -1
  116. package/es/types/index.d.ts +13 -0
  117. package/es/utils/auth-util/auth-util.d.ts +37 -0
  118. package/es/utils/auth-util/auth-util.mjs +79 -0
  119. package/es/utils/axios/check-status.d.ts +1 -0
  120. package/es/utils/axios/check-status.mjs +64 -0
  121. package/es/utils/axios/interceptors.mjs +30 -0
  122. package/es/utils/deviceFingerprint.mjs +5 -1
  123. package/es/utils/i18n/index.mjs +1 -0
  124. package/es/utils/index.d.ts +4 -2
  125. package/es/utils/index.mjs +3 -1
  126. package/es/utils/namespace/namespace.mjs +1 -0
  127. package/es/utils/openUtil/modal/modal.d.ts +1 -1
  128. package/es/utils/openUtil/modal/modal.mjs +1 -1
  129. package/es/utils/openUtil/overlay-container/overlay-container.d.ts +1 -1
  130. package/es/utils/openUtil/overlay-container/overlay-container.mjs +28 -23
  131. package/es/utils/select-user-utils.d.ts +50 -0
  132. package/es/utils/select-user-utils.mjs +129 -0
  133. package/es/utils/tools/tools.d.ts +6 -0
  134. package/es/utils/tools/tools.mjs +12 -3
  135. package/package.json +5 -3
@@ -51,4 +51,84 @@ export interface IDictionaryItem {
51
51
  * @type {*}
52
52
  */
53
53
  data?: any;
54
+ /**
55
+ * 激活图标
56
+ *
57
+ * @type {string}
58
+ */
59
+ activeIcon?: string;
60
+ /**
61
+ * 提示信息
62
+ *
63
+ * @type {string}
64
+ */
65
+ tooltip?: string;
66
+ /**
67
+ * 可以树形嵌套的子项
68
+ *
69
+ * @author zhanghanrui
70
+ * @date 2024-04-02 09:04:16
71
+ * @type {ICodeItem[]}
72
+ */
73
+ children?: ICodeItem[];
74
+ }
75
+ /**
76
+ * 代码表项
77
+ *
78
+ * @author zhanghanrui
79
+ * @date 2024-03-27 13:03:24
80
+ * @export
81
+ * @interface ICodeItem
82
+ */
83
+ export interface ICodeItem {
84
+ /**
85
+ * 名称
86
+ *
87
+ * @author zhanghanrui
88
+ * @date 2024-03-27 13:03:41
89
+ * @type {string}
90
+ */
91
+ label: string;
92
+ /**
93
+ * 图标
94
+ *
95
+ * @type {string}
96
+ */
97
+ icon?: string;
98
+ /**
99
+ * 激活图标
100
+ *
101
+ * @type {string}
102
+ */
103
+ activeIcon?: string;
104
+ /**
105
+ * 提示信息
106
+ *
107
+ * @type {string}
108
+ */
109
+ tooltip?: string;
110
+ /**
111
+ * 值
112
+ *
113
+ * @author zhanghanrui
114
+ * @date 2024-03-27 13:03:46
115
+ * @type {(string | number)}
116
+ */
117
+ value: string | number;
118
+ /**
119
+ * 是否禁用
120
+ *
121
+ * @author zhanghanrui
122
+ * @date 2024-10-16 09:10:22
123
+ * @type {boolean}
124
+ */
125
+ disabled?: boolean;
126
+ /**
127
+ * 可以树形嵌套的子项
128
+ *
129
+ * @author zhanghanrui
130
+ * @date 2024-04-02 09:04:16
131
+ * @type {ICodeItem[]}
132
+ */
133
+ children?: ICodeItem[];
54
134
  }
@@ -17,7 +17,7 @@ export interface IPluginKitModule {
17
17
  * 每次创建独立的 Vue 应用实例时调用,进行组件注册等操作
18
18
  *
19
19
  * @param {App} app
20
- * @return {*} {Promise<void>}
20
+ * @return {*} {void}
21
21
  */
22
- createAppVue(app: App): Promise<void>;
22
+ createAppVue(app: App): void;
23
23
  }
@@ -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 {IObject}
34
+ * @type {GetAppResponse}
28
35
  */
29
- appInfo: IObject;
36
+ appInfo: GetAppResponse;
30
37
  /**
31
38
  * 用户信息(user.store.ts 中加载后赋值)
32
39
  *
@@ -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 {IData[]}
29
+ * @type {T[]}
30
30
  */
31
- data?: IData[];
31
+ data?: T[];
32
32
  /**
33
33
  * 额外参数
34
34
  *
@@ -1,3 +1,4 @@
1
+ import { VNode } from 'vue';
1
2
  /**
2
3
  * 模态打开参数,此为具体端实现,具体扩充参数由各端定义
3
4
  *
@@ -6,7 +7,7 @@
6
7
  */
7
8
  export interface IModalOptions {
8
9
  [key: string]: any;
9
- title?: string;
10
+ title?: string | VNode;
10
11
  width?: string | number;
11
12
  zIndex?: number;
12
13
  }
@@ -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,2 @@
1
+ /** 注册 core 包的 locale 多语言资源 */
2
+ export declare function registerCoreLocale(): void;
@@ -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 };