@teamix/pro 1.2.24 → 1.2.26
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/dist/pro.css +1 -1
- package/dist/pro.js +1043 -94
- package/dist/pro.min.css +1 -1
- package/dist/pro.min.js +1 -1
- package/es/actions/dialog.js +1 -1
- package/es/actions/index.d.ts +13 -9
- package/es/actions/index.js +63 -18
- package/es/actions/index.scss +12 -1
- package/es/form/SchemaForm/index.js +8 -6
- package/es/form/SchemaForm/initializeDataSource.d.ts +1 -1
- package/es/form/SchemaForm/initializeDataSource.js +2 -2
- package/es/form/SchemaForm/initializeRequest.d.ts +1 -1
- package/es/form/SchemaForm/initializeRequest.js +2 -2
- package/es/form/SchemaForm/initializeRules.d.ts +1 -1
- package/es/form/SchemaForm/initializeRules.js +3 -3
- package/es/form/typing.d.ts +0 -9
- package/es/form/utils.d.ts +2 -2
- package/es/form/utils.js +2 -2
- package/es/index.d.ts +5 -2
- package/es/index.js +6 -3
- package/es/step/ProStepItem/components/HozStepItem/index.d.ts +5 -0
- package/es/step/ProStepItem/components/HozStepItem/index.js +235 -0
- package/es/step/ProStepItem/components/HozStepItem/index.scss +279 -0
- package/es/step/ProStepItem/components/VerStepItem/index.d.ts +5 -0
- package/es/step/ProStepItem/components/VerStepItem/index.js +295 -0
- package/es/step/ProStepItem/components/VerStepItem/index.scss +287 -0
- package/es/step/ProStepItem/index.d.ts +4 -0
- package/es/step/ProStepItem/index.js +57 -0
- package/es/step/index.d.ts +9 -0
- package/es/step/index.js +101 -0
- package/es/step/typing.d.ts +96 -0
- package/es/step/typing.js +1 -0
- package/es/table/components/Filter/index.js +2 -17
- package/es/table/index.js +7 -3
- package/es/table/typing.d.ts +11 -2
- package/es/table/utils/index.d.ts +7 -0
- package/es/table/utils/index.js +36 -0
- package/es/utils/index.d.ts +1 -0
- package/es/utils/index.js +1 -0
- package/lib/actions/dialog.js +1 -1
- package/lib/actions/index.d.ts +13 -9
- package/lib/actions/index.js +63 -18
- package/lib/actions/index.scss +12 -1
- package/lib/form/SchemaForm/index.js +8 -6
- package/lib/form/SchemaForm/initializeDataSource.d.ts +1 -1
- package/lib/form/SchemaForm/initializeDataSource.js +2 -2
- package/lib/form/SchemaForm/initializeRequest.d.ts +1 -1
- package/lib/form/SchemaForm/initializeRequest.js +2 -2
- package/lib/form/SchemaForm/initializeRules.d.ts +1 -1
- package/lib/form/SchemaForm/initializeRules.js +3 -3
- package/lib/form/typing.d.ts +0 -9
- package/lib/form/utils.d.ts +2 -2
- package/lib/form/utils.js +2 -2
- package/lib/index.d.ts +5 -2
- package/lib/index.js +35 -3
- package/lib/step/ProStepItem/components/HozStepItem/index.d.ts +5 -0
- package/lib/step/ProStepItem/components/HozStepItem/index.js +258 -0
- package/lib/step/ProStepItem/components/HozStepItem/index.scss +279 -0
- package/lib/step/ProStepItem/components/VerStepItem/index.d.ts +5 -0
- package/lib/step/ProStepItem/components/VerStepItem/index.js +315 -0
- package/lib/step/ProStepItem/components/VerStepItem/index.scss +287 -0
- package/lib/step/ProStepItem/index.d.ts +4 -0
- package/lib/step/ProStepItem/index.js +69 -0
- package/lib/step/index.d.ts +9 -0
- package/lib/step/index.js +124 -0
- package/lib/step/typing.d.ts +96 -0
- package/lib/step/typing.js +5 -0
- package/lib/table/components/Filter/index.js +2 -17
- package/lib/table/index.js +6 -2
- package/lib/table/typing.d.ts +11 -2
- package/lib/table/utils/index.d.ts +7 -0
- package/lib/table/utils/index.js +38 -0
- package/lib/utils/index.d.ts +1 -0
- package/lib/utils/index.js +13 -0
- package/package.json +1 -1
package/es/actions/dialog.js
CHANGED
@@ -229,7 +229,7 @@ export function useDialogAction(action, actionContext) {
|
|
229
229
|
})), _objectSpread2), containerProps), containerOtherProps);
|
230
230
|
|
231
231
|
var ret = container.show(quickShowProps);
|
232
|
-
store.hide = ret.hide;
|
232
|
+
store.hide = ret ? ret.hide || ret.close : function () {};
|
233
233
|
};
|
234
234
|
|
235
235
|
return _objectSpread({}, eventHandler(action, actionContext, onActionStart));
|
package/es/actions/index.d.ts
CHANGED
@@ -26,25 +26,27 @@ export declare type ProActionConfig = ({
|
|
26
26
|
} & LinkAction);
|
27
27
|
export declare function registerActionHandler(id: string, extendActionId: string, defaultConfig: any): void;
|
28
28
|
export declare function useAction(config?: ProActionConfig, context?: any): any;
|
29
|
-
export interface ProActionButtonProps extends ButtonProps {
|
30
|
-
key?: string | number;
|
29
|
+
export interface ProActionButtonProps extends ProActionCommonProps, ButtonProps {
|
31
30
|
config?: ProActionConfig;
|
32
|
-
visible?: any;
|
33
31
|
disabled?: any;
|
34
32
|
icon?: string;
|
35
|
-
context?: any;
|
36
33
|
onClick?: (event: React.MouseEvent<Element, MouseEvent>, context?: any) => void;
|
37
34
|
}
|
38
35
|
export declare const ProActionButton: (props: ProActionButtonProps) => JSX.Element;
|
39
|
-
export interface
|
36
|
+
export interface ProActionCommonProps {
|
40
37
|
key?: string | number;
|
41
|
-
actions: ProActionProps[];
|
42
38
|
visible?: any;
|
43
|
-
icon?: string;
|
44
39
|
context?: any;
|
45
40
|
}
|
41
|
+
export interface ProActionMenuButtonProps extends ProActionCommonProps, Omit<MenuButtonProps, 'visible'> {
|
42
|
+
actions: ProActionProps[];
|
43
|
+
icon?: string;
|
44
|
+
}
|
46
45
|
export declare const ProActionMenuButton: (props: ProActionMenuButtonProps) => JSX.Element;
|
47
|
-
export
|
46
|
+
export interface ProActionDividerProps extends ProActionCommonProps {
|
47
|
+
type: 'divider';
|
48
|
+
}
|
49
|
+
export declare type ProActionProps = ProActionButtonProps | ProActionMenuButtonProps | ProActionDividerProps;
|
48
50
|
export declare type ProActionGroupProps = {
|
49
51
|
/** 操作组类型:按钮、文字按钮 */
|
50
52
|
type?: 'button' | 'text';
|
@@ -59,7 +61,9 @@ export declare type ProActionGroupProps = {
|
|
59
61
|
*/
|
60
62
|
moreText?: string;
|
61
63
|
/** 更多按钮的配置,只有在actions数量超过max时才有效 */
|
62
|
-
more?: string | ProActionButtonProps
|
64
|
+
more?: string | (ProActionButtonProps & {
|
65
|
+
noArrow?: boolean;
|
66
|
+
});
|
63
67
|
/** 是否有分割线,只有type="text"时生效,默认有分割线 */
|
64
68
|
divider?: boolean;
|
65
69
|
} & React.HTMLAttributes<HTMLElement>;
|
package/es/actions/index.js
CHANGED
@@ -3,9 +3,10 @@ var _excluded = ["type"],
|
|
3
3
|
_excluded3 = ["loading"],
|
4
4
|
_excluded4 = ["icon", "iconSize", "label", "actions", "children", "context", "type"],
|
5
5
|
_excluded5 = ["context", "text"],
|
6
|
-
_excluded6 = ["
|
7
|
-
_excluded7 = ["key", "
|
8
|
-
_excluded8 = ["
|
6
|
+
_excluded6 = ["noArrow", "className"],
|
7
|
+
_excluded7 = ["key", "actions"],
|
8
|
+
_excluded8 = ["key", "config"],
|
9
|
+
_excluded9 = ["type", "divider", "max", "moreText", "more", "context", "actions", "className"];
|
9
10
|
|
10
11
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
11
12
|
|
@@ -209,6 +210,12 @@ var ProActionMenuButtonItem = function ProActionMenuButtonItem(props) {
|
|
209
210
|
};
|
210
211
|
|
211
212
|
function renderCommonActionButtonMenuItem(action, key, context) {
|
213
|
+
if (action.type === 'divider') {
|
214
|
+
return /*#__PURE__*/React.createElement(Menu.Divider, {
|
215
|
+
key: key
|
216
|
+
});
|
217
|
+
}
|
218
|
+
|
212
219
|
var menuBtn = action;
|
213
220
|
|
214
221
|
if (menuBtn.actions && menuBtn.actions.length && menuBtn.disabled !== true) {
|
@@ -253,24 +260,45 @@ export var ProActionMenuButton = function ProActionMenuButton(props) {
|
|
253
260
|
}, others), actions.map(function (action, i) {
|
254
261
|
return renderCommonActionButtonMenuItem(action, action.key || i, context);
|
255
262
|
}));
|
256
|
-
}; //
|
257
|
-
|
258
|
-
function formatGroupActions(actions, max, moreConfig) {
|
259
|
-
var MAX = max < 1 ? MAX_ACTTIONS : max;
|
263
|
+
}; // 超出 max,则折叠起来
|
260
264
|
|
261
|
-
|
265
|
+
function foldExtraActions(actions, max, moreConfig) {
|
266
|
+
if (actions.length <= max) {
|
262
267
|
return actions;
|
263
268
|
}
|
264
269
|
|
265
|
-
return [].concat(_toConsumableArray(actions.slice(0,
|
270
|
+
return [].concat(_toConsumableArray(actions.slice(0, max - 1)), [_objectSpread(_objectSpread({
|
266
271
|
key: '__teamix_pro_action_group_more_btn'
|
267
272
|
}, moreConfig), {}, {
|
268
|
-
actions: actions.slice(
|
273
|
+
actions: actions.slice(max - 1)
|
269
274
|
})]);
|
275
|
+
} // 如果 actions 数量超过了 max,则把第 max 个和剩余超出部分折叠起来成为一个 menu
|
276
|
+
// divider 不计数
|
277
|
+
|
278
|
+
|
279
|
+
function formatGroupActions(actions, max, moreConfig) {
|
280
|
+
var MAX = max < 1 ? MAX_ACTTIONS : max;
|
281
|
+
var count = 0;
|
282
|
+
var index = 0;
|
283
|
+
|
284
|
+
for (; index < actions.length && count < MAX; index++) {
|
285
|
+
if (actions[index].type !== 'divider') {
|
286
|
+
count += 1;
|
287
|
+
}
|
288
|
+
}
|
289
|
+
|
290
|
+
return foldExtraActions(actions, Math.max(index, MAX), moreConfig);
|
270
291
|
} // 渲染一个 button 或者 menu button
|
271
292
|
|
272
293
|
|
273
294
|
function renderCommonActionButton(button, context, isTypeText) {
|
295
|
+
if (button.type === 'divider') {
|
296
|
+
return /*#__PURE__*/React.createElement(Divider, {
|
297
|
+
key: button.key,
|
298
|
+
direction: "ver"
|
299
|
+
});
|
300
|
+
}
|
301
|
+
|
274
302
|
var buttonContext = button.context,
|
275
303
|
text = button.text,
|
276
304
|
others = _objectWithoutProperties(button, _excluded5);
|
@@ -288,18 +316,35 @@ function renderCommonActionButton(button, context, isTypeText) {
|
|
288
316
|
}
|
289
317
|
|
290
318
|
function getDefaultMoreButton(type, more) {
|
291
|
-
var
|
292
|
-
children: more
|
293
|
-
} : more;
|
319
|
+
var noArrowClassName = 'teamix-pro-actions-text-menu-btn-no-arrow';
|
294
320
|
var defaultConfig = type === 'button' ? {
|
295
321
|
children: getMessage('more')
|
296
322
|
} : {
|
297
323
|
icon: 'more-line',
|
298
324
|
// iconSize: 'small',
|
299
325
|
autoWidth: false,
|
300
|
-
className:
|
326
|
+
className: noArrowClassName
|
301
327
|
};
|
302
|
-
|
328
|
+
|
329
|
+
if (!more) {
|
330
|
+
return defaultConfig;
|
331
|
+
}
|
332
|
+
|
333
|
+
var moreConfig = typeof more === 'string' ? {
|
334
|
+
children: more
|
335
|
+
} : more;
|
336
|
+
|
337
|
+
if (type === 'button') {
|
338
|
+
return Object.assign(defaultConfig, moreConfig);
|
339
|
+
}
|
340
|
+
|
341
|
+
var noArrow = moreConfig.noArrow,
|
342
|
+
className = moreConfig.className,
|
343
|
+
others = _objectWithoutProperties(moreConfig, _excluded6);
|
344
|
+
|
345
|
+
return _objectSpread({
|
346
|
+
className: cls(className, _defineProperty({}, "".concat(noArrowClassName), noArrow))
|
347
|
+
}, others);
|
303
348
|
}
|
304
349
|
|
305
350
|
var MAX_ACTTIONS = 4;
|
@@ -316,7 +361,7 @@ function getActionConfig(action, index, context) {
|
|
316
361
|
if (action.actions) {
|
317
362
|
var _key = action.key,
|
318
363
|
actions = action.actions,
|
319
|
-
_others = _objectWithoutProperties(action,
|
364
|
+
_others = _objectWithoutProperties(action, _excluded7);
|
320
365
|
|
321
366
|
return _objectSpread({
|
322
367
|
key: getKey(index, _key),
|
@@ -328,7 +373,7 @@ function getActionConfig(action, index, context) {
|
|
328
373
|
|
329
374
|
var key = action.key,
|
330
375
|
config = action.config,
|
331
|
-
others = _objectWithoutProperties(action,
|
376
|
+
others = _objectWithoutProperties(action, _excluded8);
|
332
377
|
|
333
378
|
return _objectSpread({
|
334
379
|
key: getKey(index, key),
|
@@ -349,7 +394,7 @@ export function ProActionGroup(props) {
|
|
349
394
|
_props$actions = props.actions,
|
350
395
|
actions = _props$actions === void 0 ? [] : _props$actions,
|
351
396
|
className = props.className,
|
352
|
-
containerProps = _objectWithoutProperties(props,
|
397
|
+
containerProps = _objectWithoutProperties(props, _excluded9);
|
353
398
|
|
354
399
|
var isTypeText = type === 'text';
|
355
400
|
var filteredActions = actions.map(function (action, index) {
|
package/es/actions/index.scss
CHANGED
@@ -2,12 +2,23 @@
|
|
2
2
|
display: flex;
|
3
3
|
align-items: center;
|
4
4
|
flex-wrap: wrap;
|
5
|
+
|
6
|
+
& > .next-divider {
|
7
|
+
& + .next-divider {
|
8
|
+
display: none;
|
9
|
+
}
|
10
|
+
}
|
11
|
+
|
5
12
|
&.teamix-pro-actions-type-button {
|
6
13
|
& > button {
|
7
14
|
&:not(:last-child) {
|
8
15
|
margin-right: var(--s-2);
|
9
16
|
}
|
10
17
|
}
|
18
|
+
& > .next-divider {
|
19
|
+
margin-left: 0;
|
20
|
+
margin-right: var(--s-2);
|
21
|
+
}
|
11
22
|
}
|
12
23
|
|
13
24
|
&.teamix-pro-actions-type-text:not(.teamix-pro-actions-divider) {
|
@@ -109,4 +120,4 @@
|
|
109
120
|
}
|
110
121
|
}
|
111
122
|
}
|
112
|
-
}
|
123
|
+
}
|
@@ -106,8 +106,10 @@ export default /*#__PURE__*/memo(function (_ref) {
|
|
106
106
|
}, [scope]); // 格式化 schema
|
107
107
|
|
108
108
|
var formatSchema = useCallback(function (schema) {
|
109
|
+
var suffix = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
109
110
|
var schemaProperties = {};
|
110
111
|
schema === null || schema === void 0 ? void 0 : schema.forEach(function (item, index) {
|
112
|
+
suffix = "".concat(suffix).concat(index);
|
111
113
|
var newItem = warning(item);
|
112
114
|
var _newItem = newItem,
|
113
115
|
originalComponent = _newItem.component; // 根据component的不同,初始化为内置的item
|
@@ -171,7 +173,7 @@ export default /*#__PURE__*/memo(function (_ref) {
|
|
171
173
|
component = _newItem2.component,
|
172
174
|
type = _newItem2.type,
|
173
175
|
_newItem2$name = _newItem2.name,
|
174
|
-
name = _newItem2$name === void 0 ? getFieldName(component === null || component === void 0 ? void 0 : component.replace(/\./g, ''),
|
176
|
+
name = _newItem2$name === void 0 ? getFieldName(component === null || component === void 0 ? void 0 : component.replace(/\./g, ''), suffix) : _newItem2$name,
|
175
177
|
decorator = _newItem2.decorator,
|
176
178
|
decoratorProps = _newItem2.decoratorProps,
|
177
179
|
dataSource = _newItem2.dataSource,
|
@@ -196,18 +198,18 @@ export default /*#__PURE__*/memo(function (_ref) {
|
|
196
198
|
var defaultDecoratorProps = _objectSpread(_objectSpread({}, tooltipProps), decoratorProps); // 初始化request
|
197
199
|
|
198
200
|
|
199
|
-
var _initializeRequest = initializeRequest(request,
|
201
|
+
var _initializeRequest = initializeRequest(request, suffix),
|
200
202
|
requestReactions = _initializeRequest.reactions,
|
201
203
|
requestScope = _initializeRequest.scope; // 初始化dataSource
|
202
204
|
|
203
205
|
|
204
|
-
var _initializeDataSource = initializeDataSource(dataSource,
|
206
|
+
var _initializeDataSource = initializeDataSource(dataSource, suffix),
|
205
207
|
defaultDataSource = _initializeDataSource.dataSource,
|
206
208
|
dataSourceReactions = _initializeDataSource.reactions,
|
207
209
|
dataSourceScope = _initializeDataSource.scope; // 初始化rules
|
208
210
|
|
209
211
|
|
210
|
-
var _initializeRules = initializeRules(rules,
|
212
|
+
var _initializeRules = initializeRules(rules, suffix),
|
211
213
|
defaultRules = _initializeRules.rules,
|
212
214
|
rulesScope = _initializeRules.scope; // 合并reactions,初始化reactions
|
213
215
|
|
@@ -235,11 +237,11 @@ export default /*#__PURE__*/memo(function (_ref) {
|
|
235
237
|
})); // 递归子组件
|
236
238
|
|
237
239
|
var recursiveProperties = (children === null || children === void 0 ? void 0 : children.length) ? {
|
238
|
-
properties: formatSchema(children)
|
240
|
+
properties: formatSchema(children, suffix)
|
239
241
|
} : {}; // 递归items(类似子组件,会先由各initialize方法格式化为固定形式,type不同不统一处理)
|
240
242
|
// 例如:[{ name: 'items', type: 'object', children: items }]
|
241
243
|
|
242
|
-
var recursiveItems = items ? formatSchema([items]) : {}; // 配置组件属性
|
244
|
+
var recursiveItems = items ? formatSchema([items], suffix) : {}; // 配置组件属性
|
243
245
|
|
244
246
|
schemaProperties[name] = _objectSpread(_objectSpread(_objectSpread({}, formatParam), recursiveProperties), recursiveItems);
|
245
247
|
});
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import type { ProFormRequestConfig } from '../typing';
|
2
2
|
interface IInitializeDataSource {
|
3
|
-
(requestConfig?: ProFormRequestConfig | any,
|
3
|
+
(requestConfig?: ProFormRequestConfig | any, suffix?: string): {
|
4
4
|
dataSource?: any[];
|
5
5
|
reactions: any[];
|
6
6
|
scope: {
|
@@ -2,10 +2,10 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
2
2
|
|
3
3
|
import { isPlainObj } from '@teamix/utils';
|
4
4
|
|
5
|
-
var initializeDataSource = function initializeDataSource(dataSource,
|
5
|
+
var initializeDataSource = function initializeDataSource(dataSource, suffix) {
|
6
6
|
if (isPlainObj(dataSource)) {
|
7
7
|
var requestConfig = dataSource;
|
8
|
-
var requestConfigName = "$requestConfig_".concat(
|
8
|
+
var requestConfigName = "$requestConfig_".concat(suffix);
|
9
9
|
return {
|
10
10
|
reactions: ["{{$dataSource($request,".concat(requestConfigName, ",context)}}")],
|
11
11
|
scope: _defineProperty({}, requestConfigName, requestConfig)
|
@@ -1,8 +1,8 @@
|
|
1
1
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
2
2
|
|
3
|
-
var initializeRequest = function initializeRequest(requestConfig,
|
3
|
+
var initializeRequest = function initializeRequest(requestConfig, suffix) {
|
4
4
|
if (requestConfig) {
|
5
|
-
var requestConfigName = "$requestConfig_".concat(
|
5
|
+
var requestConfigName = "$requestConfig_".concat(suffix);
|
6
6
|
return {
|
7
7
|
reactions: ["{{$common($request,".concat(requestConfigName, ",context)}}")],
|
8
8
|
scope: _defineProperty({}, requestConfigName, requestConfig)
|
@@ -18,13 +18,13 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
18
18
|
|
19
19
|
import { isArr, isPlainObj } from '@teamix/utils';
|
20
20
|
|
21
|
-
var initializeRules = function initializeRules(rules,
|
21
|
+
var initializeRules = function initializeRules(rules, suffix) {
|
22
22
|
var initializeValidator = function initializeValidator(rule) {
|
23
|
-
var
|
23
|
+
var index = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
24
24
|
|
25
25
|
if (isPlainObj(rule === null || rule === void 0 ? void 0 : rule.validator)) {
|
26
26
|
var requestConfig = rule.validator;
|
27
|
-
var requestConfigName = "$requestConfig_".concat(
|
27
|
+
var requestConfigName = "$requestConfig_".concat(suffix).concat(index);
|
28
28
|
return {
|
29
29
|
rules: _objectSpread(_objectSpread({}, rule), {}, {
|
30
30
|
validator: "{{$validator($request,".concat(requestConfigName, ",context)}}")
|
package/es/form/typing.d.ts
CHANGED
@@ -75,23 +75,14 @@ export interface QueryFilterProps extends ProFormProps {
|
|
75
75
|
* @deprecated triggerType已弃用
|
76
76
|
*/
|
77
77
|
triggerType?: 'keydown' | 'change' | 'submit';
|
78
|
-
/** 表单展示形式 */
|
79
78
|
mode?: 'inline' | 'panel';
|
80
|
-
/** 面板是否默认展开,仅在 mode='panel' 时生效 */
|
81
79
|
expand?: boolean;
|
82
|
-
/** 顶部筛选区前缀 */
|
83
80
|
addonBefore?: ReactNode;
|
84
|
-
/** 顶部筛选区后缀 */
|
85
81
|
addonAfter?: ReactNode;
|
86
|
-
/** 顶部筛选区默认筛选项 */
|
87
82
|
defaultFilterValue?: string;
|
88
|
-
/** 透出内部表单实例 */
|
89
83
|
formRef?: React.MutableRefObject<any>;
|
90
|
-
/** 表单初始化(含异步默认值)后回调函数 */
|
91
84
|
onInit?: (values: any) => boolean;
|
92
|
-
/** 表单筛选回调函数 */
|
93
85
|
onFilter?: (values: any) => void;
|
94
|
-
/** 表单重置回调函数 */
|
95
86
|
onReset?: (payload?: any) => void;
|
96
87
|
}
|
97
88
|
/**
|
package/es/form/utils.d.ts
CHANGED
@@ -17,11 +17,11 @@ declare const mapMode: (props: any, field: any) => any;
|
|
17
17
|
/**
|
18
18
|
* 创建字段名称
|
19
19
|
* @param prefix 字段名称前缀,接收字段component名称,默认为FieldName
|
20
|
-
* @param
|
20
|
+
* @param suffix 字段后缀,唯一标识
|
21
21
|
* @returns 字段唯一名称
|
22
22
|
*/
|
23
23
|
interface IGetFieldName {
|
24
|
-
(prefix: string,
|
24
|
+
(prefix: string, suffix?: string): string;
|
25
25
|
}
|
26
26
|
declare const getFieldName: IGetFieldName;
|
27
27
|
/**
|
package/es/form/utils.js
CHANGED
@@ -115,8 +115,8 @@ var mapMode = function mapMode(props, field) {
|
|
115
115
|
|
116
116
|
var getFieldName = function getFieldName() {
|
117
117
|
var prefix = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'FieldName';
|
118
|
-
var
|
119
|
-
return "".concat(prefix, "-").concat(
|
118
|
+
var suffix = arguments.length > 1 ? arguments[1] : undefined;
|
119
|
+
return "".concat(prefix, "-").concat(suffix);
|
120
120
|
};
|
121
121
|
/**
|
122
122
|
* 将ProForm的key映射为formily的key,然后筛除掉无效的key/value
|
package/es/index.d.ts
CHANGED
@@ -9,6 +9,7 @@ import ProPageHeader from './page-header';
|
|
9
9
|
import ProTable from './table';
|
10
10
|
import ProSkeleton from './skeleton';
|
11
11
|
import utils from './utils';
|
12
|
+
import { ProStep } from './step';
|
12
13
|
import * as nocode from './nocode';
|
13
14
|
import * as templates from './templates';
|
14
15
|
export * from './actions';
|
@@ -21,5 +22,7 @@ export * from './page-container';
|
|
21
22
|
export * from './page-header';
|
22
23
|
export * from './skeleton';
|
23
24
|
export * from './table';
|
24
|
-
|
25
|
-
export
|
25
|
+
export * from './utils';
|
26
|
+
export * from './step';
|
27
|
+
declare const version = "1.2.26";
|
28
|
+
export { version, ProAction, ProCard, ProField, ProForm, ProInfo, ProPageContainer, ProPageHeader, ProSkeleton, ProTable, ProStep, hooks, nocode, templates, utils, };
|
package/es/index.js
CHANGED
@@ -11,6 +11,7 @@ import ProTable from './table';
|
|
11
11
|
import ProSkeleton from './skeleton';
|
12
12
|
import utils from './utils'; // import ProSidebar from './sidebar'
|
13
13
|
|
14
|
+
import { ProStep } from './step';
|
14
15
|
import * as nocode from './nocode';
|
15
16
|
import * as templates from './templates';
|
16
17
|
import TeamixIcon from '@teamix/icon'; // 设置图标源
|
@@ -25,9 +26,11 @@ export * from './nocode';
|
|
25
26
|
export * from './page-container';
|
26
27
|
export * from './page-header';
|
27
28
|
export * from './skeleton';
|
28
|
-
export * from './table';
|
29
|
+
export * from './table';
|
30
|
+
export * from './utils'; // export * from './sidebar';
|
29
31
|
|
30
|
-
|
32
|
+
export * from './step';
|
33
|
+
var version = '1.2.26';
|
31
34
|
export { version, ProAction, ProCard, ProField, ProForm, ProInfo, // ProLayout,
|
32
35
|
ProPageContainer, ProPageHeader, ProSkeleton, ProTable, // ProSidebar,
|
33
|
-
hooks, nocode, templates, utils };
|
36
|
+
ProStep, hooks, nocode, templates, utils };
|