@teamix/pro 1.2.0 → 1.2.5

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 (94) hide show
  1. package/dist/212.js +1 -1
  2. package/dist/pro.css +1 -1
  3. package/dist/pro.js +1072 -507
  4. package/dist/pro.min.css +1 -1
  5. package/dist/pro.min.js +1 -1
  6. package/es/actions/dialog-component.js +2 -1
  7. package/es/actions/dialog-form.js +2 -1
  8. package/es/actions/dialog.js +2 -1
  9. package/es/actions/index.js +1 -1
  10. package/es/actions/utils.d.ts +1 -0
  11. package/es/actions/utils.js +27 -0
  12. package/es/card/card-container.d.ts +18 -0
  13. package/es/card/card-container.js +24 -0
  14. package/es/card/divider.d.ts +6 -0
  15. package/es/card/divider.js +16 -0
  16. package/es/card/index.d.ts +59 -32
  17. package/es/card/index.js +191 -107
  18. package/es/card/index.scss +124 -9
  19. package/es/card/utils.d.ts +9 -0
  20. package/es/card/utils.js +30 -0
  21. package/es/form/Components/ProField/index.js +2 -6
  22. package/es/form/ProForm/index.js +43 -17
  23. package/es/form/ProForm/index.scss +0 -1
  24. package/es/form/ProForm/useAutoSubmit.d.ts +1 -1
  25. package/es/form/ProForm/useAutoSubmit.js +3 -3
  26. package/es/form/ProForm/useInitialRequest.d.ts +1 -1
  27. package/es/form/ProForm/useInitialRequest.js +2 -2
  28. package/es/form/SchemaForm/initializeDataSource.js +1 -1
  29. package/es/form/SchemaForm/initializeFormButton.js +3 -2
  30. package/es/form/SchemaForm/initializeRequest.js +6 -3
  31. package/es/form/SchemaForm/initializeRules.js +1 -1
  32. package/es/form/SchemaForm/reactions.d.ts +5 -4
  33. package/es/form/SchemaForm/reactions.js +20 -11
  34. package/es/form/locales/validate.d.ts +159 -0
  35. package/es/form/locales/validate.js +158 -0
  36. package/es/form/typing.d.ts +4 -3
  37. package/es/index.d.ts +1 -1
  38. package/es/index.js +1 -1
  39. package/es/info/components/InfoGroup/index.js +5 -2
  40. package/es/info/components/InfoValueItem/index.js +5 -7
  41. package/es/info/components/baseInfo/index.js +4 -2
  42. package/es/info/index.js +25 -11
  43. package/es/info/typing.d.ts +6 -0
  44. package/es/nocode/configurators/Card.js +8 -4
  45. package/es/table/components/Layout/index.js +1 -1
  46. package/es/table/components/ToolBar/FilterColumnIcon.js +2 -24
  47. package/es/table/components/ToolBar/index.scss +0 -3
  48. package/es/table/index.js +15 -7
  49. package/es/table/typing.d.ts +4 -4
  50. package/lib/actions/dialog-component.js +3 -1
  51. package/lib/actions/dialog-form.js +3 -1
  52. package/lib/actions/dialog.js +3 -1
  53. package/lib/actions/index.js +1 -1
  54. package/lib/actions/utils.d.ts +1 -0
  55. package/lib/actions/utils.js +33 -0
  56. package/lib/card/card-container.d.ts +18 -0
  57. package/lib/card/card-container.js +37 -0
  58. package/lib/card/divider.d.ts +6 -0
  59. package/lib/card/divider.js +26 -0
  60. package/lib/card/index.d.ts +59 -32
  61. package/lib/card/index.js +211 -110
  62. package/lib/card/index.scss +124 -9
  63. package/lib/card/utils.d.ts +9 -0
  64. package/lib/card/utils.js +41 -0
  65. package/lib/form/Components/ProField/index.js +1 -5
  66. package/lib/form/ProForm/index.js +41 -14
  67. package/lib/form/ProForm/index.scss +0 -1
  68. package/lib/form/ProForm/useAutoSubmit.d.ts +1 -1
  69. package/lib/form/ProForm/useAutoSubmit.js +3 -3
  70. package/lib/form/ProForm/useInitialRequest.d.ts +1 -1
  71. package/lib/form/ProForm/useInitialRequest.js +2 -2
  72. package/lib/form/SchemaForm/initializeDataSource.js +1 -1
  73. package/lib/form/SchemaForm/initializeFormButton.js +5 -2
  74. package/lib/form/SchemaForm/initializeRequest.js +5 -2
  75. package/lib/form/SchemaForm/initializeRules.js +1 -1
  76. package/lib/form/SchemaForm/reactions.d.ts +5 -4
  77. package/lib/form/SchemaForm/reactions.js +23 -12
  78. package/lib/form/locales/validate.d.ts +159 -0
  79. package/lib/form/locales/validate.js +165 -0
  80. package/lib/form/typing.d.ts +4 -3
  81. package/lib/index.d.ts +1 -1
  82. package/lib/index.js +1 -1
  83. package/lib/info/components/InfoGroup/index.js +5 -2
  84. package/lib/info/components/InfoValueItem/index.js +5 -7
  85. package/lib/info/components/baseInfo/index.js +4 -2
  86. package/lib/info/index.js +24 -10
  87. package/lib/info/typing.d.ts +6 -0
  88. package/lib/nocode/configurators/Card.js +8 -4
  89. package/lib/table/components/Layout/index.js +1 -1
  90. package/lib/table/components/ToolBar/FilterColumnIcon.js +2 -24
  91. package/lib/table/components/ToolBar/index.scss +0 -3
  92. package/lib/table/index.js +16 -7
  93. package/lib/table/typing.d.ts +4 -4
  94. package/package.json +5 -4
