@teamias/rex-pro 0.0.17 → 0.1.0

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.
@@ -1,2 +1,5 @@
1
+ import { FC } from 'react';
2
+ import { CardBasicInfoProps } from './v1/card-basic-info';
1
3
  export { CardBasicInfo } from './v1/card-basic-info';
2
4
  export type { CardBasicInfoProps } from './v1/card-basic-info';
5
+ export declare const FakeCardBasicInfo: FC<CardBasicInfoProps>;
@@ -1 +1,6 @@
1
- export { CardBasicInfo } from "./v1/card-basic-info";
1
+ import { Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ export { CardBasicInfo } from "./v1/card-basic-info";
4
+ export var FakeCardBasicInfo = function FakeCardBasicInfo() {
5
+ return /*#__PURE__*/_jsx(_Fragment, {});
6
+ };
@@ -3,7 +3,7 @@ import { CardProps, GetProps } from 'antd';
3
3
  export interface CardBasicInfoProps<T extends object = object> extends Omit<CardProps, 'type'> {
4
4
  /**
5
5
  * 卡片类型
6
- * @default info
6
+ * @default 'info'
7
7
  */
8
8
  type?: 'info' | 'table' | 'descriptions';
9
9
  /**
@@ -23,6 +23,7 @@ export interface CardBasicInfoProps<T extends object = object> extends Omit<Card
23
23
  descriptionsProps?: GetProps<typeof BaseDescriptions>;
24
24
  /** 隐藏卡片样式 */
25
25
  hideCardStyle?: boolean;
26
+ /** 点击事件 */
26
27
  onDataCellClick?: GetProps<typeof DataCell>['onClick'];
27
28
  }
28
29
  export declare function CardBasicInfo<T extends object = object>({ dataSource, col, type, tableProps, rootClassName, hideCardStyle, descriptionsProps, onDataCellClick, ...cardProps }: CardBasicInfoProps<T>): import("react/jsx-runtime").JSX.Element;
@@ -38,7 +38,7 @@ export function CardBasicInfo(_ref) {
38
38
  rootClassName = _ref.rootClassName,
39
39
  hideCardStyle = _ref.hideCardStyle,
40
40
  descriptionsProps = _ref.descriptionsProps,
41
- onDataCellClick = _ref.onDataCellClick,
41
+ _onDataCellClick = _ref.onDataCellClick,
42
42
  cardProps = _objectWithoutProperties(_ref, _excluded);
43
43
  var span = useSpan(dataSource.length, col);
44
44
  var renderNode = function renderNode(node) {
@@ -53,12 +53,20 @@ export function CardBasicInfo(_ref) {
53
53
  return renderNode( /*#__PURE__*/_jsx(_Fragment, {
54
54
  children: function () {
55
55
  if (type === 'table') {
56
- return /*#__PURE__*/_jsx(BaseTable, _objectSpread({}, tableProps));
56
+ return /*#__PURE__*/_jsx(BaseTable, _objectSpread(_objectSpread({}, tableProps), {}, {
57
+ onDataCellClickV2: function onDataCellClickV2(data) {
58
+ _onDataCellClick === null || _onDataCellClick === void 0 || _onDataCellClick(data.item, data.subItem);
59
+ }
60
+ }));
57
61
  }
58
62
  if (type === 'descriptions') {
59
- return /*#__PURE__*/_jsx(BaseDescriptions, _objectSpread({
63
+ return /*#__PURE__*/_jsx(BaseDescriptions, _objectSpread(_objectSpread({
60
64
  column: col
61
- }, descriptionsProps));
65
+ }, descriptionsProps), {}, {
66
+ onDataCellClick: function onDataCellClick(data) {
67
+ _onDataCellClick === null || _onDataCellClick === void 0 || _onDataCellClick(data.cellItem, data.subItem);
68
+ }
69
+ }));
62
70
  }
63
71
  return /*#__PURE__*/_jsx(Row, {
64
72
  gutter: [20, 20],
@@ -72,7 +80,7 @@ export function CardBasicInfo(_ref) {
72
80
  },
73
81
  children: /*#__PURE__*/_jsx(DataCell, {
74
82
  items: item,
75
- onClick: onDataCellClick
83
+ onClick: _onDataCellClick
76
84
  })
77
85
  })
78
86
  }, index);
@@ -15,12 +15,12 @@ export default (function () {
15
15
  valueType: 'input',
16
16
  field: 'input',
17
17
  label: 'input',
18
- defaultValue: 'input'
18
+ initialValue: 'input'
19
19
  }, {
20
20
  valueType: 'select',
21
21
  field: 'select-false',
22
22
  label: 'select-false',
23
- defaultValue: 'light',
23
+ initialValue: 'light',
24
24
  options: [{
25
25
  label: 'Light',
26
26
  value: 'light'
@@ -32,7 +32,7 @@ export default (function () {
32
32
  valueType: 'select',
33
33
  field: 'select',
34
34
  label: 'select',
35
- defaultValue: 'light',
35
+ initialValue: 'light',
36
36
  multiple: true,
37
37
  options: [{
38
38
  label: 'Light',
@@ -46,14 +46,14 @@ export default (function () {
46
46
  field: 'selectDim',
47
47
  label: 'selectDim',
48
48
  api: '/selectData',
49
- defaultParams: {
49
+ params: {
50
50
  a: 1,
51
51
  b: 2
52
52
  }
53
53
  }, {
54
- valueType: 'dateRange',
55
- field: ['dateRange-start', 'dateRange-end'],
56
- label: 'dateRange'
54
+ valueType: 'dateRangeV2',
55
+ field: ['dateRangeV2-start', 'dateRangeV2-end'],
56
+ label: 'dateRangeV2'
57
57
  }, {
58
58
  valueType: 'cascader',
59
59
  field: 'cascader-false',
@@ -84,7 +84,7 @@ export default (function () {
84
84
  valueType: 'checkbox',
85
85
  field: 'checkbox',
86
86
  label: 'checkbox',
87
- defaultValue: true
87
+ initialValue: true
88
88
  }, {
89
89
  valueType: 'checkboxGroup',
90
90
  field: 'checkboxGroup',
@@ -100,7 +100,7 @@ export default (function () {
100
100
  valueType: 'radioGroup',
101
101
  field: 'radioGroup',
102
102
  label: 'radioGroup',
103
- defaultValue: 'light',
103
+ initialValue: 'light',
104
104
  options: [{
105
105
  label: 'Light',
106
106
  value: 'light'
@@ -112,17 +112,17 @@ export default (function () {
112
112
  valueType: 'inputNumber',
113
113
  field: 'inputNumber',
114
114
  label: 'inputNumber',
115
- defaultValue: 2
115
+ initialValue: 2
116
116
  }, {
117
- valueType: 'inputNumberRange',
118
- field: ['inputNumberRange-min', 'inputNumberRange-max'],
119
- label: 'inputNumberRange',
120
- defaultValue: [2, 5]
117
+ valueType: 'inputNumberRangeV2',
118
+ field: ['inputNumberRangeV2-min', 'inputNumberRangeV2-max'],
119
+ label: 'inputNumberRangeV2',
120
+ initialValue: [2, 5]
121
121
  }, {
122
122
  valueType: 'textArea',
123
123
  field: 'textArea',
124
124
  label: 'textArea',
125
- defaultValue: 'qweqwe'
125
+ initialValue: 'qweqwe'
126
126
  }, {
127
127
  valueType: 'switch',
128
128
  field: 'switch',
@@ -131,7 +131,7 @@ export default (function () {
131
131
  valueType: 'datePicker',
132
132
  field: 'datePicker',
133
133
  label: 'datePicker',
134
- defaultValue: '2025-05-05'
134
+ initialValue: '2025-05-05'
135
135
  }]);
136
136
  case 1:
137
137
  case "end":
@@ -59,7 +59,7 @@ export default (function () {
59
59
  subItems: [{
60
60
  valueType: 'select',
61
61
  field: 'avg_cost',
62
- defaultValue: 'avg_cost',
62
+ initialValue: 'avg_cost',
63
63
  fieldProps: {
64
64
  allowClear: false,
65
65
  popupMatchSelectWidth: false,
@@ -72,9 +72,8 @@ export default (function () {
72
72
  }]
73
73
  }, {
74
74
  field: ['avg_cost_min', 'avg_cost_max'],
75
- valueType: 'inputNumberRange',
76
- itemWidth: '150px',
77
- fieldProps: []
75
+ valueType: 'inputNumberRangeV2',
76
+ itemWidth: '150px'
78
77
  }]
79
78
  }, {
80
79
  label: '重量区间',
@@ -83,14 +82,14 @@ export default (function () {
83
82
  subItems: [{
84
83
  valueType: 'select',
85
84
  field: 'weight_gram',
86
- defaultValue: 'weight_gram',
85
+ initialValue: 'weight_gram',
87
86
  options: [{
88
87
  label: '重量区间',
89
88
  value: 'weight_gram'
90
89
  }]
91
90
  }, {
92
91
  field: ['weight_gram_min', 'weight_gram_max'],
93
- valueType: 'inputNumberRange'
92
+ valueType: 'inputNumberRangeV2'
94
93
  }]
95
94
  }, {
96
95
  label: 'DMS区间',
@@ -99,7 +98,7 @@ export default (function () {
99
98
  subItems: [{
100
99
  valueType: 'select',
101
100
  field: 'dms',
102
- defaultValue: 'dms',
101
+ initialValue: 'dms',
103
102
  itemWidth: 'auto',
104
103
  fieldProps: {
105
104
  allowClear: false
@@ -110,7 +109,7 @@ export default (function () {
110
109
  }]
111
110
  }, {
112
111
  field: ['dms_min', 'dms_max'],
113
- valueType: 'inputNumberRange',
112
+ valueType: 'inputNumberRangeV2',
114
113
  formItemProps: {
115
114
  style: {
116
115
  flex: 1
@@ -124,7 +123,7 @@ export default (function () {
124
123
  subItems: [{
125
124
  valueType: 'select',
126
125
  field: 'goods_stock',
127
- defaultValue: 'goods_stock',
126
+ initialValue: 'goods_stock',
128
127
  itemWidth: 'auto',
129
128
  fieldProps: {
130
129
  allowClear: false
@@ -135,7 +134,7 @@ export default (function () {
135
134
  }]
136
135
  }, {
137
136
  field: ['goods_stock_min', 'goods_stock_max'],
138
- valueType: 'inputNumberRange',
137
+ valueType: 'inputNumberRangeV2',
139
138
  formItemProps: {
140
139
  style: {
141
140
  flex: 1
@@ -149,7 +148,7 @@ export default (function () {
149
148
  subItems: [{
150
149
  valueType: 'select',
151
150
  field: 'usable_stock',
152
- defaultValue: 'usable_stock',
151
+ initialValue: 'usable_stock',
153
152
  itemWidth: 'auto',
154
153
  fieldProps: {
155
154
  allowClear: false
@@ -160,7 +159,7 @@ export default (function () {
160
159
  }]
161
160
  }, {
162
161
  field: ['usable_stock_min', 'usable_stock_max'],
163
- valueType: 'inputNumberRange',
162
+ valueType: 'inputNumberRangeV2',
164
163
  formItemProps: {
165
164
  style: {
166
165
  flex: 1
@@ -174,7 +173,7 @@ export default (function () {
174
173
  subItems: [{
175
174
  valueType: 'select',
176
175
  field: 'goods_lack',
177
- defaultValue: 'goods_lack',
176
+ initialValue: 'goods_lack',
178
177
  itemWidth: 'auto',
179
178
  fieldProps: {
180
179
  allowClear: false
@@ -185,7 +184,7 @@ export default (function () {
185
184
  }]
186
185
  }, {
187
186
  field: ['goods_lack_min', 'goods_lack_max'],
188
- valueType: 'inputNumberRange',
187
+ valueType: 'inputNumberRangeV2',
189
188
  formItemProps: {
190
189
  style: {
191
190
  flex: 1
@@ -210,7 +209,7 @@ export default (function () {
210
209
  subItems: [{
211
210
  valueType: 'select',
212
211
  field: 'sort_key',
213
- defaultValue: 'default',
212
+ initialValue: 'default',
214
213
  itemWidth: '100px',
215
214
  options: [{
216
215
  label: '默认排序',
@@ -237,7 +236,7 @@ export default (function () {
237
236
  }, {
238
237
  valueType: 'select',
239
238
  field: 'sort_val',
240
- defaultValue: 'desc',
239
+ initialValue: 'desc',
241
240
  itemWidth: '100px',
242
241
  options: [{
243
242
  label: '正序',
@@ -252,7 +251,7 @@ export default (function () {
252
251
  compact: true,
253
252
  subItems: [{
254
253
  valueType: 'select',
255
- defaultValue: 'keywords',
254
+ initialValue: 'keywords',
256
255
  field: 'keyword_type',
257
256
  itemWidth: 'auto',
258
257
  options: [{
@@ -294,7 +293,7 @@ export default (function () {
294
293
  compact: true,
295
294
  subItems: [{
296
295
  valueType: 'select',
297
- defaultValue: 'spu_completetime1111111',
296
+ initialValue: 'spu_completetime1111111',
298
297
  field: 'time_type1111111',
299
298
  itemWidth: 'auto',
300
299
  fieldProps: {
@@ -305,10 +304,10 @@ export default (function () {
305
304
  value: 'spu_completetime1111111'
306
305
  }]
307
306
  }, {
308
- valueType: 'dateRange',
307
+ valueType: 'dateRangeV2',
309
308
  field: ['time_start1111111', 'time_end111111'],
310
309
  itemWidth: '240px',
311
- defaultValue: -14
310
+ initialValue: -14
312
311
  }]
313
312
  }];
314
313
  return /*#__PURE__*/_jsx(BaseForm, _objectSpread(_objectSpread({}, baseProps), {}, {
@@ -18,9 +18,8 @@ export default (function () {
18
18
  case 0:
19
19
  return _context.abrupt("return", [{
20
20
  field: ['avg_cost_min', 'avg_cost_max'],
21
- valueType: 'inputNumberRange',
21
+ valueType: 'inputNumberRangeV2',
22
22
  itemWidth: '350px',
23
- fieldProps: [],
24
23
  label: '平均成本区间',
25
24
  isCustom: true
26
25
  }, {
@@ -70,7 +69,7 @@ export default (function () {
70
69
  subItems: [{
71
70
  valueType: 'select',
72
71
  field: 'avg_cost',
73
- defaultValue: 'avg_cost',
72
+ initialValue: 'avg_cost',
74
73
  fieldProps: {
75
74
  allowClear: false,
76
75
  popupMatchSelectWidth: false,
@@ -83,9 +82,8 @@ export default (function () {
83
82
  }]
84
83
  }, {
85
84
  field: ['avg_cost_min', 'avg_cost_max'],
86
- valueType: 'inputNumberRange',
87
- itemWidth: '150px',
88
- fieldProps: []
85
+ valueType: 'inputNumberRangeV2',
86
+ itemWidth: '150px'
89
87
  }]
90
88
  }, {
91
89
  label: '重量区间',
@@ -96,14 +94,14 @@ export default (function () {
96
94
  subItems: [{
97
95
  valueType: 'select',
98
96
  field: 'weight_gram',
99
- defaultValue: 'weight_gram',
97
+ initialValue: 'weight_gram',
100
98
  options: [{
101
99
  label: '重量区间',
102
100
  value: 'weight_gram'
103
101
  }]
104
102
  }, {
105
103
  field: ['weight_gram_min', 'weight_gram_max'],
106
- valueType: 'inputNumberRange'
104
+ valueType: 'inputNumberRangeV2'
107
105
  }]
108
106
  }, {
109
107
  label: 'DMS区间',
@@ -114,7 +112,7 @@ export default (function () {
114
112
  subItems: [{
115
113
  valueType: 'select',
116
114
  field: 'dms',
117
- defaultValue: 'dms',
115
+ initialValue: 'dms',
118
116
  itemWidth: 'auto',
119
117
  fieldProps: {
120
118
  allowClear: false
@@ -125,7 +123,7 @@ export default (function () {
125
123
  }]
126
124
  }, {
127
125
  field: ['dms_min', 'dms_max'],
128
- valueType: 'inputNumberRange',
126
+ valueType: 'inputNumberRangeV2',
129
127
  formItemProps: {
130
128
  style: {
131
129
  flex: 1
@@ -141,7 +139,7 @@ export default (function () {
141
139
  subItems: [{
142
140
  valueType: 'select',
143
141
  field: 'goods_stock',
144
- defaultValue: 'goods_stock',
142
+ initialValue: 'goods_stock',
145
143
  itemWidth: 'auto',
146
144
  fieldProps: {
147
145
  allowClear: false
@@ -152,7 +150,7 @@ export default (function () {
152
150
  }]
153
151
  }, {
154
152
  field: ['goods_stock_min', 'goods_stock_max'],
155
- valueType: 'inputNumberRange',
153
+ valueType: 'inputNumberRangeV2',
156
154
  isCustom: true,
157
155
  formItemProps: {
158
156
  style: {
@@ -169,7 +167,7 @@ export default (function () {
169
167
  subItems: [{
170
168
  valueType: 'select',
171
169
  field: 'usable_stock',
172
- defaultValue: 'usable_stock',
170
+ initialValue: 'usable_stock',
173
171
  itemWidth: 'auto',
174
172
  fieldProps: {
175
173
  allowClear: false
@@ -180,7 +178,7 @@ export default (function () {
180
178
  }]
181
179
  }, {
182
180
  field: ['usable_stock_min', 'usable_stock_max'],
183
- valueType: 'inputNumberRange',
181
+ valueType: 'inputNumberRangeV2',
184
182
  formItemProps: {
185
183
  style: {
186
184
  flex: 1
@@ -195,7 +193,7 @@ export default (function () {
195
193
  subItems: [{
196
194
  valueType: 'select',
197
195
  field: 'goods_lack',
198
- defaultValue: 'goods_lack',
196
+ initialValue: 'goods_lack',
199
197
  itemWidth: 'auto',
200
198
  fieldProps: {
201
199
  allowClear: false
@@ -206,7 +204,7 @@ export default (function () {
206
204
  }]
207
205
  }, {
208
206
  field: ['goods_lack_min', 'goods_lack_max'],
209
- valueType: 'inputNumberRange',
207
+ valueType: 'inputNumberRangeV2',
210
208
  formItemProps: {
211
209
  style: {
212
210
  flex: 1
@@ -231,7 +229,7 @@ export default (function () {
231
229
  subItems: [{
232
230
  valueType: 'select',
233
231
  field: 'sort_key',
234
- defaultValue: 'default',
232
+ initialValue: 'default',
235
233
  itemWidth: '100px',
236
234
  options: [{
237
235
  label: '默认排序',
@@ -258,7 +256,7 @@ export default (function () {
258
256
  }, {
259
257
  valueType: 'select',
260
258
  field: 'sort_val',
261
- defaultValue: 'desc',
259
+ initialValue: 'desc',
262
260
  itemWidth: '100px',
263
261
  options: [{
264
262
  label: '正序',
@@ -273,7 +271,7 @@ export default (function () {
273
271
  compact: true,
274
272
  subItems: [{
275
273
  valueType: 'select',
276
- defaultValue: 'keywords',
274
+ initialValue: 'keywords',
277
275
  field: 'keyword_type',
278
276
  itemWidth: 'auto',
279
277
  options: [{
@@ -315,7 +313,7 @@ export default (function () {
315
313
  compact: true,
316
314
  subItems: [{
317
315
  valueType: 'select',
318
- defaultValue: 'spu_completetime1111111',
316
+ initialValue: 'spu_completetime1111111',
319
317
  field: 'time_type1111111',
320
318
  itemWidth: 'auto',
321
319
  fieldProps: {
@@ -326,10 +324,10 @@ export default (function () {
326
324
  value: 'spu_completetime1111111'
327
325
  }]
328
326
  }, {
329
- valueType: 'dateRange',
327
+ valueType: 'dateRangeV2',
330
328
  field: ['time_start1111111', 'time_end111111'],
331
329
  itemWidth: '240px',
332
- defaultValue: -14
330
+ initialValue: -14
333
331
  }]
334
332
  }];
335
333
  return /*#__PURE__*/_jsx(BaseForm, _objectSpread(_objectSpread({}, baseProps), {}, {
@@ -34,7 +34,7 @@ export interface IFilterFormProps<T extends object = object> extends Omit<TRawPr
34
34
  /**
35
35
  * - auto 自适应
36
36
  * - average 平均
37
- * @default auto
37
+ * @default 'auto'
38
38
  */
39
39
  displayType?: 'average' | 'auto';
40
40
  /** 自定义节点 */
@@ -1,3 +1,3 @@
1
1
  import { createGlobalStyle } from 'styled-components';
2
2
  export var FilterFormStyle = createGlobalStyle([".pro-rex-filter-form-root-box{width:100%;overflow-x:hidden;}.pro-rex-filter-form{container-type:inline-size;container-name:form-container;margin-left:-5px;margin-right:-5px;row-gap:10px;}.pro-rex-filter-form>.ant-form-item{margin:0;padding-inline:5px;}.pro-rex-filter-form .ant-form-item-control{width:0;}.ant-form-item{margin-inline-end:0 !important;}.pro-rex-filter-form .ant-picker{width:100%;}.pro-rex-filter-button-group{display:inline-flex;gap:10px;justify-content:end;flex:1 !important;}.base-form-field-multiple-group .base-form-item{min-width:initial !important;width:initial;margin:0;}@container form-container (min-width:1700px){.ant-form > .ant-form-item{width:16.666% !important;}}@container form-container (max-width:1200px){.ant-form > .ant-form-item{width:25% !important;}}@container form-container (max-width:1000px){.ant-form > .ant-form-item{width:33.33% !important;}}@container form-container (max-width:700px){.ant-form > .ant-form-item{width:50% !important;}}@container form-container (max-width:500px){.ant-form > .ant-form-item{width:100% !important;}}"]);
3
- export var FilterFormAutoWidthStyle = createGlobalStyle([".pro-rex-filter-form-root-box{width:100%;overflow-x:hidden;.pro-rex-filter-form{gap:10px;>.ant-form-item{margin:0;}.pro-rex-filter-button-group{display:inline-flex;gap:10px;justify-content:end;}.base-form-field-multiple-group > .base-form-item{margin:0;width:100%;}.base-form-item{min-width:initial !important;width:var(--item-width,initial);}.ant-select{min-width:initial !important;width:100%;}.ant-input-number{max-width:100px;width:100%;}.base-form-item .ant-form-item{margin-inline-end:0;}.base-form-field-multiple-group .base-form-item{min-width:initial !important;width:var(--item-width,initial) !important;}.ant-picker{width:100%;}.ant-select-multiple .ant-select-selection-placeholder{position:relative;top:initial;padding-inline-end:18px;transform:initial;transition:none;pointer-events:none;display:block;line-height:28px;transition:all 0.3s,visibility 0s;align-self:center;}.ant-select-multiple .ant-select-selection-overflow-item{position:relative !important;}.ant-select-multiple .ant-select-selection-overflow:has(+.ant-select-selection-placeholder){position:absolute;}}}"]);
3
+ export var FilterFormAutoWidthStyle = createGlobalStyle([".pro-rex-filter-form-root-box{width:100%;overflow-x:hidden;.pro-rex-filter-form{gap:10px;>.ant-form-item{margin:0;}.pro-rex-filter-button-group{display:inline-flex;gap:10px;justify-content:end;}.base-form-field-multiple-group > .base-form-item{margin:0;width:100%;}.base-form-item{min-width:initial !important;width:var(--item-width,initial);}.ant-select{min-width:initial !important;width:100%;}.ant-input-number{max-width:100px;width:100%;}.base-form-item .ant-form-item{margin-inline-end:0;}.base-form-field-multiple-group .base-form-item{min-width:initial !important;width:var(--item-width,initial) !important;}.ant-picker{width:100%;}.ant-select-multiple .ant-select-selection-placeholder{position:relative;top:initial;padding-inline-end:18px;transform:initial;transition:none;pointer-events:none;display:block;line-height:28px;transition:all 0.3s,visibility 0s;align-self:center;}.ant-select-multiple .ant-select-selection-overflow-item{position:relative !important;}.ant-select-multiple .ant-select-selection-overflow:has(+.ant-select-selection-placeholder){position:absolute;}.ant-select-multiple .ant-select-content-item{height:auto !important;}.ant-select-multiple .ant-select-content-item>.ant-select-placeholder{position:initial !important;padding-left:4px !important;width:auto !important;transform:none !important;}}}"]);
@@ -138,8 +138,8 @@ export default (function () {
138
138
  label: 'inputNumber'
139
139
  }, {
140
140
  field: ['inputNumberRange1', 'inputNumberRange2'],
141
- valueType: 'inputNumberRange',
142
- label: 'inputNumberRange',
141
+ valueType: 'inputNumberRangeV2',
142
+ label: 'inputNumberRangeV2',
143
143
  rules: [{
144
144
  required: true,
145
145
  message: '请选择范围'
@@ -1,2 +1,12 @@
1
+ import { FC } from 'react';
2
+ import { IRexProTableProps } from './v1/types';
1
3
  export { RexProTable } from './v1/rex-pro-table';
2
4
  export type * from './v1/types';
5
+ export declare const FakeRexProTable: FC<Omit<IRexProTableProps, 'filterFormProps' | 'tableProps' | 'listTableProps'> & {
6
+ /** 继承自 FilterForm */
7
+ filterFormProps?: any;
8
+ /** 继承自 BaseTable */
9
+ tableProps?: any;
10
+ /** 继承自 BaseListTable */
11
+ listTableProps?: any;
12
+ }>;
@@ -1 +1,6 @@
1
- export { RexProTable } from "./v1/rex-pro-table";
1
+ import { Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ export { RexProTable } from "./v1/rex-pro-table";
4
+ export var FakeRexProTable = function FakeRexProTable() {
5
+ return /*#__PURE__*/_jsx(_Fragment, {});
6
+ };
@@ -650,9 +650,9 @@ export default (function () {
650
650
  label: 'inputNumber',
651
651
  defaultValue: 2
652
652
  }, {
653
- valueType: 'inputNumberRange',
654
- field: ['inputNumberRange-min', 'inputNumberRange-max'],
655
- label: 'inputNumberRange',
653
+ valueType: 'inputNumberRangeV2',
654
+ field: ['inputNumberRangeV2-min', 'inputNumberRangeV2-max'],
655
+ label: 'inputNumberRangeV2',
656
656
  defaultValue: [2, 5]
657
657
  }, {
658
658
  valueType: 'textArea',
@@ -4,19 +4,14 @@ import { Button, DrawerProps, DropDownProps, FormInstance, GetProps, ModalProps
4
4
  import { SizeType } from 'antd/es/config-provider/SizeContext';
5
5
  import { MutableRefObject, ReactNode } from 'react';
6
6
  /** 组件props */
7
- export interface IRexProTableProps<TF extends Record<string, unknown>, TT extends Record<string, unknown>> {
7
+ export interface IRexProTableProps<TF extends Record<string, unknown> = Record<string, unknown>, TT extends Record<string, unknown> = Record<string, unknown>> {
8
+ /** 工具栏 */
8
9
  toolbar?: {
9
10
  /** 批量操作按钮 */
10
11
  batchActionProps?: Omit<IActionButtonsProps<TF>, 'proTableRef'>;
11
12
  /** 自定选择 */
12
13
  render?: (batchActionNode: ReactNode) => ReactNode;
13
14
  };
14
- /** 搜索表单 filter props */
15
- filterFormProps?: Exclude<GetProps<typeof FilterForm<TF>>, 'loading' | 'form' | 'onReset' | 'onFinish' | 'onInit'>;
16
- /** table props */
17
- tableProps?: Exclude<GetProps<typeof BaseTable<TT>>, 'loading' | 'dataSource' | 'pagination' | 'extraColumns'>;
18
- /** list-table props */
19
- listTableProps?: Omit<GetProps<typeof BaseListTable<TT>>, 'loading' | 'headerRender' | 'pagination' | 'extraColumns'>;
20
15
  /** 请求列表数据 */
21
16
  request: (params: TRexProTableRequestParams<TF>) => Promise<TRexProTableRequestResult<TT>>;
22
17
  /**
@@ -29,6 +24,10 @@ export interface IRexProTableProps<TF extends Record<string, unknown>, TT extend
29
24
  * @default false
30
25
  */
31
26
  autoInitRequest?: boolean;
27
+ /** 隐藏分页 */
28
+ hidePagination?: boolean;
29
+ /** proTable 操作对象 */
30
+ proTableRef?: MutableRefObject<IRexProTableRef<TF> | undefined>;
32
31
  /** 操作列配置 */
33
32
  actionConfig?: {
34
33
  /** 自定义渲染 */
@@ -40,10 +39,13 @@ export interface IRexProTableProps<TF extends Record<string, unknown>, TT extend
40
39
  /** 列配置 */
41
40
  columnConfig?: Omit<Exclude<GetProps<typeof BaseTable<TT>>['columns'], undefined>[number], 'render'>;
42
41
  };
43
- /** proTable 操作对象 */
44
- proTableRef?: MutableRefObject<IRexProTableRef<TF> | undefined>;
45
- /** 隐藏分页 */
46
- hidePagination?: boolean;
42
+ /** 导出功能配置 */
43
+ /** 搜索表单 filter props */
44
+ filterFormProps?: Exclude<GetProps<typeof FilterForm<TF>>, 'loading' | 'form' | 'onReset' | 'onFinish' | 'onInit'>;
45
+ /** table props */
46
+ tableProps?: Exclude<GetProps<typeof BaseTable<TT>>, 'loading' | 'dataSource' | 'pagination' | 'extraColumns'>;
47
+ /** list-table props */
48
+ listTableProps?: Omit<GetProps<typeof BaseListTable<TT>>, 'loading' | 'headerRender' | 'pagination' | 'extraColumns'>;
47
49
  }
48
50
  export interface IRexProTableRef<TF extends Record<string, unknown>> {
49
51
  /** 主动查询 */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teamias/rex-pro",
3
- "version": "0.0.17",
3
+ "version": "0.1.0",
4
4
  "description": "A react library developed with dumi",
5
5
  "license": "MIT",
6
6
  "module": "dist/index.js",
@@ -49,15 +49,17 @@
49
49
  ]
50
50
  },
51
51
  "dependencies": {
52
- "@ant-design/icons": "^6.0.0",
52
+ "@ant-design/icons": "^6.1.0",
53
53
  "@ant-design/pro-components": "^2.8.10",
54
- "@teamias/rex-design": "^0.0.37",
55
- "ahooks": "^3.9.0",
54
+ "@teamias/rex-design": "^0.1.3",
55
+ "ahooks": "^3.9.6",
56
56
  "antd": "^5.26.7",
57
57
  "classnames": "^2.5.1",
58
- "dayjs": "^1.11.13",
58
+ "dayjs": "^1.11.19",
59
59
  "lodash": "^4.17.21",
60
60
  "radash": "^12.1.1",
61
+ "react": "^18.3.1",
62
+ "react-dom": "^18.3.1",
61
63
  "react-intl": "^7.1.11",
62
64
  "react-router": "6",
63
65
  "styled-components": "^6.1.19"
@@ -66,22 +68,20 @@
66
68
  "@changesets/cli": "^2.29.5",
67
69
  "@commitlint/cli": "^17.1.2",
68
70
  "@commitlint/config-conventional": "^17.1.0",
69
- "@teamias/umi-loader-source-plugin": "^0.0.6",
71
+ "@teamias/umi-loader-source-plugin": "^0.0.11",
70
72
  "@teamias/umi-plugin-upload-build": "^0.0.2",
71
- "@types/lodash": "^4.17.20",
72
- "@types/react": "^18.0.0",
73
- "@types/react-dom": "^18.0.0",
73
+ "@types/lodash": "^4.17.21",
74
+ "@types/react": "^18.3.27",
75
+ "@types/react-dom": "^18.3.7",
74
76
  "@umijs/lint": "^4.0.0",
75
77
  "dumi": "^2.4.13",
76
- "eslint": "^8.23.0",
78
+ "eslint": "^8.57.1",
77
79
  "father": "^4.1.0",
78
- "husky": "^8.0.1",
79
- "lint-staged": "^13.0.3",
80
- "prettier": "^2.7.1",
81
- "prettier-plugin-organize-imports": "^3.0.0",
82
- "prettier-plugin-packagejson": "^2.2.18",
83
- "react": "^18.0.0",
84
- "react-dom": "^18.0.0",
80
+ "husky": "^8.0.3",
81
+ "lint-staged": "^13.3.0",
82
+ "prettier": "^3.7.4",
83
+ "prettier-plugin-organize-imports": "^4.3.0",
84
+ "prettier-plugin-packagejson": "^2.5.20",
85
85
  "stylelint": "^14.9.1"
86
86
  },
87
87
  "peerDependencies": {