@teamix/pro 1.4.24 → 1.4.25
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 +1756 -890
- package/dist/pro.min.css +1 -1
- package/dist/pro.min.js +1 -1
- package/es/actions/dialog.d.ts +2 -0
- package/es/actions/dialog.js +3 -2
- package/es/form/Filter/AdvancedFilter.js +8 -2
- package/es/form/ProForm/index.scss +33 -0
- package/es/form/index.d.ts +3 -0
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/info/components/InfoValueItem/index.js +15 -4
- package/es/info/typing.d.ts +4 -1
- package/es/table/components/Pagination/index.js +1 -2
- package/es/table/index.js +14 -1
- package/es/table/index.scss +1 -1
- package/lib/actions/dialog.d.ts +2 -0
- package/lib/actions/dialog.js +3 -2
- package/lib/form/Filter/AdvancedFilter.js +7 -1
- package/lib/form/ProForm/index.scss +33 -0
- package/lib/form/index.d.ts +3 -0
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/info/components/InfoValueItem/index.js +15 -4
- package/lib/info/typing.d.ts +4 -1
- package/lib/table/components/Pagination/index.js +1 -2
- package/lib/table/index.js +14 -1
- package/lib/table/index.scss +1 -1
- package/package.json +2 -2
package/es/actions/dialog.d.ts
CHANGED
@@ -31,6 +31,8 @@ export interface DialogAction extends Omit<RequestAction, 'url'>, Omit<QuickShow
|
|
31
31
|
onCancel?: any;
|
32
32
|
/** 隐藏footer区域 */
|
33
33
|
hideFooter?: boolean;
|
34
|
+
/** 支持通过传函数自定义底部按钮 */
|
35
|
+
footer?: any;
|
34
36
|
}
|
35
37
|
export declare function useDialogAction(action: DialogAction, actionContext?: any, hasForm?: boolean): {
|
36
38
|
[x: string]: (e: React.MouseEvent<HTMLElement, MouseEvent>) => Promise<void>;
|
package/es/actions/dialog.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
var _excluded = ["trigger", "url", "customRequest", "method", "params", "data", "extendParams", "successMsg", "errorMsg", "formatParams", "formatResult", "onSuccess", "onError", "onOk", "onCancel", "hideFooter"],
|
2
|
-
_excluded2 = ["title", "content", "component", "schema", "onFinish", "dialogType", "dialogQuickShowType", "messageType", "popType", "beforeRequest", "onTrigger", "link", "beforeContent", "afterContent", "message", "footerDescription", "footerAlign", "className"];
|
2
|
+
_excluded2 = ["title", "content", "component", "schema", "onFinish", "dialogType", "dialogQuickShowType", "messageType", "popType", "beforeRequest", "onTrigger", "link", "beforeContent", "afterContent", "message", "footerDescription", "footerAlign", "footer", "className"];
|
3
3
|
|
4
4
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
5
5
|
|
@@ -121,6 +121,7 @@ export function useDialogAction(action, actionContext, hasForm) {
|
|
121
121
|
message = _getTargetValue.message,
|
122
122
|
footerDescription = _getTargetValue.footerDescription,
|
123
123
|
footerAlign = _getTargetValue.footerAlign,
|
124
|
+
footer = _getTargetValue.footer,
|
124
125
|
className = _getTargetValue.className,
|
125
126
|
containerOtherProps = _objectWithoutProperties(_getTargetValue, _excluded2);
|
126
127
|
|
@@ -244,7 +245,7 @@ export function useDialogAction(action, actionContext, hasForm) {
|
|
244
245
|
className: classnames('teamix-pro-dialog-footer-description', getFooterAlignClass(isDrawer, footerAlign))
|
245
246
|
}, renderDialogFooterDescription(footerDescription)))), _defineProperty(_objectSpread2, "footerAlign", footerAlign), _defineProperty(_objectSpread2, "className", classnames('teamix-pro-action-dialog', {
|
246
247
|
'has-footer-description': !!footerDescription
|
247
|
-
})), _objectSpread2), containerProps), containerOtherProps); // TODO Drawer 基础组件未支持此配置,日后支持,并修改onOk、onCancel写法
|
248
|
+
})), _defineProperty(_objectSpread2, "footer", addContextForReactNode(footer, dialogContext)), _objectSpread2), containerProps), containerOtherProps); // TODO Drawer 基础组件未支持此配置,日后支持,并修改onOk、onCancel写法
|
248
249
|
|
249
250
|
|
250
251
|
if ((!dialogType || dialogType === 'dialog') && hideFooter) {
|
@@ -22,7 +22,7 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
22
22
|
|
23
23
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
24
24
|
|
25
|
-
import React, { memo, useMemo } from 'react';
|
25
|
+
import React, { memo, useEffect, useMemo } from 'react';
|
26
26
|
import { usePrefixCls, getMessage, cls, isBool } from '@teamix/utils';
|
27
27
|
import ProForm from '../ProForm';
|
28
28
|
import { mergeArrayValue } from '../utils';
|
@@ -47,7 +47,7 @@ var AdvancedFilter = /*#__PURE__*/memo(function (props) {
|
|
47
47
|
var prefixCls = usePrefixCls('teamix-pro-form-query-filter-advanced');
|
48
48
|
var gridSchema = useMemo(function () {
|
49
49
|
return [{
|
50
|
-
name: '
|
50
|
+
name: 'AdvancedFilterFormGrid',
|
51
51
|
component: 'FormGrid',
|
52
52
|
props: _objectSpread({
|
53
53
|
breakpoints: [480, 720, 990, 1200, Infinity],
|
@@ -67,6 +67,7 @@ var AdvancedFilter = /*#__PURE__*/memo(function (props) {
|
|
67
67
|
align: 'right'
|
68
68
|
},
|
69
69
|
children: [{
|
70
|
+
name: 'AdvancedFilterReset',
|
70
71
|
component: 'Reset',
|
71
72
|
props: {
|
72
73
|
onResetValidateSuccess: onReset,
|
@@ -86,6 +87,11 @@ var AdvancedFilter = /*#__PURE__*/memo(function (props) {
|
|
86
87
|
}])
|
87
88
|
}];
|
88
89
|
}, [schema, onReset]);
|
90
|
+
useEffect(function () {
|
91
|
+
var _otherProps$form;
|
92
|
+
|
93
|
+
otherProps === null || otherProps === void 0 ? void 0 : (_otherProps$form = otherProps.form) === null || _otherProps$form === void 0 ? void 0 : _otherProps$form.clearFormGraph('AdvancedFilterReset');
|
94
|
+
}, [onReset]);
|
89
95
|
var getTeamixLayout = useMemo(function () {
|
90
96
|
return breakpoints === true ? {
|
91
97
|
breakpoints: [990],
|
@@ -376,3 +376,36 @@
|
|
376
376
|
}
|
377
377
|
}
|
378
378
|
}
|
379
|
+
|
380
|
+
// inset 内嵌模式描述文案和校验样式修改
|
381
|
+
.#{$form-item-cls}-inset {
|
382
|
+
// 描述+校验
|
383
|
+
&.#{$form-item-cls}-feedback-has-text.#{$form-item-cls}-extra-wrap {
|
384
|
+
margin-bottom: 42px;
|
385
|
+
.#{$form-item-cls}-error-help {
|
386
|
+
position: absolute;
|
387
|
+
left: 0px;
|
388
|
+
}
|
389
|
+
.#{$form-item-cls}-extra {
|
390
|
+
position: absolute;
|
391
|
+
bottom: -40px;
|
392
|
+
left: 0px;
|
393
|
+
}
|
394
|
+
}
|
395
|
+
// 描述
|
396
|
+
&.#{$form-item-cls}-extra-wrap {
|
397
|
+
margin-bottom: 40px;
|
398
|
+
.#{$form-item-cls}-extra {
|
399
|
+
position: absolute;
|
400
|
+
left: 0px;
|
401
|
+
}
|
402
|
+
}
|
403
|
+
// 校验
|
404
|
+
&.#{$form-item-cls}-feedback-has-text {
|
405
|
+
margin-bottom: 40px;
|
406
|
+
.#{$form-item-cls}-error-help {
|
407
|
+
position: absolute;
|
408
|
+
left: 0px;
|
409
|
+
}
|
410
|
+
}
|
411
|
+
}
|
package/es/form/index.d.ts
CHANGED
@@ -32,6 +32,8 @@ declare const formilyReact: {
|
|
32
32
|
};
|
33
33
|
RecursionField: originalFormilyReact.ReactFC<originalFormilyReact.IRecursionFieldProps>;
|
34
34
|
ExpressionScope: originalFormilyReact.ReactFC<originalFormilyReact.IExpressionScopeProps>;
|
35
|
+
RecordsScope: originalFormilyReact.ReactFC<originalFormilyReact.IRecordsScopeProps>;
|
36
|
+
RecordScope: originalFormilyReact.ReactFC<originalFormilyReact.IRecordScopeProps>;
|
35
37
|
createSchemaField<Components extends originalFormilyReact.SchemaReactComponents>(options?: originalFormilyReact.ISchemaFieldReactFactoryOptions<Components> | undefined): {
|
36
38
|
<Decorator extends originalFormilyReact.JSXComponent, Component extends originalFormilyReact.JSXComponent>(props: originalFormilyReact.ISchemaFieldProps<Decorator, Component, import("@formily/core").ObjectField<Decorator, Component>>): JSX.Element;
|
37
39
|
displayName: string;
|
@@ -98,6 +100,7 @@ declare const formilyReact: {
|
|
98
100
|
useParentForm: () => import("@formily/core").Form<any> | import("@formily/core").ObjectField<any, any>;
|
99
101
|
useFieldSchema: () => originalFormilyReact.Schema<any, any, any, any, any, any, any, any, any>;
|
100
102
|
useFormEffects: (effects?: ((form: import("@formily/core").Form<any>) => void) | undefined) => void;
|
103
|
+
useExpressionScope: () => any;
|
101
104
|
};
|
102
105
|
import { customComponent } from './ProForm/customComponent';
|
103
106
|
export { formilyReact, customComponent };
|
package/es/index.d.ts
CHANGED
@@ -28,5 +28,5 @@ export * from './table';
|
|
28
28
|
export * from './sidebar';
|
29
29
|
export * from './utils';
|
30
30
|
export * from './timeline';
|
31
|
-
declare const version = "1.4.
|
31
|
+
declare const version = "1.4.25";
|
32
32
|
export { version, ProAction, ProCard, ProField, ProForm, ProInfo, ProPageContainer, ProPageHeader, ProSkeleton, ProTable, ProSidebar, ProTimeline, TeamixIcon, hooks, nocode, templates, utils, };
|
package/es/index.js
CHANGED
@@ -36,6 +36,6 @@ export * from './table';
|
|
36
36
|
export * from './sidebar';
|
37
37
|
export * from './utils';
|
38
38
|
export * from './timeline';
|
39
|
-
var version = '1.4.
|
39
|
+
var version = '1.4.25';
|
40
40
|
export { version, ProAction, ProCard, ProField, ProForm, ProInfo, // ProLayout,
|
41
41
|
ProPageContainer, ProPageHeader, ProSkeleton, ProTable, ProSidebar, ProTimeline, TeamixIcon, hooks, nocode, templates, utils };
|
@@ -67,7 +67,18 @@ var InfoValueItem = function InfoValueItem(props) {
|
|
67
67
|
successMessage = _infoItem$successMess === void 0 ? 'success' : _infoItem$successMess,
|
68
68
|
actions = infoItem.actions,
|
69
69
|
extra = infoItem.extra,
|
70
|
-
valueType = infoItem.valueType
|
70
|
+
valueType = infoItem.valueType,
|
71
|
+
_infoItem$editProForm = infoItem.editProFormProps,
|
72
|
+
editProFormProps = _infoItem$editProForm === void 0 ? {} : _infoItem$editProForm; // 获取配置
|
73
|
+
|
74
|
+
var getInfoItemProps = function getInfoItemProps(prop) {
|
75
|
+
if (typeof prop === 'function') {
|
76
|
+
return prop === null || prop === void 0 ? void 0 : prop(value, record);
|
77
|
+
}
|
78
|
+
|
79
|
+
return prop;
|
80
|
+
}; // 获取处理过的 render
|
81
|
+
|
71
82
|
|
72
83
|
var getRender = function getRender() {
|
73
84
|
var _processRenderFunctio;
|
@@ -225,10 +236,10 @@ var InfoValueItem = function InfoValueItem(props) {
|
|
225
236
|
}; // 重写编辑逻辑替代field原有逻辑
|
226
237
|
|
227
238
|
|
228
|
-
if (isEdit) {
|
239
|
+
if (getInfoItemProps(isEdit)) {
|
229
240
|
// 渲染表单
|
230
241
|
var renderContent = function renderContent() {
|
231
|
-
return /*#__PURE__*/React.createElement(ProForm, {
|
242
|
+
return /*#__PURE__*/React.createElement(ProForm, _objectSpread({
|
232
243
|
schema: [{
|
233
244
|
name: dataIndex,
|
234
245
|
component: 'Input',
|
@@ -236,7 +247,7 @@ var InfoValueItem = function InfoValueItem(props) {
|
|
236
247
|
default: value
|
237
248
|
}],
|
238
249
|
form: dataFilterForm
|
239
|
-
});
|
250
|
+
}, getInfoItemProps(editProFormProps)));
|
240
251
|
}; // 表单提交
|
241
252
|
|
242
253
|
|
package/es/info/typing.d.ts
CHANGED
@@ -4,6 +4,7 @@ import { Method } from 'axios';
|
|
4
4
|
import React from 'react';
|
5
5
|
import { CommonRequestConfig } from '@teamix/utils';
|
6
6
|
import { ProCardProps } from '../card';
|
7
|
+
import { ProFormProps } from '../form';
|
7
8
|
/** 列record函数 */
|
8
9
|
declare type ProInfoCellFunProp = (value: any, record: any) => any;
|
9
10
|
declare type FieldRenderProps = keyof ProFieldRenderProps;
|
@@ -77,7 +78,7 @@ export interface ProInfoColumnsProps {
|
|
77
78
|
/** 合并行 */
|
78
79
|
colSpan?: number;
|
79
80
|
/** 是否可被编辑 */
|
80
|
-
isEdit?: boolean;
|
81
|
+
isEdit?: boolean | ProInfoCellFunProp;
|
81
82
|
/** 点击确定的回调函数 */
|
82
83
|
editOnOk?: (form: any, e: React.MouseEvent) => void | Promise<any>;
|
83
84
|
/** 点击取消的回调函数 */
|
@@ -88,6 +89,8 @@ export interface ProInfoColumnsProps {
|
|
88
89
|
editMethod?: Method;
|
89
90
|
/** 如需自定义调用参数格式,则可以设定此值在请求前对 params 进行自定义,如果返回false则可以阻止请求 */
|
90
91
|
editFormatParams?: (params: any, record: any) => typeof params;
|
92
|
+
/** edit ProForm 配置 */
|
93
|
+
editProFormProps?: ProFormProps | ProInfoCellFunProp;
|
91
94
|
/** 编辑请求成功提示文案 */
|
92
95
|
successMessage?: string;
|
93
96
|
/** 列 actions 配置 */
|
@@ -1,4 +1,4 @@
|
|
1
|
-
var _excluded = ["className", "onChange", "total", "
|
1
|
+
var _excluded = ["className", "onChange", "total", "pageSize", "current", "pageSizeList", "pageSizeSelector", "onPageSizeChange", "responsivePaginationType"];
|
2
2
|
|
3
3
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
4
4
|
|
@@ -32,7 +32,6 @@ export default (function (props) {
|
|
32
32
|
var className = props.className,
|
33
33
|
propsOnChange = props.onChange,
|
34
34
|
total = props.total,
|
35
|
-
totalRender = props.totalRender,
|
36
35
|
pageSize = props.pageSize,
|
37
36
|
current = props.current,
|
38
37
|
pageSizeList = props.pageSizeList,
|
package/es/table/index.js
CHANGED
@@ -862,6 +862,7 @@ var ProTable = function ProTable(props) {
|
|
862
862
|
|
863
863
|
(_actionRef$current6 = actionRef.current) === null || _actionRef$current6 === void 0 ? void 0 : (_actionRef$current6$c = _actionRef$current6.clearRowSelection) === null || _actionRef$current6$c === void 0 ? void 0 : _actionRef$current6$c.call(_actionRef$current6);
|
864
864
|
setCurrentPage(1);
|
865
|
+
console.log('currentPageSize1', pageSize);
|
865
866
|
|
866
867
|
_request(_defineProperty({}, targetPageKey, 1), false, values);
|
867
868
|
},
|
@@ -871,6 +872,7 @@ var ProTable = function ProTable(props) {
|
|
871
872
|
(propsDataFilter === null || propsDataFilter === void 0 ? void 0 : propsDataFilter.onReset) && (propsDataFilter === null || propsDataFilter === void 0 ? void 0 : propsDataFilter.onReset());
|
872
873
|
(_dataFilterFormRef$cu3 = dataFilterFormRef.current) === null || _dataFilterFormRef$cu3 === void 0 ? void 0 : _dataFilterFormRef$cu3.reset();
|
873
874
|
setCurrentPage(1);
|
875
|
+
console.log('currentPageSize2', pageSize);
|
874
876
|
|
875
877
|
_request(_defineProperty({}, targetPageKey, 1), false, values);
|
876
878
|
}
|
@@ -1008,13 +1010,24 @@ var ProTable = function ProTable(props) {
|
|
1008
1010
|
count: selectedCount
|
1009
1011
|
})));
|
1010
1012
|
}
|
1013
|
+
} else if (footerAction) {
|
1014
|
+
if (showSkeleton) {
|
1015
|
+
return /*#__PURE__*/React.createElement("div", {
|
1016
|
+
className: cls('footer-left-wrapper')
|
1017
|
+
}, /*#__PURE__*/React.createElement(Skeleton.Footer.Operation, null));
|
1018
|
+
} else {
|
1019
|
+
return /*#__PURE__*/React.createElement("div", {
|
1020
|
+
className: cls('footer-left-wrapper')
|
1021
|
+
}, footerAction && renderFooterAction());
|
1022
|
+
}
|
1011
1023
|
}
|
1012
1024
|
}
|
1013
1025
|
|
1014
1026
|
if (showPagination) {
|
1015
1027
|
return /*#__PURE__*/React.createElement("div", {
|
1016
1028
|
className: cls('footer', {
|
1017
|
-
'footer-has-rowSelection': rowSelection
|
1029
|
+
'footer-has-rowSelection': rowSelection,
|
1030
|
+
'footer-has-action': footerAction
|
1018
1031
|
})
|
1019
1032
|
}, renderRowSelection(), /*#__PURE__*/React.createElement("div", {
|
1020
1033
|
className: cls('footer-right-wrapper')
|
package/es/table/index.scss
CHANGED
package/lib/actions/dialog.d.ts
CHANGED
@@ -31,6 +31,8 @@ export interface DialogAction extends Omit<RequestAction, 'url'>, Omit<QuickShow
|
|
31
31
|
onCancel?: any;
|
32
32
|
/** 隐藏footer区域 */
|
33
33
|
hideFooter?: boolean;
|
34
|
+
/** 支持通过传函数自定义底部按钮 */
|
35
|
+
footer?: any;
|
34
36
|
}
|
35
37
|
export declare function useDialogAction(action: DialogAction, actionContext?: any, hasForm?: boolean): {
|
36
38
|
[x: string]: (e: React.MouseEvent<HTMLElement, MouseEvent>) => Promise<void>;
|
package/lib/actions/dialog.js
CHANGED
@@ -31,7 +31,7 @@ var _request = require("./request");
|
|
31
31
|
var _utils2 = require("./utils");
|
32
32
|
|
33
33
|
var _excluded = ["trigger", "url", "customRequest", "method", "params", "data", "extendParams", "successMsg", "errorMsg", "formatParams", "formatResult", "onSuccess", "onError", "onOk", "onCancel", "hideFooter"],
|
34
|
-
_excluded2 = ["title", "content", "component", "schema", "onFinish", "dialogType", "dialogQuickShowType", "messageType", "popType", "beforeRequest", "onTrigger", "link", "beforeContent", "afterContent", "message", "footerDescription", "footerAlign", "className"];
|
34
|
+
_excluded2 = ["title", "content", "component", "schema", "onFinish", "dialogType", "dialogQuickShowType", "messageType", "popType", "beforeRequest", "onTrigger", "link", "beforeContent", "afterContent", "message", "footerDescription", "footerAlign", "footer", "className"];
|
35
35
|
|
36
36
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
37
37
|
|
@@ -147,6 +147,7 @@ function useDialogAction(action, actionContext, hasForm) {
|
|
147
147
|
message = _getTargetValue.message,
|
148
148
|
footerDescription = _getTargetValue.footerDescription,
|
149
149
|
footerAlign = _getTargetValue.footerAlign,
|
150
|
+
footer = _getTargetValue.footer,
|
150
151
|
className = _getTargetValue.className,
|
151
152
|
containerOtherProps = _objectWithoutProperties(_getTargetValue, _excluded2);
|
152
153
|
|
@@ -270,7 +271,7 @@ function useDialogAction(action, actionContext, hasForm) {
|
|
270
271
|
className: (0, _classnames.default)('teamix-pro-dialog-footer-description', getFooterAlignClass(isDrawer, footerAlign))
|
271
272
|
}, renderDialogFooterDescription(footerDescription)))), _defineProperty(_objectSpread2, "footerAlign", footerAlign), _defineProperty(_objectSpread2, "className", (0, _classnames.default)('teamix-pro-action-dialog', {
|
272
273
|
'has-footer-description': !!footerDescription
|
273
|
-
})), _objectSpread2), containerProps), containerOtherProps); // TODO Drawer 基础组件未支持此配置,日后支持,并修改onOk、onCancel写法
|
274
|
+
})), _defineProperty(_objectSpread2, "footer", addContextForReactNode(footer, dialogContext)), _objectSpread2), containerProps), containerOtherProps); // TODO Drawer 基础组件未支持此配置,日后支持,并修改onOk、onCancel写法
|
274
275
|
|
275
276
|
|
276
277
|
if ((!dialogType || dialogType === 'dialog') && hideFooter) {
|
@@ -65,7 +65,7 @@ var AdvancedFilter = /*#__PURE__*/(0, _react.memo)(function (props) {
|
|
65
65
|
var prefixCls = (0, _utils.usePrefixCls)('teamix-pro-form-query-filter-advanced');
|
66
66
|
var gridSchema = (0, _react.useMemo)(function () {
|
67
67
|
return [{
|
68
|
-
name: '
|
68
|
+
name: 'AdvancedFilterFormGrid',
|
69
69
|
component: 'FormGrid',
|
70
70
|
props: _objectSpread({
|
71
71
|
breakpoints: [480, 720, 990, 1200, Infinity],
|
@@ -85,6 +85,7 @@ var AdvancedFilter = /*#__PURE__*/(0, _react.memo)(function (props) {
|
|
85
85
|
align: 'right'
|
86
86
|
},
|
87
87
|
children: [{
|
88
|
+
name: 'AdvancedFilterReset',
|
88
89
|
component: 'Reset',
|
89
90
|
props: {
|
90
91
|
onResetValidateSuccess: onReset,
|
@@ -104,6 +105,11 @@ var AdvancedFilter = /*#__PURE__*/(0, _react.memo)(function (props) {
|
|
104
105
|
}])
|
105
106
|
}];
|
106
107
|
}, [schema, onReset]);
|
108
|
+
(0, _react.useEffect)(function () {
|
109
|
+
var _otherProps$form;
|
110
|
+
|
111
|
+
otherProps === null || otherProps === void 0 ? void 0 : (_otherProps$form = otherProps.form) === null || _otherProps$form === void 0 ? void 0 : _otherProps$form.clearFormGraph('AdvancedFilterReset');
|
112
|
+
}, [onReset]);
|
107
113
|
var getTeamixLayout = (0, _react.useMemo)(function () {
|
108
114
|
return breakpoints === true ? {
|
109
115
|
breakpoints: [990],
|
@@ -376,3 +376,36 @@
|
|
376
376
|
}
|
377
377
|
}
|
378
378
|
}
|
379
|
+
|
380
|
+
// inset 内嵌模式描述文案和校验样式修改
|
381
|
+
.#{$form-item-cls}-inset {
|
382
|
+
// 描述+校验
|
383
|
+
&.#{$form-item-cls}-feedback-has-text.#{$form-item-cls}-extra-wrap {
|
384
|
+
margin-bottom: 42px;
|
385
|
+
.#{$form-item-cls}-error-help {
|
386
|
+
position: absolute;
|
387
|
+
left: 0px;
|
388
|
+
}
|
389
|
+
.#{$form-item-cls}-extra {
|
390
|
+
position: absolute;
|
391
|
+
bottom: -40px;
|
392
|
+
left: 0px;
|
393
|
+
}
|
394
|
+
}
|
395
|
+
// 描述
|
396
|
+
&.#{$form-item-cls}-extra-wrap {
|
397
|
+
margin-bottom: 40px;
|
398
|
+
.#{$form-item-cls}-extra {
|
399
|
+
position: absolute;
|
400
|
+
left: 0px;
|
401
|
+
}
|
402
|
+
}
|
403
|
+
// 校验
|
404
|
+
&.#{$form-item-cls}-feedback-has-text {
|
405
|
+
margin-bottom: 40px;
|
406
|
+
.#{$form-item-cls}-error-help {
|
407
|
+
position: absolute;
|
408
|
+
left: 0px;
|
409
|
+
}
|
410
|
+
}
|
411
|
+
}
|
package/lib/form/index.d.ts
CHANGED
@@ -32,6 +32,8 @@ declare const formilyReact: {
|
|
32
32
|
};
|
33
33
|
RecursionField: originalFormilyReact.ReactFC<originalFormilyReact.IRecursionFieldProps>;
|
34
34
|
ExpressionScope: originalFormilyReact.ReactFC<originalFormilyReact.IExpressionScopeProps>;
|
35
|
+
RecordsScope: originalFormilyReact.ReactFC<originalFormilyReact.IRecordsScopeProps>;
|
36
|
+
RecordScope: originalFormilyReact.ReactFC<originalFormilyReact.IRecordScopeProps>;
|
35
37
|
createSchemaField<Components extends originalFormilyReact.SchemaReactComponents>(options?: originalFormilyReact.ISchemaFieldReactFactoryOptions<Components> | undefined): {
|
36
38
|
<Decorator extends originalFormilyReact.JSXComponent, Component extends originalFormilyReact.JSXComponent>(props: originalFormilyReact.ISchemaFieldProps<Decorator, Component, import("@formily/core").ObjectField<Decorator, Component>>): JSX.Element;
|
37
39
|
displayName: string;
|
@@ -98,6 +100,7 @@ declare const formilyReact: {
|
|
98
100
|
useParentForm: () => import("@formily/core").Form<any> | import("@formily/core").ObjectField<any, any>;
|
99
101
|
useFieldSchema: () => originalFormilyReact.Schema<any, any, any, any, any, any, any, any, any>;
|
100
102
|
useFormEffects: (effects?: ((form: import("@formily/core").Form<any>) => void) | undefined) => void;
|
103
|
+
useExpressionScope: () => any;
|
101
104
|
};
|
102
105
|
import { customComponent } from './ProForm/customComponent';
|
103
106
|
export { formilyReact, customComponent };
|
package/lib/index.d.ts
CHANGED
@@ -28,5 +28,5 @@ export * from './table';
|
|
28
28
|
export * from './sidebar';
|
29
29
|
export * from './utils';
|
30
30
|
export * from './timeline';
|
31
|
-
declare const version = "1.4.
|
31
|
+
declare const version = "1.4.25";
|
32
32
|
export { version, ProAction, ProCard, ProField, ProForm, ProInfo, ProPageContainer, ProPageHeader, ProSkeleton, ProTable, ProSidebar, ProTimeline, TeamixIcon, hooks, nocode, templates, utils, };
|
package/lib/index.js
CHANGED
@@ -91,7 +91,18 @@ var InfoValueItem = function InfoValueItem(props) {
|
|
91
91
|
successMessage = _infoItem$successMess === void 0 ? 'success' : _infoItem$successMess,
|
92
92
|
actions = infoItem.actions,
|
93
93
|
extra = infoItem.extra,
|
94
|
-
valueType = infoItem.valueType
|
94
|
+
valueType = infoItem.valueType,
|
95
|
+
_infoItem$editProForm = infoItem.editProFormProps,
|
96
|
+
editProFormProps = _infoItem$editProForm === void 0 ? {} : _infoItem$editProForm; // 获取配置
|
97
|
+
|
98
|
+
var getInfoItemProps = function getInfoItemProps(prop) {
|
99
|
+
if (typeof prop === 'function') {
|
100
|
+
return prop === null || prop === void 0 ? void 0 : prop(value, record);
|
101
|
+
}
|
102
|
+
|
103
|
+
return prop;
|
104
|
+
}; // 获取处理过的 render
|
105
|
+
|
95
106
|
|
96
107
|
var getRender = function getRender() {
|
97
108
|
var _processRenderFunctio;
|
@@ -249,10 +260,10 @@ var InfoValueItem = function InfoValueItem(props) {
|
|
249
260
|
}; // 重写编辑逻辑替代field原有逻辑
|
250
261
|
|
251
262
|
|
252
|
-
if (isEdit) {
|
263
|
+
if (getInfoItemProps(isEdit)) {
|
253
264
|
// 渲染表单
|
254
265
|
var renderContent = function renderContent() {
|
255
|
-
return /*#__PURE__*/_react.default.createElement(_form.default, {
|
266
|
+
return /*#__PURE__*/_react.default.createElement(_form.default, _objectSpread({
|
256
267
|
schema: [{
|
257
268
|
name: dataIndex,
|
258
269
|
component: 'Input',
|
@@ -260,7 +271,7 @@ var InfoValueItem = function InfoValueItem(props) {
|
|
260
271
|
default: value
|
261
272
|
}],
|
262
273
|
form: dataFilterForm
|
263
|
-
});
|
274
|
+
}, getInfoItemProps(editProFormProps)));
|
264
275
|
}; // 表单提交
|
265
276
|
|
266
277
|
|
package/lib/info/typing.d.ts
CHANGED
@@ -4,6 +4,7 @@ import { Method } from 'axios';
|
|
4
4
|
import React from 'react';
|
5
5
|
import { CommonRequestConfig } from '@teamix/utils';
|
6
6
|
import { ProCardProps } from '../card';
|
7
|
+
import { ProFormProps } from '../form';
|
7
8
|
/** 列record函数 */
|
8
9
|
declare type ProInfoCellFunProp = (value: any, record: any) => any;
|
9
10
|
declare type FieldRenderProps = keyof ProFieldRenderProps;
|
@@ -77,7 +78,7 @@ export interface ProInfoColumnsProps {
|
|
77
78
|
/** 合并行 */
|
78
79
|
colSpan?: number;
|
79
80
|
/** 是否可被编辑 */
|
80
|
-
isEdit?: boolean;
|
81
|
+
isEdit?: boolean | ProInfoCellFunProp;
|
81
82
|
/** 点击确定的回调函数 */
|
82
83
|
editOnOk?: (form: any, e: React.MouseEvent) => void | Promise<any>;
|
83
84
|
/** 点击取消的回调函数 */
|
@@ -88,6 +89,8 @@ export interface ProInfoColumnsProps {
|
|
88
89
|
editMethod?: Method;
|
89
90
|
/** 如需自定义调用参数格式,则可以设定此值在请求前对 params 进行自定义,如果返回false则可以阻止请求 */
|
90
91
|
editFormatParams?: (params: any, record: any) => typeof params;
|
92
|
+
/** edit ProForm 配置 */
|
93
|
+
editProFormProps?: ProFormProps | ProInfoCellFunProp;
|
91
94
|
/** 编辑请求成功提示文案 */
|
92
95
|
successMessage?: string;
|
93
96
|
/** 列 actions 配置 */
|
@@ -17,7 +17,7 @@ var _hooks = require("@teamix/hooks");
|
|
17
17
|
|
18
18
|
require("./index.scss");
|
19
19
|
|
20
|
-
var _excluded = ["className", "onChange", "total", "
|
20
|
+
var _excluded = ["className", "onChange", "total", "pageSize", "current", "pageSizeList", "pageSizeSelector", "onPageSizeChange", "responsivePaginationType"];
|
21
21
|
|
22
22
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
23
23
|
|
@@ -49,7 +49,6 @@ var _default = function _default(props) {
|
|
49
49
|
var className = props.className,
|
50
50
|
propsOnChange = props.onChange,
|
51
51
|
total = props.total,
|
52
|
-
totalRender = props.totalRender,
|
53
52
|
pageSize = props.pageSize,
|
54
53
|
current = props.current,
|
55
54
|
pageSizeList = props.pageSizeList,
|
package/lib/table/index.js
CHANGED
@@ -906,6 +906,7 @@ var ProTable = function ProTable(props) {
|
|
906
906
|
|
907
907
|
(_actionRef$current6 = actionRef.current) === null || _actionRef$current6 === void 0 ? void 0 : (_actionRef$current6$c = _actionRef$current6.clearRowSelection) === null || _actionRef$current6$c === void 0 ? void 0 : _actionRef$current6$c.call(_actionRef$current6);
|
908
908
|
setCurrentPage(1);
|
909
|
+
console.log('currentPageSize1', pageSize);
|
909
910
|
|
910
911
|
_request(_defineProperty({}, targetPageKey, 1), false, values);
|
911
912
|
},
|
@@ -915,6 +916,7 @@ var ProTable = function ProTable(props) {
|
|
915
916
|
(propsDataFilter === null || propsDataFilter === void 0 ? void 0 : propsDataFilter.onReset) && (propsDataFilter === null || propsDataFilter === void 0 ? void 0 : propsDataFilter.onReset());
|
916
917
|
(_dataFilterFormRef$cu3 = dataFilterFormRef.current) === null || _dataFilterFormRef$cu3 === void 0 ? void 0 : _dataFilterFormRef$cu3.reset();
|
917
918
|
setCurrentPage(1);
|
919
|
+
console.log('currentPageSize2', pageSize);
|
918
920
|
|
919
921
|
_request(_defineProperty({}, targetPageKey, 1), false, values);
|
920
922
|
}
|
@@ -1052,13 +1054,24 @@ var ProTable = function ProTable(props) {
|
|
1052
1054
|
count: selectedCount
|
1053
1055
|
})));
|
1054
1056
|
}
|
1057
|
+
} else if (footerAction) {
|
1058
|
+
if (showSkeleton) {
|
1059
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
1060
|
+
className: cls('footer-left-wrapper')
|
1061
|
+
}, /*#__PURE__*/_react.default.createElement(_skeleton.ProSkeletonRaw.Footer.Operation, null));
|
1062
|
+
} else {
|
1063
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
1064
|
+
className: cls('footer-left-wrapper')
|
1065
|
+
}, footerAction && renderFooterAction());
|
1066
|
+
}
|
1055
1067
|
}
|
1056
1068
|
}
|
1057
1069
|
|
1058
1070
|
if (showPagination) {
|
1059
1071
|
return /*#__PURE__*/_react.default.createElement("div", {
|
1060
1072
|
className: cls('footer', {
|
1061
|
-
'footer-has-rowSelection': rowSelection
|
1073
|
+
'footer-has-rowSelection': rowSelection,
|
1074
|
+
'footer-has-action': footerAction
|
1062
1075
|
})
|
1063
1076
|
}, renderRowSelection(), /*#__PURE__*/_react.default.createElement("div", {
|
1064
1077
|
className: cls('footer-right-wrapper')
|
package/lib/table/index.scss
CHANGED
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@teamix/pro",
|
3
|
-
"version": "1.4.
|
3
|
+
"version": "1.4.25",
|
4
4
|
"description": "TeamixPro大包",
|
5
5
|
"keywords": [
|
6
6
|
"aliyun",
|
@@ -36,7 +36,7 @@
|
|
36
36
|
],
|
37
37
|
"private": false,
|
38
38
|
"dependencies": {
|
39
|
-
"@teamix/formily": "2.
|
39
|
+
"@teamix/formily": "2.2.4",
|
40
40
|
"@teamix/hooks": "^0.1.0",
|
41
41
|
"@teamix/pop-confirm": "^1.2.4",
|
42
42
|
"@teamix/pro-field": "^1.0.0",
|