@@ -14,9 +14,9 @@ declare type IButtonComponent = 'Submit' | 'Reset';
14
14
  declare type IComboComponent = 'ArrayCards' | 'ArrayCards.Addition' | 'ArrayCards.Remove' | 'ArrayCards.MoveUp' | 'ArrayCards.MoveDown' | 'ArrayCards.Index' | 'ArrayCollapse' | 'ArrayCollapse.CollapsePanel' | 'ArrayCollapse.Addition' | 'ArrayCollapse.Remove' | 'ArrayCollapse.MoveUp' | 'ArrayCollapse.MoveDown' | 'ArrayCollapse.Index' | 'ArrayTable' | 'ArrayTable.Column' | 'ArrayTable.SortHandle' | 'ArrayTable.Addition' | 'ArrayTable.Remove' | 'ArrayTable.MoveDown' | 'ArrayTable.MoveUp' | 'ArrayTable.Index' | 'ArrayItems' | 'ArrayItems.Item' | 'ArrayItems.SortHandle' | 'ArrayItems.Addition' | 'ArrayItems.Remove' | 'ArrayItems.MoveDown' | 'ArrayItems.MoveUp' | 'ArrayItems.Index' | 'Editable' | 'Editable.Popover' | 'Editable.Dialog' | 'Editable.Drawer';
15
15
  declare type ILayoutComponent = 'FormFlex' | 'FormGrid' | 'FormGroup' | 'FormGroup.GroupPanel' | 'Search' | 'Search.SearchPanel' | 'FormTab' | 'FormTab.TabPane' | 'FormStep' | 'FormStep.StepPane' | 'FormCollapse' | 'FormCollapse.CollapsePanel' | 'FormButtonGroup' | 'FormDialog' | 'FormDrawer' | 'FormDialog.Footer' | 'FormDrawer.Footer';
