@zat-design/sisyphus-react 3.11.14-beta.11 → 3.11.14-beta.12
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/.vscode/extensions.json +5 -0
- package/coverage/lcov-report/src/.umi/core/devScripts.ts.html +2 -2
- package/coverage/lcov-report/src/.umi/core/history.ts.html +3 -3
- package/coverage/lcov-report/src/.umi/core/index.html +8 -8
- package/coverage/lcov-report/src/.umi/core/plugin.ts.html +3 -3
- package/coverage/lcov-report/src/.umi/core/pluginRegister.ts.html +6 -6
- package/coverage/lcov-report/src/.umi/core/polyfill.ts.html +2 -2
- package/coverage/lcov-report/src/.umi/core/routes.ts.html +3723 -624
- package/coverage/lcov-report/src/.umi/core/umiExports.ts.html +2 -2
- package/coverage/lcov-report/src/.umi/dumi/index.html +2 -2
- package/coverage/lcov-report/src/.umi/dumi/layout.tsx.html +3 -3
- package/coverage/lcov-report/src/.umi/index.html +2 -2
- package/coverage/lcov-report/src/.umi/plugin-antd/index.html +2 -2
- package/coverage/lcov-report/src/.umi/plugin-antd/runtime.tsx.html +2 -2
- package/coverage/lcov-report/src/.umi/plugin-helmet/exports.ts.html +3 -3
- package/coverage/lcov-report/src/.umi/plugin-helmet/index.html +2 -2
- package/coverage/lcov-report/src/.umi/plugin-initial-state/Provider.tsx.html +2 -2
- package/coverage/lcov-report/src/.umi/plugin-initial-state/exports.ts.html +2 -2
- package/coverage/lcov-report/src/.umi/plugin-initial-state/index.html +2 -2
- package/coverage/lcov-report/src/.umi/plugin-initial-state/models/index.html +2 -2
- package/coverage/lcov-report/src/.umi/plugin-initial-state/models/initialState.ts.html +2 -2
- package/coverage/lcov-report/src/.umi/plugin-initial-state/runtime.tsx.html +2 -2
- package/coverage/lcov-report/src/.umi/plugin-locale/SelectLang.tsx.html +2 -2
- package/coverage/lcov-report/src/.umi/plugin-locale/index.html +2 -2
- package/coverage/lcov-report/src/.umi/plugin-locale/locale.tsx.html +2 -2
- package/coverage/lcov-report/src/.umi/plugin-locale/localeExports.ts.html +5 -5
- package/coverage/lcov-report/src/.umi/plugin-locale/runtime.tsx.html +2 -2
- package/coverage/lcov-report/src/.umi/plugin-model/Provider.tsx.html +3 -3
- package/coverage/lcov-report/src/.umi/plugin-model/helpers/constant.tsx.html +2 -2
- package/coverage/lcov-report/src/.umi/plugin-model/helpers/dispatcher.tsx.html +2 -2
- package/coverage/lcov-report/src/.umi/plugin-model/helpers/executor.tsx.html +2 -2
- package/coverage/lcov-report/src/.umi/plugin-model/helpers/index.html +2 -2
- package/coverage/lcov-report/src/.umi/plugin-model/index.html +2 -2
- package/coverage/lcov-report/src/.umi/plugin-model/runtime.tsx.html +2 -2
- package/coverage/lcov-report/src/.umi/plugin-model/useModel.tsx.html +3 -3
- package/coverage/lcov-report/src/.umi/plugin-request/index.html +2 -2
- package/coverage/lcov-report/src/.umi/plugin-request/request.ts.html +6 -6
- package/coverage/lcov-report/src/.umi/umi.ts.html +6 -6
- package/coverage/src/.umi/core/devScripts.ts.html +241 -0
- package/coverage/src/.umi/core/history.ts.html +148 -0
- package/coverage/src/.umi/core/index.html +206 -0
- package/coverage/src/.umi/core/plugin.ts.html +109 -0
- package/coverage/src/.umi/core/pluginRegister.ts.html +160 -0
- package/coverage/src/.umi/core/polyfill.ts.html +97 -0
- package/coverage/src/.umi/core/routes.ts.html +29149 -0
- package/coverage/src/.umi/core/umiExports.ts.html +112 -0
- package/coverage/src/.umi/dumi/index.html +116 -0
- package/coverage/src/.umi/dumi/layout.tsx.html +109 -0
- package/coverage/src/.umi/index.html +116 -0
- package/coverage/src/.umi/plugin-antd/index.html +116 -0
- package/coverage/src/.umi/plugin-antd/runtime.tsx.html +172 -0
- package/coverage/src/.umi/plugin-helmet/exports.ts.html +94 -0
- package/coverage/src/.umi/plugin-helmet/index.html +116 -0
- package/coverage/src/.umi/plugin-initial-state/Provider.tsx.html +196 -0
- package/coverage/src/.umi/plugin-initial-state/exports.ts.html +106 -0
- package/coverage/src/.umi/plugin-initial-state/index.html +146 -0
- package/coverage/{lcov-report/src/.umi/dumi/demos → src/.umi/plugin-initial-state/models}/index.html +15 -15
- package/coverage/src/.umi/plugin-initial-state/models/initialState.ts.html +88 -0
- package/coverage/src/.umi/plugin-initial-state/runtime.tsx.html +124 -0
- package/coverage/src/.umi/plugin-locale/SelectLang.tsx.html +1246 -0
- package/coverage/src/.umi/plugin-locale/index.html +161 -0
- package/coverage/src/.umi/plugin-locale/locale.tsx.html +268 -0
- package/coverage/src/.umi/plugin-locale/localeExports.ts.html +778 -0
- package/coverage/src/.umi/plugin-locale/runtime.tsx.html +115 -0
- package/coverage/src/.umi/plugin-model/Provider.tsx.html +202 -0
- package/coverage/src/.umi/plugin-model/helpers/constant.tsx.html +97 -0
- package/coverage/src/.umi/plugin-model/helpers/dispatcher.tsx.html +142 -0
- package/coverage/src/.umi/plugin-model/helpers/executor.tsx.html +334 -0
- package/coverage/src/.umi/plugin-model/helpers/index.html +146 -0
- package/coverage/src/.umi/plugin-model/index.html +146 -0
- package/coverage/src/.umi/plugin-model/runtime.tsx.html +121 -0
- package/coverage/src/.umi/plugin-model/useModel.tsx.html +298 -0
- package/coverage/src/.umi/plugin-request/index.html +116 -0
- package/coverage/src/.umi/plugin-request/request.ts.html +919 -0
- package/coverage/src/.umi/umi.ts.html +268 -0
- package/es/ProEditTable/components/Summary/index.d.ts +2 -2
- package/es/ProEditTable/index.js +12 -8
- package/es/ProEditTable/propsType.d.ts +39 -41
- package/es/ProEditTable/utils/index.d.ts +1 -1
- package/es/ProEditTable/utils/index.js +6 -4
- package/es/ProEditTable/utils/tools.d.ts +57 -22
- package/es/ProEditTable/utils/tools.js +47 -21
- package/es/ProEnum/propsType.d.ts +1 -1
- package/es/ProForm/components/combination/Group/propsType.d.ts +1 -1
- package/es/ProForm/components/combination/ProModalSelect/propsType.d.ts +2 -2
- package/es/ProForm/components/render/propsType.d.ts +3 -6
- package/es/ProForm/propsType.d.ts +5 -3
- package/es/ProForm/propsType.js +0 -1
- package/es/ProForm/utils/useForm.d.ts +1 -1
- package/es/ProForm/utils/useRules.d.ts +1 -1
- package/es/ProIcon/propsTypes.d.ts +0 -4
- package/es/ProStep/components/Anchor/index.d.ts +2 -1
- package/es/ProStep/components/Item/index.d.ts +1 -1
- package/es/ProStep/components/Item/index.js +6 -2
- package/es/ProStep/components/Listener/index.d.ts +4 -3
- package/es/ProStep/components/Listener/index.js +18 -4
- package/es/ProStep/index.d.ts +7 -7
- package/es/ProStep/index.js +7 -3
- package/es/ProStep/propsType.d.ts +145 -5
- package/es/ProStep/utils/index.d.ts +16 -3
- package/es/ProStep/utils/index.js +11 -2
- package/es/ProTable/components/FormatColumn/index.js +2 -4
- package/es/ProTable/propsType.d.ts +14 -20
- package/es/ProTooltip/propsType.d.ts +0 -3
- package/es/ProTree/components/ProTreeSelect/propsType.d.ts +0 -7
- package/es/ProTree/propsType.d.ts +0 -11
- package/es/ProTreeModal/propsType.d.ts +0 -2
- package/es/index.d.ts +15 -11
- package/es/index.js +1 -12
- package/lib/ProEditTable/components/Summary/index.d.ts +2 -2
- package/lib/ProEditTable/index.js +12 -8
- package/lib/ProEditTable/propsType.d.ts +39 -41
- package/lib/ProEditTable/utils/index.d.ts +1 -1
- package/lib/ProEditTable/utils/index.js +6 -4
- package/lib/ProEditTable/utils/tools.d.ts +57 -22
- package/lib/ProEditTable/utils/tools.js +47 -21
- package/lib/ProEnum/propsType.d.ts +1 -1
- package/lib/ProForm/components/combination/Group/propsType.d.ts +1 -1
- package/lib/ProForm/components/combination/ProModalSelect/propsType.d.ts +2 -2
- package/lib/ProForm/components/render/propsType.d.ts +3 -6
- package/lib/ProForm/propsType.d.ts +5 -3
- package/lib/ProForm/propsType.js +0 -15
- package/lib/ProForm/utils/useForm.d.ts +1 -1
- package/lib/ProForm/utils/useRules.d.ts +1 -1
- package/lib/ProIcon/propsTypes.d.ts +0 -4
- package/lib/ProStep/components/Anchor/index.d.ts +2 -1
- package/lib/ProStep/components/Item/index.d.ts +1 -1
- package/lib/ProStep/components/Item/index.js +6 -2
- package/lib/ProStep/components/Listener/index.d.ts +4 -3
- package/lib/ProStep/components/Listener/index.js +18 -4
- package/lib/ProStep/index.d.ts +7 -7
- package/lib/ProStep/index.js +7 -3
- package/lib/ProStep/propsType.d.ts +145 -5
- package/lib/ProStep/utils/index.d.ts +16 -3
- package/lib/ProStep/utils/index.js +11 -2
- package/lib/ProTable/components/FormatColumn/index.js +2 -4
- package/lib/ProTable/propsType.d.ts +14 -20
- package/lib/ProTooltip/propsType.d.ts +0 -3
- package/lib/ProTree/components/ProTreeSelect/propsType.d.ts +0 -7
- package/lib/ProTree/propsType.d.ts +0 -11
- package/lib/ProTreeModal/propsType.d.ts +0 -2
- package/lib/index.d.ts +15 -11
- package/lib/index.js +7 -131
- package/package.json +1 -1
- package/coverage/lcov-report/src/.umi/dumi/demos/index.ts.html +0 -6340
@@ -57,11 +57,6 @@ export interface ProStepPropsType {
|
|
57
57
|
*/
|
58
58
|
lazyLoad?: boolean | LazyLoadProps;
|
59
59
|
}
|
60
|
-
/**
|
61
|
-
* ProStep 组件基础类型
|
62
|
-
* @type ProStepType
|
63
|
-
*/
|
64
|
-
export type ProStepType = ProStepPropsType;
|
65
60
|
/**
|
66
61
|
* ProStep 子项组件属性类型
|
67
62
|
* @interface ProStepItemPropsType
|
@@ -88,3 +83,148 @@ export interface ProStepItemPropsType {
|
|
88
83
|
* @type ProStepItemType
|
89
84
|
*/
|
90
85
|
export type ProStepItemType = ProStepItemPropsType;
|
86
|
+
/**
|
87
|
+
* ProStep组件上下文类型
|
88
|
+
* @interface ProStepContextType
|
89
|
+
*/
|
90
|
+
export interface ProStepContextType {
|
91
|
+
/** 注册映射引用 */
|
92
|
+
registerMap: React.MutableRefObject<Record<string, RegisterMapItem>>;
|
93
|
+
/** 是否折叠 */
|
94
|
+
collapse?: boolean;
|
95
|
+
/** 注册函数 */
|
96
|
+
register: (params: RegisterParams) => void;
|
97
|
+
/** 通知函数 */
|
98
|
+
notify: (params?: NotifyParams) => Promise<any[]>;
|
99
|
+
/** 触发特定项的函数 */
|
100
|
+
triggerTo: (keys: string[]) => Promise<any[]>;
|
101
|
+
/** 处理滚动的函数 */
|
102
|
+
handleScroll: (id: string, options?: ScrollOptions) => void;
|
103
|
+
/** 懒加载配置 */
|
104
|
+
lazyLoad?: boolean | any;
|
105
|
+
/** 取消注册函数 */
|
106
|
+
unNotify: (keys: string | string[]) => void;
|
107
|
+
}
|
108
|
+
/**
|
109
|
+
* 注册参数类型
|
110
|
+
* @interface RegisterParams
|
111
|
+
*/
|
112
|
+
export interface RegisterParams {
|
113
|
+
/** 唯一标识符 */
|
114
|
+
id: string;
|
115
|
+
/** 表单实例 */
|
116
|
+
form?: any;
|
117
|
+
/** 标题 */
|
118
|
+
title: string;
|
119
|
+
/** 自定义验证器 */
|
120
|
+
validator?: () => Promise<any>;
|
121
|
+
/** 排序值 */
|
122
|
+
order: number;
|
123
|
+
/** 是否禁用 */
|
124
|
+
disabled?: boolean;
|
125
|
+
/** 懒加载配置 */
|
126
|
+
lazyLoad?: boolean | any;
|
127
|
+
/** 允许其他任意属性 */
|
128
|
+
[key: string]: any;
|
129
|
+
}
|
130
|
+
/**
|
131
|
+
* 注册映射项类型
|
132
|
+
* @interface RegisterMapItem
|
133
|
+
*/
|
134
|
+
export interface RegisterMapItem {
|
135
|
+
/** 唯一标识符 */
|
136
|
+
id: string;
|
137
|
+
/** 标题 */
|
138
|
+
title: string;
|
139
|
+
/** 排序值 */
|
140
|
+
order: number;
|
141
|
+
/** 提交事件 */
|
142
|
+
subEvent?: () => Promise<any>;
|
143
|
+
/** 允许其他任意属性 */
|
144
|
+
[key: string]: any;
|
145
|
+
}
|
146
|
+
/**
|
147
|
+
* 通知参数类型
|
148
|
+
* @interface NotifyParams
|
149
|
+
*/
|
150
|
+
export interface NotifyParams {
|
151
|
+
/** 排除项 */
|
152
|
+
excludes?: string[];
|
153
|
+
}
|
154
|
+
/**
|
155
|
+
* 滚动选项类型
|
156
|
+
* @interface ScrollOptions
|
157
|
+
*/
|
158
|
+
export interface ScrollOptions {
|
159
|
+
/** 目标偏移量 */
|
160
|
+
targetOffset?: number;
|
161
|
+
/** 是否滚动到错误位置 */
|
162
|
+
scrollToError?: boolean;
|
163
|
+
}
|
164
|
+
/**
|
165
|
+
* ProStep监听器属性类型
|
166
|
+
* @interface ListenerProps
|
167
|
+
*/
|
168
|
+
export interface ListenerProps {
|
169
|
+
/** 子元素 */
|
170
|
+
children: React.ReactElement;
|
171
|
+
/** 延迟时间 */
|
172
|
+
delayTime?: number;
|
173
|
+
/** 排除项 */
|
174
|
+
excludes?: string[];
|
175
|
+
/** 允许其他任意属性 */
|
176
|
+
[key: string]: any;
|
177
|
+
}
|
178
|
+
/**
|
179
|
+
* 错误结果类型
|
180
|
+
* @interface ErrorResult
|
181
|
+
*/
|
182
|
+
export interface ErrorResult {
|
183
|
+
/** 错误DOM元素 */
|
184
|
+
errorDom: HTMLElement | null;
|
185
|
+
/** 索引 */
|
186
|
+
index: number;
|
187
|
+
}
|
188
|
+
/**
|
189
|
+
* 锚点SVG属性类型
|
190
|
+
* @interface AnchorSvgProps
|
191
|
+
*/
|
192
|
+
export interface AnchorSvgProps {
|
193
|
+
/** 颜色 */
|
194
|
+
color?: string;
|
195
|
+
}
|
196
|
+
/**
|
197
|
+
* 菜单项属性类型
|
198
|
+
* @interface MenuItemProps
|
199
|
+
*/
|
200
|
+
export interface MenuItemProps {
|
201
|
+
/** 名称 */
|
202
|
+
name: string;
|
203
|
+
/** 编码 */
|
204
|
+
code: string;
|
205
|
+
/** 是否开启 */
|
206
|
+
onOff: boolean;
|
207
|
+
/** 是否是开始项 */
|
208
|
+
isStart?: boolean;
|
209
|
+
/** 是否是结束项 */
|
210
|
+
isEnd?: boolean;
|
211
|
+
/** 是否禁用 */
|
212
|
+
isDisabled?: boolean;
|
213
|
+
/** 是否是当前步骤 */
|
214
|
+
isCurrentStep?: boolean;
|
215
|
+
/** 是否已检查 */
|
216
|
+
isChecked?: boolean;
|
217
|
+
/** 错误数量 */
|
218
|
+
errorNum?: number;
|
219
|
+
/** 当前数量 */
|
220
|
+
currentNum?: number;
|
221
|
+
/** 目标偏移量 */
|
222
|
+
targetOffset?: number;
|
223
|
+
/** 是否滚动到错误位置 */
|
224
|
+
scrollToError?: boolean;
|
225
|
+
}
|
226
|
+
/**
|
227
|
+
* ProStep 组件基础类型
|
228
|
+
* @type ProStepType
|
229
|
+
*/
|
230
|
+
export type ProStepType = ProStepPropsType;
|
@@ -1,5 +1,18 @@
|
|
1
|
+
import React from 'react';
|
1
2
|
import type { LoadedMapType } from '../propsType';
|
2
|
-
|
3
|
-
|
4
|
-
|
3
|
+
/**
|
4
|
+
* 处理滚动到指定元素位置
|
5
|
+
* @param id 目标元素的ID
|
6
|
+
* @param options 滚动选项
|
7
|
+
*/
|
8
|
+
export declare const handleScroll: (id: string, options?: {
|
9
|
+
targetOffset?: number;
|
10
|
+
scrollToError?: boolean;
|
11
|
+
}) => void;
|
12
|
+
/**
|
13
|
+
* 获取加载模块数据信息
|
14
|
+
* @param registerMap 注册映射对象
|
15
|
+
* @returns 模块加载状态列表
|
16
|
+
*/
|
17
|
+
export declare const getLoadedMap: (registerMap: React.MutableRefObject<Record<string, any>>) => LoadedMapType[];
|
5
18
|
export default handleScroll;
|
@@ -1,5 +1,10 @@
|
|
1
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
2
2
|
import { debounce, pick } from 'lodash';
|
3
|
+
/**
|
4
|
+
* 处理滚动到指定元素位置
|
5
|
+
* @param id 目标元素的ID
|
6
|
+
* @param options 滚动选项
|
7
|
+
*/
|
3
8
|
export var handleScroll = function handleScroll(id, options) {
|
4
9
|
var _ref = options || {},
|
5
10
|
_ref$targetOffset = _ref.targetOffset,
|
@@ -16,10 +21,14 @@ export var handleScroll = function handleScroll(id, options) {
|
|
16
21
|
}, 100), 0);
|
17
22
|
}
|
18
23
|
};
|
19
|
-
/**
|
24
|
+
/**
|
25
|
+
* 获取加载模块数据信息
|
26
|
+
* @param registerMap 注册映射对象
|
27
|
+
* @returns 模块加载状态列表
|
28
|
+
*/
|
20
29
|
export var getLoadedMap = function getLoadedMap(registerMap) {
|
21
30
|
if (!(registerMap === null || registerMap === void 0 ? void 0 : registerMap.current)) {
|
22
|
-
return
|
31
|
+
return [];
|
23
32
|
}
|
24
33
|
var stepList = Object.values(registerMap === null || registerMap === void 0 ? void 0 : registerMap.current).map(function (item) {
|
25
34
|
return _objectSpread(_objectSpread({}, pick(item, ['id', 'order', 'title'])), {}, {
|
@@ -113,9 +113,6 @@ export var formatColumn = function formatColumn(_ref2) {
|
|
113
113
|
}
|
114
114
|
};
|
115
115
|
if (column === null || column === void 0 ? void 0 : column.render) {
|
116
|
-
// if (!originalObj && Object.keys(originalObj ?? {}).length === 0 && !onDiff) {
|
117
|
-
// return;
|
118
|
-
// }
|
119
116
|
var originalRender = column.render; // 保存原始的 render 方法
|
120
117
|
// 自定义render 手动重载下
|
121
118
|
column.render = function (value, record, index) {
|
@@ -213,7 +210,8 @@ export var formatColumn = function formatColumn(_ref2) {
|
|
213
210
|
if (ellipsis) {
|
214
211
|
column.ellipsis = false;
|
215
212
|
}
|
216
|
-
var valueTypePrecision = precision;
|
213
|
+
var valueTypePrecision = precision !== null && precision !== void 0 ? precision : 0;
|
214
|
+
// 千分位、千分位带CNY前缀, 百分比、千分比保留小数点2位
|
217
215
|
if (['percentage', 'permillage', 'thousandth', 'thousandthCNY'].includes(valueType)) {
|
218
216
|
valueTypePrecision = precision !== null && precision !== void 0 ? precision : 2;
|
219
217
|
}
|
@@ -3,6 +3,7 @@ import { TableProps } from 'antd/es/table/Table';
|
|
3
3
|
import { ColumnType, GetRowKey, RowSelectionType } from 'antd/es/table/interface';
|
4
4
|
import { FormInstance } from 'antd';
|
5
5
|
import type { TooltipProps } from 'antd';
|
6
|
+
import type { TabsProps } from 'antd/es/tabs';
|
6
7
|
/**
|
7
8
|
* 合计栏的每列配置参数
|
8
9
|
*/
|
@@ -323,6 +324,17 @@ export interface ProTableType<T = any> extends Omit<TableProps<any>, 'summary' |
|
|
323
324
|
* @default undefined
|
324
325
|
*/
|
325
326
|
tableId?: string;
|
327
|
+
/**
|
328
|
+
* 表格 tabs查询 配置
|
329
|
+
* @description 用于配置表格的 tabs 选项
|
330
|
+
* @default undefined
|
331
|
+
*/
|
332
|
+
tabs?: {
|
333
|
+
code: string;
|
334
|
+
dataSource: any[];
|
335
|
+
transformResponse?: (res: any) => any[];
|
336
|
+
tabsProps?: TabsProps;
|
337
|
+
};
|
326
338
|
/**
|
327
339
|
* 表格行 key 的取值
|
328
340
|
* @description 表格行数据的唯一标识字段
|
@@ -647,7 +659,7 @@ export type ProTableServiceType<Req, Res> = (params?: ProTableParamsType<Req>) =
|
|
647
659
|
/**
|
648
660
|
* useAntdTable 状态
|
649
661
|
*/
|
650
|
-
export interface
|
662
|
+
export interface ProTableUseAntdTableType<I, R> {
|
651
663
|
/**
|
652
664
|
* 表格数据
|
653
665
|
* @description 当前表格显示的数据
|
@@ -694,23 +706,5 @@ export interface ProTableUseAntdTableStateType<I, R> {
|
|
694
706
|
export type ProTableProps<T = any> = ProTableType<T>;
|
695
707
|
export type ProTableColumn = ProTableColumnType;
|
696
708
|
export type ProTableSummaryProps = ProTableSummaryType;
|
697
|
-
export type
|
698
|
-
export type PaginationType = ProTablePaginationType;
|
699
|
-
export type DragStartGuardProps = ProTableDragStartGuardType;
|
700
|
-
export type DragEndGuardProps = ProTableDragEndGuardType;
|
701
|
-
export type DragCommonGuardProps<T> = ProTableDragCommonGuardType<T>;
|
702
|
-
export type DragStartGuardType = ProTableDragStartGuardType;
|
703
|
-
export type DragEndGuardType = ProTableDragEndGuardType;
|
704
|
-
export type DragCommonGuardType<T> = ProTableDragCommonGuardType<T>;
|
705
|
-
export type RequestOptions<T, R> = ProTableRequestOptionsType<T, R>;
|
706
|
-
export type RequestOptionsType<T, R> = ProTableRequestOptionsType<T, R>;
|
707
|
-
export type UseAntdTableState<I, R> = ProTableUseAntdTableStateType<I, R>;
|
708
|
-
export type UseAntdTableStateType<I, R> = ProTableUseAntdTableStateType<I, R>;
|
709
|
-
export type Response<T = any> = ProTableResponseType<T>;
|
710
|
-
export type List<T> = ProTableListType<T>;
|
711
|
-
export type ListResponse<T> = ProTableListResponseType<T>;
|
712
|
-
export type Params<T = any> = ProTableParamsType<T>;
|
713
|
-
export type Service<Req, Res> = ProTableServiceType<Req, Res>;
|
714
|
-
export type TableDiffConfigType = ProTableDiffConfigType;
|
715
|
-
export type CreateTreeFromArrayOptions = ProTableCreateTreeFromArrayType;
|
709
|
+
export type UseAntdTableState<I, R> = ProTableUseAntdTableType<I, R>;
|
716
710
|
export {};
|
@@ -56,7 +56,4 @@ export type ProTooltipTriggerNodeType = HTMLElement & {
|
|
56
56
|
/** 父节点元素 */
|
57
57
|
parentNode: HTMLElement;
|
58
58
|
};
|
59
|
-
export type ProTooltipPropsType = ProTooltipType;
|
60
59
|
export type ProTooltipProps = ProTooltipType;
|
61
|
-
export type RefObjectPropsType<T> = ProTooltipRefObjectType<T>;
|
62
|
-
export type ProtooltipTriggerNodeType = ProTooltipTriggerNodeType;
|
@@ -437,12 +437,5 @@ export interface ProTreeSelectResponseDataType {
|
|
437
437
|
*/
|
438
438
|
code?: number;
|
439
439
|
}
|
440
|
-
export type DataProps = ProTreeSelectDataType;
|
441
|
-
export type DataOption = ProTreeSelectDataOptionType;
|
442
|
-
export type BaseOptionType = ProTreeSelectBaseOptionType;
|
443
|
-
export type DefaultOptionType = ProTreeSelectDefaultOptionType;
|
444
440
|
export type PropTreeSelectProps = ProTreeSelectType;
|
445
441
|
export type ProSelectAction = ProTreeSelectActionType;
|
446
|
-
export type TreeNodeData = ProTreeSelectNodeDataType;
|
447
|
-
export type TreeSelectFormProps = ProTreeSelectFormType;
|
448
|
-
export type ResponseData = ProTreeSelectResponseDataType;
|
@@ -809,17 +809,6 @@ export interface ProTreeResponseDataType {
|
|
809
809
|
*/
|
810
810
|
code?: number;
|
811
811
|
}
|
812
|
-
export type AllValueType = ProTreeValueType;
|
813
|
-
export type Key = ProTreeKeyType;
|
814
|
-
export type TreeDataProps = ProTreeDataType;
|
815
812
|
export type ProTreeProps = ProTreeType;
|
816
|
-
export type DataProps = ProTreeDataPropsType;
|
817
|
-
export type DataOption = ProTreeDataOptionType;
|
818
|
-
export type BaseOptionType = ProTreeBaseOptionType;
|
819
|
-
export type DefaultOptionType = ProTreeDefaultOptionType;
|
820
813
|
export type PropTreeSelectProps = ProTreeSelectType;
|
821
|
-
export type ProSelectAction = ProTreeSelectActionType;
|
822
|
-
export type TreeNodeData = ProTreeNodeDataType;
|
823
|
-
export type TreeSelectFormProps = ProTreeSelectFormType;
|
824
|
-
export type ResponseData = ProTreeResponseDataType;
|
825
814
|
export {};
|
@@ -296,7 +296,5 @@ export interface ProTreeModalType {
|
|
296
296
|
*/
|
297
297
|
openChange?: (open: boolean) => void;
|
298
298
|
}
|
299
|
-
export type TreeModalMode = ProTreeModalModeType;
|
300
|
-
export type AppointProps = ProTreeModalAppointType;
|
301
299
|
export type ProTreeModalProps = ProTreeModalType;
|
302
300
|
export type ProTreeModalAction = ProTreeModalActionType;
|
package/es/index.d.ts
CHANGED
@@ -9,7 +9,7 @@ export { default as ProEditTable } from './ProEditTable';
|
|
9
9
|
export { default as ProDrawerForm } from './ProDrawerForm';
|
10
10
|
export { default as ProEditLabel } from './ProEditLabel';
|
11
11
|
export { default as ProForm } from './ProForm';
|
12
|
-
export
|
12
|
+
export { ProFormProvider } from './ProForm';
|
13
13
|
export * from './ProForm/components';
|
14
14
|
export { default as ProSelect } from './ProSelect';
|
15
15
|
export { default as ProEnum } from './ProEnum';
|
@@ -26,14 +26,18 @@ export * from './locale';
|
|
26
26
|
export { default as ProBackBtn } from './ProLayout/components/ProHeader/components/ProBackBtn';
|
27
27
|
export { default as ProEditableTable } from './old/ProEditableTable';
|
28
28
|
export { default as ProCertValidity } from './old/ProCertValidity';
|
29
|
-
export
|
30
|
-
export
|
31
|
-
export
|
32
|
-
export
|
33
|
-
export
|
34
|
-
export
|
35
|
-
export
|
36
|
-
export
|
37
|
-
export
|
38
|
-
export
|
29
|
+
export type { ProFormType, ProColumnProps, ProFormColumnType } from './ProForm/propsType';
|
30
|
+
export type { ProFormComponentType } from './ProForm/components/index.d';
|
31
|
+
export type { ProTableType, ProTableColumnType, ProTableSummaryType, ProTableUseAntdTableType, ProTableProps, ProTableSummaryProps, ProTableColumn, UseAntdTableState } from './ProTable/propsType';
|
32
|
+
export type { ProUploadType, ProUploadProps } from './ProUpload/propsType';
|
33
|
+
export type { ProTabsType, ProTabsItemType, ProTabsProps, ProTabsItemsProps } from './ProTabs/propType';
|
34
|
+
export type { BreadcrumbColumnType, SubDescribeColumnType, DescribeColumnType, ProHeaderType, ProHeaderProps, BreadcrumbColumnsProps, SubDescribeColumnsProps, DescribeColumnsProps } from './ProLayout/components/ProHeader/PropTypes';
|
35
|
+
export type { ProTooltipType, ProTooltipProps } from './ProTooltip/propsType';
|
36
|
+
export type { ProIconType, ProIconProps } from './ProIcon/propsTypes';
|
37
|
+
export type { ProTreeType, ProTreeSelectType, ProTreeProps, PropTreeSelectProps } from './ProTree/propsType';
|
38
|
+
export type { ProTreeModalType, ProTreeModalActionType, ProTreeModalProps, ProTreeModalAction } from './ProTreeModal/propsType';
|
39
|
+
export type { ProEditTableType, ProEditTableColumnType, ProEditTableSummaryColumnType, ProEditTableSummaryConfigType, ProEditTableActionType, ProEditTableProps, ProEditTableColumnsProps, SummaryProps, SummaryColumnProps, BaseActionProps } from './ProEditTable/propsType';
|
40
|
+
export type { ProStepType, ProStepContextType, ProStepItemType, ProStepPropsType, ProStepItemPropsType } from './ProStep/propsType';
|
41
|
+
export type { ProDrawerFormType, ProDrawerFormPropsType } from './ProDrawerForm/propsType';
|
42
|
+
export type { ProModalSelectType, ProModalSelectConfigType, ProModalSelectPropsType } from './ProForm/components/combination/ProModalSelect/propsType';
|
39
43
|
export * from './tokens';
|
package/es/index.js
CHANGED
@@ -13,7 +13,7 @@ export { default as ProDrawerForm } from './ProDrawerForm';
|
|
13
13
|
export { default as ProEditLabel } from './ProEditLabel';
|
14
14
|
// 表单
|
15
15
|
export { default as ProForm } from './ProForm';
|
16
|
-
export
|
16
|
+
export { ProFormProvider } from './ProForm';
|
17
17
|
export * from './ProForm/components'; // ProForm 中组件导出
|
18
18
|
export { default as ProSelect } from './ProSelect';
|
19
19
|
export { default as ProEnum } from './ProEnum';
|
@@ -32,16 +32,5 @@ export * from './locale';
|
|
32
32
|
export { default as ProBackBtn } from './ProLayout/components/ProHeader/components/ProBackBtn';
|
33
33
|
export { default as ProEditableTable } from './old/ProEditableTable';
|
34
34
|
export { default as ProCertValidity } from './old/ProCertValidity';
|
35
|
-
// TS类型导出
|
36
|
-
export * from './ProForm/propsType';
|
37
|
-
export * from './ProTable/propsType';
|
38
|
-
export * from './ProEditTable/propsType';
|
39
|
-
export * from './ProUpload/propsType';
|
40
|
-
export * from './ProTabs/propType';
|
41
|
-
export * from './ProLayout/components/ProHeader/PropTypes';
|
42
|
-
export * from './ProTooltip/propsType';
|
43
|
-
export * from './ProIcon/propsTypes';
|
44
|
-
export * from './ProTree/propsType';
|
45
|
-
export * from './ProTreeModal/propsType';
|
46
35
|
// token导出
|
47
36
|
export * from './tokens';
|
@@ -1,8 +1,8 @@
|
|
1
|
-
import {
|
1
|
+
import { ProEditTableSummaryColumnType } from '../../propsType';
|
2
2
|
interface SummaryProps<T = any> {
|
3
3
|
data: T[];
|
4
4
|
summary: {
|
5
|
-
columns:
|
5
|
+
columns: ProEditTableSummaryColumnType[];
|
6
6
|
total?: boolean;
|
7
7
|
fixed?: boolean | 'top' | 'bottom';
|
8
8
|
};
|
@@ -80,7 +80,7 @@ var ProEditTable = function ProEditTable(_ref, ref) {
|
|
80
80
|
disabled = (formFieldProps === null || formFieldProps === void 0 ? void 0 : formFieldProps.disabled) || disabled; // formFieldProps?.disabled可能是函数??
|
81
81
|
}
|
82
82
|
var tableRef = (0, _react.useRef)(null);
|
83
|
-
var valueChangeRef = (0, _react.useRef)(
|
83
|
+
var valueChangeRef = (0, _react.useRef)(0);
|
84
84
|
valueChangeRef.current = 0;
|
85
85
|
var _React$useContext = _react.default.useContext(_antd.ConfigProvider.ConfigContext),
|
86
86
|
getPrefixCls = _React$useContext.getPrefixCls;
|
@@ -91,7 +91,7 @@ var ProEditTable = function ProEditTable(_ref, ref) {
|
|
91
91
|
var requiredAlign = (0, _react.useMemo)(function () {
|
92
92
|
var _ref2, _themeConfig$data$zau, _themeConfig$data;
|
93
93
|
return (_ref2 = (_themeConfig$data$zau = themeConfig === null || themeConfig === void 0 ? void 0 : (_themeConfig$data = themeConfig.data) === null || _themeConfig$data === void 0 ? void 0 : _themeConfig$data.zauiFormAlign) !== null && _themeConfig$data$zau !== void 0 ? _themeConfig$data$zau : configRequiredAlign) !== null && _ref2 !== void 0 ? _ref2 : 'left';
|
94
|
-
}, [themeConfig === null || themeConfig === void 0 ? void 0 : (_themeConfig$data2 = themeConfig.data) === null || _themeConfig$data2 === void 0 ? void 0 : _themeConfig$data2.zauiFormAlign]);
|
94
|
+
}, [themeConfig === null || themeConfig === void 0 ? void 0 : (_themeConfig$data2 = themeConfig.data) === null || _themeConfig$data2 === void 0 ? void 0 : _themeConfig$data2.zauiFormAlign, configRequiredAlign]);
|
95
95
|
var _useSetState = (0, _ahooks.useSetState)({
|
96
96
|
cellNamePath: [],
|
97
97
|
forceUpdate: {},
|
@@ -214,7 +214,7 @@ var ProEditTable = function ProEditTable(_ref, ref) {
|
|
214
214
|
return function (_x, _x2) {
|
215
215
|
return _ref4.apply(this, arguments);
|
216
216
|
};
|
217
|
-
}(), []);
|
217
|
+
}(), [pagination, page.pageSize, form, name]);
|
218
218
|
var config = (0, _objectSpread2.default)({
|
219
219
|
form: form,
|
220
220
|
mode: mode,
|
@@ -272,10 +272,12 @@ var ProEditTable = function ProEditTable(_ref, ref) {
|
|
272
272
|
return item.type === type;
|
273
273
|
});
|
274
274
|
if (typeof (addBtnConfig === null || addBtnConfig === void 0 ? void 0 : addBtnConfig.show) === 'function') {
|
275
|
-
|
275
|
+
var result = addBtnConfig.show();
|
276
|
+
addBtnConfig.show = result;
|
276
277
|
}
|
277
278
|
return (addBtnConfig === null || addBtnConfig === void 0 ? void 0 : addBtnConfig.show) === false;
|
278
279
|
}
|
280
|
+
return false;
|
279
281
|
}, [toolbarProps]);
|
280
282
|
// 是否隐藏勾选框
|
281
283
|
var isHideCheckBox = isForbiddenBtn('mulDelete');
|
@@ -307,7 +309,8 @@ var ProEditTable = function ProEditTable(_ref, ref) {
|
|
307
309
|
className: "com-empty",
|
308
310
|
children: [(0, _jsxRuntime.jsx)("img", {
|
309
311
|
className: "img",
|
310
|
-
src: _empty.default
|
312
|
+
src: _empty.default,
|
313
|
+
alt: "Empty"
|
311
314
|
}), (0, _jsxRuntime.jsx)("div", {
|
312
315
|
className: "content",
|
313
316
|
children: disabled || isForbiddenBtn('add') ? _locale.default.ProEditTable.noData : (0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
@@ -360,7 +363,7 @@ var ProEditTable = function ProEditTable(_ref, ref) {
|
|
360
363
|
rowKey: getRowKey(item)
|
361
364
|
});
|
362
365
|
});
|
363
|
-
onChange(nextValues);
|
366
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(nextValues);
|
364
367
|
if (virtualKey) {
|
365
368
|
form.setFieldValue(virtualRowName, nextValues);
|
366
369
|
}
|
@@ -380,8 +383,8 @@ var ProEditTable = function ProEditTable(_ref, ref) {
|
|
380
383
|
(0, _react.useEffect)(function () {
|
381
384
|
if (toolbarSticky) {
|
382
385
|
var updatePos = function updatePos() {
|
383
|
-
var _affixRef$current;
|
384
|
-
affixRef === null || affixRef === void 0 ? void 0 : (_affixRef$current = affixRef.current) === null || _affixRef$current === void 0 ? void 0 : _affixRef$current.updatePosition();
|
386
|
+
var _affixRef$current, _affixRef$current$upd;
|
387
|
+
affixRef === null || affixRef === void 0 ? void 0 : (_affixRef$current = affixRef.current) === null || _affixRef$current === void 0 ? void 0 : (_affixRef$current$upd = _affixRef$current.updatePosition) === null || _affixRef$current$upd === void 0 ? void 0 : _affixRef$current$upd.call(_affixRef$current);
|
385
388
|
};
|
386
389
|
window.addEventListener('scroll', updatePos, true);
|
387
390
|
return function () {
|
@@ -483,4 +486,5 @@ ForwardProEditTable.defaultProps = {
|
|
483
486
|
deletePoConfirmMsg: _locale.default.ProEditTable.deletePoConfirmMsg,
|
484
487
|
mulDeletePoConfirmMsg: _locale.default.ProEditTable.mulDeletePoConfirmMsg
|
485
488
|
};
|
489
|
+
// 导出组件
|
486
490
|
var _default = exports.default = ForwardProEditTable;
|