16
16
  export interface ProFormRequestConfig extends CommonRequestConfig {
17
- beforeRequest?: (field?: any) => any;
18
- onSuccess?: (res?: any, field?: any) => any;
19
- onComplete?: (res?: any, field?: any) => any;
17
+ beforeRequest?: (field?: any, context?: any) => any;
18
+ onSuccess?: (res?: any, field?: any, context?: any) => any;
19
+ onComplete?: (res?: any, field?: any, context?: any) => any;
20
20
  }
21
21
  export interface ProFormSchemaItem {
22
22
  type?: string;
@@ -51,6 +51,7 @@ export interface ProFormProps extends IFormLayoutProps {
51
51
  form?: FormType | false;
52
52
  schema: ProFormSchema;
53
53
  scope?: any;
54
+ context?: any;
54
55
  components?: {
55
56
  [key: string]: React.FC | React.ComponentClass;
56
57
  };
package/lib/index.d.ts CHANGED
@@ -21,5 +21,5 @@ export * from './page-container';
21
21
  export * from './page-header';
22
22
  export * from './skeleton';
23
23
  export * from './table';
24
- declare const version = "1.1.39";
24
+ declare const version = "1.2.4";
25
25
  export { version, ProAction, ProCard, ProField, ProForm, ProInfo, ProPageContainer, ProPageHeader, ProSkeleton, ProTable, hooks, nocode, templates, utils, };
package/lib/index.js CHANGED
@@ -251,5 +251,5 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
251
251
  // 设置图标源
252
252
  _icon.default.setConfig(_utils.default.getTeamixIconConfig());
253
253
 
254
- var version = '1.1.39';
254
+ var version = '1.2.4';
255
255
  exports.version = version;
@@ -19,7 +19,7 @@ var _classnames = _interopRequireDefault(require("classnames"));
19
19
 
20
20
  var _ = _interopRequireDefault(require("../.."));
21
21
 
22
- var _excluded = ["children", "url", "method", "params", "formatResult", "onSuccess", "onError", "formatParams", "beforeRequest", "extendParams", "className", "compacted", "divider", "style", "backgroundColor"];
22
+ var _excluded = ["children", "url", "method", "params", "formatResult", "onSuccess", "onError", "formatParams", "beforeRequest", "extendParams", "className", "compacted", "divider", "style", "backgroundColor", "context"];
23
23
 
24
24
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
25
25
 
@@ -57,6 +57,8 @@ var ProInfoGroup = function ProInfoGroup(props) {
57
57
  style = props.style,
58
58
  _props$backgroundColo = props.backgroundColor,
59
59
  backgroundColor = _props$backgroundColo === void 0 ? '' : _props$backgroundColo,
60
+ _props$context = props.context,
61
+ context = _props$context === void 0 ? {} : _props$context,
60
62
  others = _objectWithoutProperties(props, _excluded);
61
63
 
62
64
  var ref = (0, _react.useRef)();
@@ -82,7 +84,8 @@ var ProInfoGroup = function ProInfoGroup(props) {
82
84
  onError: onError,
83
85
  formatParams: formatParams,
84
86
  beforeRequest: beforeRequest,
85
- extendParams: extendParams
87
+ extendParams: extendParams,
88
+ context: context
86
89
  };
87
90
  var proInfoClassName = (0, _classnames.default)({
88
91
  'teamix-pro-info-group-item': true,
@@ -25,7 +25,7 @@ var _components = require("@alicloudfe/components");
25
25
 
26
26
  var _actions = require("../../../actions");
27
27
 
28
- var _excluded = ["type", "value", "render", "infoItem", "record", "actionRef", "dataSource"];
28
+ var _excluded = ["type", "value", "render", "infoItem", "record", "actionRef", "dataSource", "context"];
29
29
 
30
30
  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); }
31
31
 
@@ -75,6 +75,7 @@ var InfoValueItem = function InfoValueItem(props) {
75
75
  record = props.record,
76
76
  actionRef = props.actionRef,
77
77
  dataSource = props.dataSource,
78
+ context = props.context,
78
79
  others = _objectWithoutProperties(props, _excluded);
79
80
 
80
81
  var dataIndex = infoItem.dataIndex,
@@ -95,7 +96,7 @@ var InfoValueItem = function InfoValueItem(props) {
95
96
 
96
97
  if (typeof render === 'function') {
97
98
  return function () {
98
- render(value, record);
99
+ return render(value, record);
99
100
  };
100
101
  }
101
102
 
@@ -117,9 +118,8 @@ var InfoValueItem = function InfoValueItem(props) {
117
118
  v = _ref2[1];
118
119
 
119
120
  return [k, (0, _utils.getTargetValue)(v, _objectSpread(_objectSpread({}, record), {}, {
120
- record: record,
121
121
  value: value
122
- }))];
122
+ }, context))];
123
123
  }));
124
124
  });
125
125
  }
@@ -158,9 +158,7 @@ var InfoValueItem = function InfoValueItem(props) {
158
158
  style: {
159
159
  marginLeft: '8px'
160
160
  },
161
- context: {
162
- record: record
163
- }
161
+ context: _objectSpread({}, context)
164
162
  });
165
163
  }
166
164
 
@@ -35,7 +35,8 @@ var ProBaseInfo = function ProBaseInfo(props) {
35
35
  result = props.result,
36
36
  actionRef = props.actionRef,
37
37
  layout = props.layout,
38
- size = props.size;
38
+ size = props.size,
39
+ context = props.context;
39
40
 
40
41
  var defaultLayout = _layout.default[(0, _utils.getLayout)((_size$width = size === null || size === void 0 ? void 0 : size.width) !== null && _size$width !== void 0 ? _size$width : 0)]; // 获取列内的布局参数
41
42
 
@@ -90,7 +91,8 @@ var ProBaseInfo = function ProBaseInfo(props) {
90
91
  dataSource: item.dataSource,
91
92
  infoItem: item,
92
93
  record: dataSource !== null && dataSource !== void 0 ? dataSource : result,
93
- actionRef: actionRef
94
+ actionRef: actionRef,
95
+ context: context
94
96
  }),
95
97
  baseInfoLayout: getFormItemLayout((_item$colSpan = item === null || item === void 0 ? void 0 : item.colSpan) !== null && _item$colSpan !== void 0 ? _item$colSpan : 0),
96
98
  tooltip: item.tooltip,
package/lib/info/index.js CHANGED
@@ -41,7 +41,8 @@ Object.keys(_typing).forEach(function (key) {
41
41
  }
42
42
  });
43
43
  });
44
- var _excluded = ["type", "url", "method", "formatResult", "formatParams", "params", "actionRef", "header", "onSuccess", "onError", "beforeRequest", "extendParams", "className", "style", "columns", "layout", "dataSource", "loading", "extra"];
44
+ var _excluded = ["type", "url", "method", "formatResult", "formatParams", "params", "actionRef", "header", "onSuccess", "onError", "beforeRequest", "extendParams", "className", "style", "columns", "layout", "dataSource", "loading", "extra", "context"],
45
+ _excluded2 = ["context"];
45
46
 
46
47
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
47
48
 
@@ -96,6 +97,7 @@ var ProInfo = function ProInfo(props) {
96
97
  dataSource = props.dataSource,
97
98
  userLoading = props.loading,
98
99
  extra = props.extra,
100
+ infoContext = props.context,
99
101
  others = _objectWithoutProperties(props, _excluded);
100
102
 
101
103
  var _useContext = (0, _react.useContext)(_utils.ProInfoGroupContext),
@@ -109,7 +111,9 @@ var ProInfo = function ProInfo(props) {
109
111
  contextOnError = _useContext.onError,
110
112
  contextFormatParams = _useContext.formatParams,
111
113
  contextBeforeRequest = _useContext.beforeRequest,
112
- contextExtendParams = _useContext.extendParams; // 获取容器宽度
114
+ contextExtendParams = _useContext.extendParams,
115
+ _useContext$context = _useContext.context,
116
+ contextContext = _useContext$context === void 0 ? {} : _useContext$context; // 获取容器宽度
113
117
 
114
118
 
115
119
  var ref = (0, _react.useRef)();
@@ -146,7 +150,12 @@ var ProInfo = function ProInfo(props) {
146
150
  } else {
147
151
  setLoading(false);
148
152
  }
149
- }, []); // 获取数据
153
+ }, []);
154
+ var context = (0, _react.useMemo)(function () {
155
+ return _objectSpread(_objectSpread({}, infoContext), {}, {
156
+ record: dataSource !== null && dataSource !== void 0 ? dataSource : data
157
+ }, contextContext);
158
+ }, [dataSource, data]); // 获取数据
150
159
 
151
160
  var request = function request() {
152
161
  setLoading(true);
@@ -179,10 +188,12 @@ var ProInfo = function ProInfo(props) {
179
188
  return extra;
180
189
  }
181
190
 
182
- return _objectSpread(_objectSpread({}, extra), {}, {
183
- context: {
184
- record: dataSource !== null && dataSource !== void 0 ? dataSource : data
185
- }
191
+ var _extra$context = extra.context,
192
+ actionContext = _extra$context === void 0 ? {} : _extra$context,
193
+ others = _objectWithoutProperties(extra, _excluded2);
194
+
195
+ return _objectSpread(_objectSpread({}, others), {}, {
196
+ context: _objectSpread(_objectSpread({}, context), actionContext)
186
197
  });
187
198
  };
188
199
 
@@ -203,7 +214,8 @@ var ProInfo = function ProInfo(props) {
203
214
  loading: userLoading || loading,
204
215
  result: data,
205
216
  actionRef: actionRef,
206
- layout: layout
217
+ layout: layout,
218
+ context: context
207
219
  }), type === 'header' && /*#__PURE__*/_react.default.createElement(_headerInfo.default, {
208
220
  dataSource: dataSource,
209
221
  columns: columns,
@@ -212,7 +224,8 @@ var ProInfo = function ProInfo(props) {
212
224
  result: data,
213
225
  actionRef: actionRef,
214
226
  layout: layout,
215
- size: size
227
+ size: size,
228
+ context: context
216
229
  }), type === 'base' && /*#__PURE__*/_react.default.createElement(_baseInfo.default, {
217
230
  dataSource: dataSource,
218
231
  columns: columns,
@@ -220,7 +233,8 @@ var ProInfo = function ProInfo(props) {
220
233
  result: data,
221
234
  actionRef: actionRef,
222
235
  layout: layout,
223
- size: size
236
+ size: size,
237
+ context: context
224
238
  })));
225
239
  };
226
240
 
@@ -48,6 +48,8 @@ export declare type ProInfoBaseProps = {
48
48
  layout?: ProBaseInfoLayoutProps;
49
49
  /** 加载动画 */
50
50
  loading?: boolean;
51
+ /** 上下文传递 */
52
+ context?: object;
51
53
  } & ProInfoHeaderProps & ProInfoRequestProps;
52
54
  /** ProInfoColumnsProps info 单元格 定义 */
53
55
  export declare type ProInfoItemProps = ProInfoColumnsProps;
@@ -155,6 +157,8 @@ export declare type ProInfoGroupProps = {
155
157
  compacted?: ProCardProps['compacted'];
156
158
  /** 背景颜色 */
157
159
  backgroundColor?: ProCardProps['backgroundColor'];
160
+ /** 上下文 */
161
+ context?: object;
158
162
  } & ProInfoRequestProps & React.HTMLAttributes<HTMLElement>;
159
163
  export declare type TableInfoLayoutProps = {} & ProHeaderInfoLayoutProps;
160
164
  export declare type InfoValueItemProps = {
@@ -163,6 +167,7 @@ export declare type InfoValueItemProps = {
163
167
  actionRef?: React.MutableRefObject<ProInfoActionType | undefined>;
164
168
  render?: ProInfoCellRender;
165
169
  dataSource?: ProFieldDataSourceItem[] | ProInfoCellFunProp;
170
+ context?: object;
166
171
  } & Omit<ProFieldProps, 'render' | 'dataSource'>;
167
172
  export declare type ProInfoHeaderProps = Omit<ProCardProps, 'loading'>;
168
173
  /** ProInfoGroupContextProps */
@@ -174,6 +179,7 @@ export declare type ProInfoGroupContextProps = {
174
179
  width?: number;
175
180
  height?: number;
176
181
  };
182
+ context?: object;
177
183
  } & ProInfoRequestProps;
178
184
  /** 基本透传类型 */
179
185
  export declare type ProInfoTransparentBase = {
@@ -27,6 +27,14 @@ var schema = [{
27
27
  name: 'subTitle',
28
28
  title: '副标题',
29
29
  component: 'Input'
30
+ }, {
31
+ name: 'tooltip',
32
+ title: '介绍信息',
33
+ component: 'Input'
34
+ }, {
35
+ name: 'description',
36
+ title: '描述文字',
37
+ component: 'Input'
30
38
  }, {
31
39
  name: 'extra',
32
40
  title: '额外信息',
@@ -55,10 +63,6 @@ var schema = [{
55
63
  name: 'bordered',
56
64
  title: '边框',
57
65
  component: 'Switch'
58
- }, {
59
- name: 'hoveredShadow',
60
- title: '悬浮阴影',
61
- component: 'Switch'
62
66
  }, {
63
67
  name: 'divider',
64
68
  title: '头部分割线',
@@ -122,7 +122,7 @@ var Layout = function Layout(props) {
122
122
  var renderPanelFilter = function renderPanelFilter() {
123
123
  var _dataFilter$schema2;
124
124
 
125
- if (dataFilter && (dataFilter === null || dataFilter === void 0 ? void 0 : (_dataFilter$schema2 = dataFilter.schema) === null || _dataFilter$schema2 === void 0 ? void 0 : _dataFilter$schema2.length) > 0) {
125
+ if (dataFilter && (dataFilter === null || dataFilter === void 0 ? void 0 : (_dataFilter$schema2 = dataFilter.schema) === null || _dataFilter$schema2 === void 0 ? void 0 : _dataFilter$schema2.length) >= 0) {
126
126
  return /*#__PURE__*/_react.default.createElement("div", {
127
127
  className: cls('panel-filter'),
128
128
  style: {
@@ -95,27 +95,7 @@ var FilterColumnIcon = function FilterColumnIcon(props) {
95
95
 
96
96
  (0, _react.useEffect)(function () {
97
97
  setNewColumns(processColumns(columns));
98
- }, [columns]); // useEffect(() => {
99
- // console.log("这个函数被触发");
100
- // setTimeout(() => {
101
- // setFullscreen(actionRef?.current?.getState?.().fullScreenState ?? false);
102
- // }, 0)
103
- // }, [])
104
- // // 销毁监听函数
105
- // useEffect(() => {
106
- // return () => {
107
- // actionRef.current?.off?.('filterColumnIcon');
108
- // };
109
- // }, []);
110
- // // 监听全屏变化
111
- // actionRef.current?.on?.(
112
- // (state: boolean) => {
113
- // setFullscreen(state);
114
- // },
115
- // 'fullScreenState',
116
- // 'filterColumnIcon',
117
- // );
118
- // 全选
98
+ }, [columns]); // 全选
119
99
 
120
100
  var onChangeAllColumns = function onChangeAllColumns(check) {
121
101
  setAllVisible(check);
@@ -314,9 +294,7 @@ var FilterColumnIcon = function FilterColumnIcon(props) {
314
294
  onOk: onChangeColumnsForDialog,
315
295
  onCancel: dialogOnClose,
316
296
  onClose: dialogOnClose,
317
- style: {
318
- width: '440px'
319
- }
297
+ width: 480
320
298
  }, /*#__PURE__*/_react.default.createElement(Row, {
321
299
  gutter: 20,
322
300
  wrap: true,
@@ -67,8 +67,6 @@
67
67
  }
68
68
  }
69
69
  }
70
-
71
-
72
70
  }
73
71
  .teamix-pro-table-toolbar-filter-column-col {
74
72
  height: 28px;
@@ -78,7 +76,6 @@
78
76
  }
79
77
  }
80
78
 
81
-
82
79
  // fullscreen
83
80
  .teamix-pro-table-full-screen {
84
81
  width: 100vw;
@@ -40,6 +40,8 @@ var _lodash = _interopRequireDefault(require("lodash.debounce"));
40
40
 
41
41
  var _classnames = _interopRequireDefault(require("classnames"));
42
42
 
43
+ var _pageContainer = _interopRequireDefault(require("../page-container"));
44
+
43
45
  var _typing = require("./typing");
44
46
 
45
47
  Object.keys(_typing).forEach(function (key) {
@@ -279,10 +281,10 @@ var ProTable = function ProTable(props) {
279
281
 
280
282
  var dataFilterForm = (0, _react.useMemo)(function () {
281
283
  return (0, _form.createForm)();
282
- }, []); // 获取内容区是否超出一屏(仅支持全家桶)
284
+ }, []); // TODO 获取内容区是否超出一屏(暂时仅支持全家桶)
283
285
 
284
286
  var getFooterSuctionState = function getFooterSuctionState() {
285
- var containerDom = document.querySelector('.teamix-pro-page-container');
287
+ var containerDom = document.querySelector('.teamix-pro-page-container-scroll-container');
286
288
 
287
289
  if (containerDom) {
288
290
  var offsetHeight = containerDom.offsetHeight;
@@ -293,6 +295,11 @@ var ProTable = function ProTable(props) {
293
295
  } else {
294
296
  setFooterSuctionState(false);
295
297
  }
298
+ } else {
299
+ // 非全家桶用户暂时不判断滚动条逻辑
300
+ if (footerSuction) {
301
+ setFooterSuctionState(true);
302
+ }
296
303
  }
297
304
  }; // rowSelection 相关
298
305
 
@@ -408,7 +415,9 @@ var ProTable = function ProTable(props) {
408
415
  return _request(params);
409
416
  },
410
417
  request: function request(params) {
411
- return _request(params);
418
+ if (dataFilterForm.validate()) {
419
+ _request(params);
420
+ }
412
421
  },
413
422
  reset: function reset() {
414
423
  var _actionRef$current, _actionRef$current$se;
@@ -695,7 +704,7 @@ var ProTable = function ProTable(props) {
695
704
  var renderFooterAction = function renderFooterAction() {
696
705
  var _footerAction$actions;
697
706
 
698
- if (_typeof(footerAction) === 'object' && (footerAction === null || footerAction === void 0 ? void 0 : (_footerAction$actions = footerAction.actions) === null || _footerAction$actions === void 0 ? void 0 : _footerAction$actions.length) > 0) {
707
+ if (_typeof(footerAction) === 'object' && (footerAction === null || footerAction === void 0 ? void 0 : (_footerAction$actions = footerAction.actions) === null || _footerAction$actions === void 0 ? void 0 : _footerAction$actions.length) >= 0) {
699
708
  // 默认 context
700
709
  var defaultContext = {
701
710
  action: actionRef.current,
@@ -795,11 +804,11 @@ var ProTable = function ProTable(props) {
795
804
  }, /*#__PURE__*/_react.default.createElement("div", {
796
805
  className: cls({
797
806
  '': true,
798
- fullscreen: fullscreenState,
799
- 'footer-suction': footerSuctionState && footerSuction
807
+ fullscreen: fullscreenState // 'footer-suction': footerSuctionState && footerSuction,
808
+
800
809
  }),
801
810
  ref: tableRef
802
- }, renderTable(), renderFooter()));
811
+ }, renderTable(), footerSuctionState && footerSuction && /*#__PURE__*/_react.default.createElement(_pageContainer.default.FixedFooter, null, renderFooter()), !(footerSuctionState && footerSuction) && renderFooter()));
803
812
  };
804
813
 
805
814
  var _default = ProTable;
@@ -4,7 +4,7 @@
4
4
  import { ColumnProps, TableProps } from '@alicloudfe/components/types/table';
5
5
  import { ProFieldType, ProFieldRenderProps, ProFieldDataSourceItem } from '../field';
6
6
  import { IFilterProps } from '../form';
7
- import { ActionGroupProps, ProActionButtonProps } from '../actions';
7
+ import { ProActionGroupProps, ProActionButtonProps } from '../actions';
8
8
  import { PaginationProps } from '@alicloudfe/components/types/pagination';
9
9
  import { HeaderProps as ProTableHeaderProps } from '@teamix/utils';
10
10
  import { Method } from 'axios';
@@ -50,7 +50,7 @@ export declare type ProTableColumnProps = {
50
50
  /** 表头的过滤菜单宽度 */
51
51
  filtersWidth?: string | number;
52
52
  /** 操作组配置 */
53
- actionSchema?: ActionGroupProps;
53
+ actionSchema?: ProActionGroupProps;
54
54
  /** 指定列对应的字段,支持`a.b`形式的快速取值 和 数组取值 */
55
55
  dataIndex?: string | string[];
56
56
  /** 指定 valueType 为日期时间格式时,可以格式化日期时间 */
@@ -99,7 +99,7 @@ export declare type ProTableProps = {
99
99
  /** 获取内置 rowSelection */
100
100
  getRowSelection?: (rowSelection: rowSelectionType) => void;
101
101
  /** 表格底部(左侧)配置 */
102
- footerAction?: ActionGroupProps | React.ReactNode;
102
+ footerAction?: ProActionGroupProps | React.ReactNode;
103
103
  /** 筛选区自动搜索的防抖时间(毫秒) */
104
104
  filterDebounce?: number;
105
105
  /** ProTable action 的引用,便于手动触发一些方法 */
@@ -211,7 +211,7 @@ export declare type ProTableTopAreaProps = {
211
211
  /** 标题区 */
212
212
  header?: ProTableHeaderProps;
213
213
  /** 主操作区 */
214
- mainAction?: ActionGroupProps | React.ReactNode;
214
+ mainAction?: ProActionGroupProps | React.ReactNode;
215
215
  /** 工具栏区 */
216
216
  toolBar?: boolean | ProTableToolBarItem[];
217
217
  /** 快捷操作区 */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teamix/pro",
3
- "version": "1.2.0",
3
+ "version": "1.2.5",
4
4
  "description": "TeamixPro大包",
5
5
  "repository": "http://gitlab.alibaba-inc.com/teamix/pro",
6
6
  "author": "Velociraptor(迅猛龙)",
@@ -22,9 +22,9 @@
22
22
  ],
23
23
  "private": false,
24
24
  "dependencies": {
25
- "@formily/core": "2.0.2",
26
- "@formily/react": "2.0.2",
27
- "@teamix/formily": "2.0.2",
25
+ "@formily/core": "2.0.4",
26
+ "@formily/react": "2.0.4",
27
+ "@teamix/formily": "2.0.4",
28
28
  "@teamix/hooks": "^0.1.0",
29
29
  "@teamix/pop-confirm": "^1.2.2",
30
30
  "@teamix/pro-field": "^1.0.0",
@@ -32,6 +32,7 @@
32
32
  "@teamix/pro-skeleton": "^1.0.0",
33
33
  "@teamix/svg": "^1.0.11",
34
34
  "@teamix/utils": "^0.1.0",
35
+ "@teamix/result": "^1.0.29",
35
36
  "classnames": "^2.3.1",
36
37
  "lodash.clonedeep": "^4.5.0",
37
38
  "lodash.debounce": "^4.0.8",