fan-standard-comp 4.1.1 → 4.1.2
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/fan-standard-comp.min.css +1 -1
- package/dist/fan-standard-comp.min.js +1 -1
- package/es/ButtonGroup/index.d.ts +1 -0
- package/es/ButtonGroup/styles/index.js +3 -1
- package/es/FormComp/FieldComponent/ExtensionField.d.ts +3 -0
- package/es/FormComp/FieldComponent/ExtensionField.js +18 -0
- package/es/FormComp/FieldComponent/index.d.ts +10 -1
- package/es/FormComp/FieldComponent/index.js +123 -56
- package/es/FormComp/RenderItemGroup/index.js +25 -8
- package/es/NavLeafScroll/Main.js +2 -2
- package/es/StandardDragModal/ChangeStandardModal.js +1 -1
- package/es/StandardFilter/index.js +12 -9
- package/es/StandardFilter/style/FilterStyle.js +13 -4
- package/es/StandardFilter/style/index.less +9 -2
- package/es/StandardForm/StepForm.js +1 -1
- package/es/StandardModal/index.js +1 -1
- package/es/StandardTable/index.d.ts +3 -2
- package/es/StandardTable/index.js +15 -8
- package/es/StandardTable/style/index.js +5 -0
- package/es/StandardTablePro/index.d.ts +9 -0
- package/es/StandardTablePro/index.js +147 -0
- package/es/StandardTablePro/style/index.d.ts +6 -0
- package/es/StandardTablePro/style/index.js +28 -0
- package/es/data/general.config.d.ts +32 -0
- package/es/data/general.config.js +34 -1
- package/es/utils/ValueFormat.js +3 -3
- package/es/utils/index.d.ts +9 -0
- package/es/utils/index.js +46 -1
- package/es/utils/regExp.d.ts +3 -1
- package/es/utils/regExp.js +12 -1
- package/es/utils/response.js +2 -2
- package/lib/ButtonGroup/index.d.ts +1 -0
- package/lib/ButtonGroup/styles/index.js +3 -1
- package/lib/FormComp/FieldComponent/ExtensionField.d.ts +3 -0
- package/lib/FormComp/FieldComponent/ExtensionField.js +27 -0
- package/lib/FormComp/FieldComponent/index.d.ts +10 -1
- package/lib/FormComp/FieldComponent/index.js +122 -56
- package/lib/FormComp/RenderItemGroup/index.js +25 -8
- package/lib/NavLeafScroll/Main.js +2 -2
- package/lib/StandardDragModal/ChangeStandardModal.js +1 -1
- package/lib/StandardFilter/index.js +12 -9
- package/lib/StandardFilter/style/FilterStyle.js +13 -4
- package/lib/StandardFilter/style/index.less +9 -2
- package/lib/StandardForm/StepForm.js +1 -1
- package/lib/StandardModal/index.js +1 -1
- package/lib/StandardTable/index.d.ts +3 -2
- package/lib/StandardTable/index.js +15 -8
- package/lib/StandardTable/style/index.js +5 -0
- package/lib/StandardTablePro/index.d.ts +9 -0
- package/lib/StandardTablePro/index.js +155 -0
- package/lib/StandardTablePro/style/index.d.ts +6 -0
- package/lib/StandardTablePro/style/index.js +34 -0
- package/lib/data/general.config.d.ts +32 -0
- package/lib/data/general.config.js +34 -1
- package/lib/utils/ValueFormat.js +3 -3
- package/lib/utils/index.d.ts +9 -0
- package/lib/utils/index.js +49 -3
- package/lib/utils/regExp.d.ts +3 -1
- package/lib/utils/regExp.js +12 -1
- package/lib/utils/response.js +2 -2
- package/package.json +2 -2
|
@@ -12,6 +12,7 @@ var _RefactorTreeSelect = _interopRequireDefault(require("./RefactorTreeSelect")
|
|
|
12
12
|
var _setReadonlyValues = require("./setReadonlyValues");
|
|
13
13
|
var _TitleNode = _interopRequireDefault(require("./TitleNode"));
|
|
14
14
|
var _ReUpload = _interopRequireDefault(require("./ReUpload"));
|
|
15
|
+
var _ExtensionField = _interopRequireDefault(require("./ExtensionField"));
|
|
15
16
|
var _ConfigContext = require("../../ConfigContext");
|
|
16
17
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
18
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
@@ -30,42 +31,50 @@ var TextArea = _antd.Input.TextArea,
|
|
|
30
31
|
var Option = _antd.Select.Option;
|
|
31
32
|
var RangePicker = _antd.DatePicker.RangePicker;
|
|
32
33
|
// 表单组件类型
|
|
34
|
+
// @ts-ignore
|
|
33
35
|
var FieldComponent = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
|
|
34
|
-
var
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
36
|
+
var InitFanContext = (0, _react.useContext)(_ConfigContext.FanContext);
|
|
37
|
+
var providerConfig = InitFanContext['Field'] || {}; // 使用上下文(全局配置)设置扩展的配置项
|
|
38
|
+
var _providerConfig$props = _objectSpread(_objectSpread({}, providerConfig), props),
|
|
39
|
+
type = _providerConfig$props.type,
|
|
40
|
+
_onChange = _providerConfig$props.onChange,
|
|
41
|
+
value = _providerConfig$props.value,
|
|
42
|
+
style = _providerConfig$props.style,
|
|
43
|
+
placeholder = _providerConfig$props.placeholder,
|
|
44
|
+
protoConfig = _providerConfig$props.protoConfig,
|
|
45
|
+
_providerConfig$props2 = _providerConfig$props.treeData,
|
|
46
|
+
treeData = _providerConfig$props2 === void 0 ? [] : _providerConfig$props2,
|
|
47
|
+
filedName = _providerConfig$props.filedName,
|
|
48
|
+
fieldName = _providerConfig$props.fieldName,
|
|
49
|
+
_providerConfig$props3 = _providerConfig$props.selectOptionName,
|
|
50
|
+
selectOptionName = _providerConfig$props3 === void 0 ? {
|
|
45
51
|
value: 'value',
|
|
46
52
|
label: 'label',
|
|
47
53
|
disabled: 'disabled',
|
|
48
54
|
title: 'title'
|
|
49
|
-
} :
|
|
50
|
-
|
|
51
|
-
treeOptionName =
|
|
55
|
+
} : _providerConfig$props3,
|
|
56
|
+
_providerConfig$props4 = _providerConfig$props.treeOptionName,
|
|
57
|
+
treeOptionName = _providerConfig$props4 === void 0 ? {
|
|
52
58
|
title: 'title',
|
|
53
59
|
value: 'value',
|
|
54
60
|
children: 'children',
|
|
55
61
|
disabled: 'disabled'
|
|
56
|
-
} :
|
|
57
|
-
|
|
58
|
-
fieldStatus =
|
|
59
|
-
|
|
60
|
-
size =
|
|
61
|
-
showFullLevel = props.showFullLevel,
|
|
62
|
-
separator = props.separator,
|
|
63
|
-
disabledFields = props.disabledFields,
|
|
64
|
-
selectOptionRender = props.selectOptionRender,
|
|
65
|
-
render = props.render
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
62
|
+
} : _providerConfig$props4,
|
|
63
|
+
_providerConfig$props5 = _providerConfig$props.fieldStatus,
|
|
64
|
+
fieldStatus = _providerConfig$props5 === void 0 ? 'default' : _providerConfig$props5,
|
|
65
|
+
_providerConfig$props6 = _providerConfig$props.size,
|
|
66
|
+
size = _providerConfig$props6 === void 0 ? 'middle' : _providerConfig$props6,
|
|
67
|
+
showFullLevel = _providerConfig$props.showFullLevel,
|
|
68
|
+
separator = _providerConfig$props.separator,
|
|
69
|
+
disabledFields = _providerConfig$props.disabledFields,
|
|
70
|
+
selectOptionRender = _providerConfig$props.selectOptionRender,
|
|
71
|
+
render = _providerConfig$props.render,
|
|
72
|
+
_providerConfig$props7 = _providerConfig$props.defaultStyle,
|
|
73
|
+
defaultStyle = _providerConfig$props7 === void 0 ? {} : _providerConfig$props7,
|
|
74
|
+
extendConfig = _providerConfig$props.extendConfig;
|
|
75
|
+
var _providerConfig$props8 = _objectSpread(_objectSpread({}, providerConfig), props),
|
|
76
|
+
selectOptions = _providerConfig$props8.selectOptions;
|
|
77
|
+
var providerProtoConfig = (InitFanContext === null || InitFanContext === void 0 ? void 0 : InitFanContext[type || '']) || {}; // 使用上下文(全局配置)设置控件扩展的配置项
|
|
69
78
|
var compContent;
|
|
70
79
|
if (selectOptionName && selectOptions) {
|
|
71
80
|
// 将传值的数据进行转换
|
|
@@ -85,12 +94,12 @@ var FieldComponent = /*#__PURE__*/_react.default.forwardRef(function (props, ref
|
|
|
85
94
|
render: render,
|
|
86
95
|
size: size,
|
|
87
96
|
ref: ref
|
|
88
|
-
},
|
|
97
|
+
}, providerProtoConfig), protoConfig);
|
|
89
98
|
if (fieldStatus === 'disabled') {
|
|
90
99
|
defaultProps.disabled = true;
|
|
91
100
|
}
|
|
92
101
|
var sortLimitRule = {}; // 排序字段长度限制
|
|
93
|
-
if (filedName === 'sorts' || filedName === 'sort' || filedName === 'indexSort' || filedName === 'sorta' || filedName === 'categorySort') {
|
|
102
|
+
if (filedName === 'sorts' || filedName === 'sort' || filedName === 'indexSort' || filedName === 'sorta' || filedName === 'categorySort' || fieldName === 'sorts' || fieldName === 'sort' || fieldName === 'indexSort' || fieldName === 'sorta' || fieldName === 'categorySort') {
|
|
94
103
|
sortLimitRule = {
|
|
95
104
|
min: 0,
|
|
96
105
|
max: 999999999,
|
|
@@ -99,6 +108,7 @@ var FieldComponent = /*#__PURE__*/_react.default.forwardRef(function (props, ref
|
|
|
99
108
|
}
|
|
100
109
|
// 设置纯展示模式下的“下拉树”控件返回值
|
|
101
110
|
var viewOnly = fieldStatus === 'viewOnly'; // 是否纯展示
|
|
111
|
+
|
|
102
112
|
switch (type) {
|
|
103
113
|
case 'input':
|
|
104
114
|
compContent = viewOnly ? value || '-' : /*#__PURE__*/_react.default.createElement(_antd.Input, _extends({
|
|
@@ -112,27 +122,33 @@ var FieldComponent = /*#__PURE__*/_react.default.forwardRef(function (props, ref
|
|
|
112
122
|
evt.preventDefault(); // 禁止默认行为
|
|
113
123
|
}
|
|
114
124
|
}
|
|
115
|
-
}, defaultProps
|
|
125
|
+
}, defaultProps, {
|
|
126
|
+
style: _objectSpread(_objectSpread({}, defaultStyle), defaultProps.style)
|
|
127
|
+
}));
|
|
116
128
|
break;
|
|
117
129
|
case 'password':
|
|
118
130
|
compContent = viewOnly ? value ? "\u25CF\u25CF\u25CF\u25CF\u25CF\u25CF" : '-' : /*#__PURE__*/_react.default.createElement(Password, _extends({
|
|
119
131
|
autoComplete: "off",
|
|
120
132
|
placeholder: fieldStatus === 'disabled' || defaultProps.disabled ? '' : defaultProps.placeholder || placeholder || '请输入',
|
|
121
133
|
maxLength: defaultProps.maxLength || 50
|
|
122
|
-
}, defaultProps
|
|
134
|
+
}, defaultProps, {
|
|
135
|
+
style: _objectSpread(_objectSpread({}, defaultStyle), defaultProps.style)
|
|
136
|
+
}));
|
|
123
137
|
break;
|
|
124
138
|
case 'textarea':
|
|
125
139
|
compContent = viewOnly ? value || '-' : /*#__PURE__*/_react.default.createElement(TextArea, _extends({
|
|
126
140
|
placeholder: fieldStatus === 'disabled' || defaultProps.disabled ? '' : defaultProps.placeholder || placeholder || '请输入',
|
|
127
141
|
maxLength: defaultProps.maxLength || 500,
|
|
128
142
|
title: fieldStatus === 'disabled' || defaultProps.disabled ? value : null
|
|
129
|
-
}, defaultProps
|
|
143
|
+
}, defaultProps, {
|
|
144
|
+
style: _objectSpread(_objectSpread({}, defaultStyle), defaultProps.style)
|
|
145
|
+
}));
|
|
130
146
|
break;
|
|
131
147
|
case 'inputNumber':
|
|
132
148
|
compContent = viewOnly ? value || 0 : /*#__PURE__*/_react.default.createElement(_antd.InputNumber, _extends({
|
|
133
149
|
placeholder: fieldStatus === 'disabled' || defaultProps.disabled ? '' : defaultProps.placeholder || placeholder || '请输入数字'
|
|
134
150
|
}, sortLimitRule, defaultProps, {
|
|
135
|
-
style: _objectSpread({
|
|
151
|
+
style: _objectSpread(_objectSpread({}, defaultStyle), {}, {
|
|
136
152
|
width: '120px'
|
|
137
153
|
}, defaultProps.style)
|
|
138
154
|
}));
|
|
@@ -171,7 +187,9 @@ var FieldComponent = /*#__PURE__*/_react.default.forwardRef(function (props, ref
|
|
|
171
187
|
return (defaultProps === null || defaultProps === void 0 || (_defaultProps$optionR = defaultProps.optionRender) === null || _defaultProps$optionR === void 0 ? void 0 : _defaultProps$optionR.call(defaultProps, _objectSpread(_objectSpread({}, option.data), option), info)) || (selectOptionRender === null || selectOptionRender === void 0 ? void 0 : selectOptionRender(_objectSpread(_objectSpread({}, option.data), option), info)) || option.label;
|
|
172
188
|
}
|
|
173
189
|
}, defaultProps, {
|
|
190
|
+
style: _objectSpread(_objectSpread({}, defaultStyle), defaultProps.style)
|
|
174
191
|
// onChange返回参数:累加当前选中包括其他字段值的数据
|
|
192
|
+
,
|
|
175
193
|
onChange: function onChange(value, Option) {
|
|
176
194
|
return _onChange && _onChange(value, resetResultOption(Option));
|
|
177
195
|
} // 数据为对象
|
|
@@ -188,7 +206,9 @@ var FieldComponent = /*#__PURE__*/_react.default.forwardRef(function (props, ref
|
|
|
188
206
|
protoTreeNode: protoConfig && protoConfig.TreeNode || {},
|
|
189
207
|
fieldStatus: fieldStatus,
|
|
190
208
|
disabledFields: disabledFields
|
|
191
|
-
}, defaultProps
|
|
209
|
+
}, defaultProps, {
|
|
210
|
+
style: _objectSpread(_objectSpread({}, defaultStyle), defaultProps.style)
|
|
211
|
+
}));
|
|
192
212
|
break;
|
|
193
213
|
case 'checkbox':
|
|
194
214
|
delete defaultProps.ref;
|
|
@@ -198,7 +218,7 @@ var FieldComponent = /*#__PURE__*/_react.default.forwardRef(function (props, ref
|
|
|
198
218
|
defaultProps: defaultProps,
|
|
199
219
|
separator: separator
|
|
200
220
|
}) : /*#__PURE__*/_react.default.createElement(_antd.Checkbox.Group, _extends({}, defaultProps, {
|
|
201
|
-
style: _objectSpread({
|
|
221
|
+
style: _objectSpread(_objectSpread({}, defaultStyle), {}, {
|
|
202
222
|
width: 'auto'
|
|
203
223
|
}, defaultProps.style)
|
|
204
224
|
}), selectOptions && selectOptions.map(function (val, index) {
|
|
@@ -230,7 +250,7 @@ var FieldComponent = /*#__PURE__*/_react.default.forwardRef(function (props, ref
|
|
|
230
250
|
});
|
|
231
251
|
})
|
|
232
252
|
}, defaultProps, {
|
|
233
|
-
style: _objectSpread({
|
|
253
|
+
style: _objectSpread(_objectSpread({}, defaultStyle), {}, {
|
|
234
254
|
width: 'auto'
|
|
235
255
|
}, defaultProps.style)
|
|
236
256
|
}));
|
|
@@ -244,9 +264,9 @@ var FieldComponent = /*#__PURE__*/_react.default.forwardRef(function (props, ref
|
|
|
244
264
|
showTime: defaultProps.showTime || type === 'dateTimePicker',
|
|
245
265
|
placeholder: fieldStatus === 'disabled' || defaultProps.disabled ? '' : defaultProps.placeholder || placeholder || '请选择'
|
|
246
266
|
}, defaultProps, {
|
|
247
|
-
style: _objectSpread({
|
|
248
|
-
|
|
249
|
-
}, defaultProps.style)
|
|
267
|
+
style: _objectSpread(_objectSpread({
|
|
268
|
+
width: 'auto'
|
|
269
|
+
}, defaultStyle), defaultProps.style)
|
|
250
270
|
}));
|
|
251
271
|
break;
|
|
252
272
|
case 'rangePicker':
|
|
@@ -259,9 +279,8 @@ var FieldComponent = /*#__PURE__*/_react.default.forwardRef(function (props, ref
|
|
|
259
279
|
showTime: defaultProps.showTime || type === 'rangeTimePicker',
|
|
260
280
|
allowEmpty: true
|
|
261
281
|
}, defaultProps, {
|
|
262
|
-
style:
|
|
263
|
-
|
|
264
|
-
}, defaultProps.style)
|
|
282
|
+
// style={{ width: type === 'rangeTimePicker' ? 'auto' : '100%', ...defaultStyle,...defaultProps.style }}
|
|
283
|
+
style: _objectSpread(_objectSpread({}, defaultStyle), defaultProps.style)
|
|
265
284
|
}));
|
|
266
285
|
break;
|
|
267
286
|
case 'timePicker':
|
|
@@ -270,9 +289,7 @@ var FieldComponent = /*#__PURE__*/_react.default.forwardRef(function (props, ref
|
|
|
270
289
|
type: type,
|
|
271
290
|
protoConfig: protoConfig
|
|
272
291
|
}) : /*#__PURE__*/_react.default.createElement(_antd.TimePicker, _extends({}, defaultProps, {
|
|
273
|
-
style: _objectSpread(_objectSpread({
|
|
274
|
-
'minWidth': 'auto'
|
|
275
|
-
}, defaultProps.style), {}, {
|
|
292
|
+
style: _objectSpread(_objectSpread(_objectSpread({}, defaultStyle), defaultProps.style), {}, {
|
|
276
293
|
width: 'auto'
|
|
277
294
|
})
|
|
278
295
|
}));
|
|
@@ -286,11 +303,7 @@ var FieldComponent = /*#__PURE__*/_react.default.forwardRef(function (props, ref
|
|
|
286
303
|
}) : /*#__PURE__*/_react.default.createElement(_antd.TimePicker.RangePicker, _extends({
|
|
287
304
|
allowEmpty: true
|
|
288
305
|
}, defaultProps, {
|
|
289
|
-
style: _objectSpread(_objectSpread({
|
|
290
|
-
'minWidth': 'auto'
|
|
291
|
-
}, defaultProps.style), {}, {
|
|
292
|
-
width: 'auto'
|
|
293
|
-
})
|
|
306
|
+
style: _objectSpread(_objectSpread({}, defaultStyle), defaultProps.style)
|
|
294
307
|
}));
|
|
295
308
|
break;
|
|
296
309
|
case 'upload':
|
|
@@ -324,7 +337,9 @@ var FieldComponent = /*#__PURE__*/_react.default.forwardRef(function (props, ref
|
|
|
324
337
|
allowClear: true,
|
|
325
338
|
fieldNames: (defaultProps === null || defaultProps === void 0 ? void 0 : defaultProps.fieldNames) || selectOptionName,
|
|
326
339
|
placeholder: fieldStatus === 'disabled' || defaultProps.disabled ? '' : defaultProps.placeholder || placeholder || '请选择'
|
|
327
|
-
}, defaultProps
|
|
340
|
+
}, defaultProps, {
|
|
341
|
+
style: _objectSpread(_objectSpread({}, defaultStyle), defaultProps.style)
|
|
342
|
+
}));
|
|
328
343
|
break;
|
|
329
344
|
case 'switch':
|
|
330
345
|
compContent = /*#__PURE__*/_react.default.createElement(_antd.Switch, _extends({}, defaultProps, {
|
|
@@ -338,7 +353,7 @@ var FieldComponent = /*#__PURE__*/_react.default.forwardRef(function (props, ref
|
|
|
338
353
|
break;
|
|
339
354
|
case 'slider':
|
|
340
355
|
compContent = viewOnly ? value : /*#__PURE__*/_react.default.createElement(_antd.Slider, _extends({}, defaultProps, {
|
|
341
|
-
style: _objectSpread({}, defaultProps.style)
|
|
356
|
+
style: _objectSpread(_objectSpread({}, defaultStyle), defaultProps.style)
|
|
342
357
|
}));
|
|
343
358
|
break;
|
|
344
359
|
case 'mentions':
|
|
@@ -349,20 +364,71 @@ var FieldComponent = /*#__PURE__*/_react.default.forwardRef(function (props, ref
|
|
|
349
364
|
label: selectOptionRender ? selectOptionRender(val) : val.label
|
|
350
365
|
});
|
|
351
366
|
})
|
|
352
|
-
}, defaultProps
|
|
367
|
+
}, defaultProps, {
|
|
368
|
+
style: _objectSpread(_objectSpread({}, defaultStyle), defaultProps.style)
|
|
369
|
+
}));
|
|
353
370
|
break;
|
|
354
371
|
case 'rate':
|
|
355
372
|
compContent = /*#__PURE__*/_react.default.createElement(_antd.Rate, _extends({
|
|
356
373
|
disabled: viewOnly || defaultProps.disabled
|
|
357
|
-
}, defaultProps
|
|
374
|
+
}, defaultProps, {
|
|
375
|
+
style: _objectSpread(_objectSpread({}, defaultStyle), {}, {
|
|
376
|
+
width: 'auto'
|
|
377
|
+
}, defaultProps.style)
|
|
378
|
+
}));
|
|
358
379
|
break;
|
|
359
380
|
case 'custom':
|
|
360
381
|
compContent = defaultProps.render && defaultProps.render(props) || defaultProps.customRender && defaultProps.customRender(props) || null;
|
|
361
382
|
break;
|
|
383
|
+
// case 'extends':
|
|
384
|
+
// compContent = <ExtensionField {...props} {...defaultProps}/>
|
|
385
|
+
// break;
|
|
362
386
|
default:
|
|
363
|
-
|
|
387
|
+
// 扩展组件
|
|
388
|
+
if (((providerConfig === null || providerConfig === void 0 ? void 0 : providerConfig.extendComponents) || []).some(function (tItem) {
|
|
389
|
+
return tItem.extendType === props.type;
|
|
390
|
+
})) {
|
|
391
|
+
compContent = /*#__PURE__*/_react.default.createElement(_ExtensionField.default, _extends({}, props, defaultProps, {
|
|
392
|
+
extendType: type
|
|
393
|
+
}));
|
|
394
|
+
// const MatchType = (extendComponents || []).find((tItem: FieldExtendsTypeType) => tItem.extendType === type)
|
|
395
|
+
// const MatchTypeComponent = MatchType?.component
|
|
396
|
+
// // const { type, ...fieldProps } = { ...props }
|
|
397
|
+
// console.log('fieldProps', props, defaultProps)
|
|
398
|
+
// return typeof MatchTypeComponent === 'function'
|
|
399
|
+
// ? <MatchTypeComponent ref={ref} fieldProps={props} proptoConfig={protoConfig} extendConfig={Object.assign(extendConfig || {}, MatchType?.extendConfig || {})}/>
|
|
400
|
+
// : MatchTypeComponent
|
|
401
|
+
//
|
|
402
|
+
// const MatchType = (providerConfig?.extendComponents || []).find((tItem: FieldExtendsTypeType) => tItem.extendType === props.type)
|
|
403
|
+
// const MatchTypeComponent = MatchType?.component
|
|
404
|
+
// const { type, ...fieldProps } = props
|
|
405
|
+
// compContent = typeof MatchTypeComponent === 'function'
|
|
406
|
+
// ? <MatchTypeComponent {...fieldProps}/>
|
|
407
|
+
// : MatchTypeComponent
|
|
408
|
+
} else {
|
|
409
|
+
compContent = value;
|
|
410
|
+
}
|
|
364
411
|
break;
|
|
365
412
|
}
|
|
366
413
|
return compContent;
|
|
367
414
|
});
|
|
368
|
-
var _default = exports.default = FieldComponent;
|
|
415
|
+
var _default = exports.default = FieldComponent; //
|
|
416
|
+
// // 高阶组件
|
|
417
|
+
// const withLibraryInjection = (LibraryComponent) => (WrappedComponent) => {
|
|
418
|
+
// return class InjectedComponent extends React.Component {
|
|
419
|
+
// render() {
|
|
420
|
+
// return (
|
|
421
|
+
// <>
|
|
422
|
+
// <LibraryComponent {...this.props} children={<WrappedComponent {...this.props} />}/>
|
|
423
|
+
// </>
|
|
424
|
+
// );
|
|
425
|
+
// }
|
|
426
|
+
// };
|
|
427
|
+
// };
|
|
428
|
+
//
|
|
429
|
+
//
|
|
430
|
+
// // 应用HOC
|
|
431
|
+
// const MyComponentWithLibrary = withLibraryInjection(FieldComponent)(ExtensionField);
|
|
432
|
+
//
|
|
433
|
+
//
|
|
434
|
+
// export default MyComponentWithLibrary
|
|
@@ -165,16 +165,21 @@ var RenderItemGroup = function RenderItemGroup(props) {
|
|
|
165
165
|
|
|
166
166
|
// 渲染表单控件
|
|
167
167
|
var renderFormField = function renderFormField(field) {
|
|
168
|
+
var _general$inlineFormIt;
|
|
168
169
|
var componentStyle = field.componentStyle,
|
|
169
170
|
extra = field.extra,
|
|
170
171
|
preExtra = field.preExtra; // 当前可传参的配置值
|
|
172
|
+
// 表单控件样式默认最小宽,如有单独配置width时,则不配置
|
|
173
|
+
// @ts-ignore
|
|
174
|
+
var FieldDefaultWidth = layout === 'inline' ? _objectSpread({}, (_general$inlineFormIt = _data.general.inlineFormItemStyle) === null || _general$inlineFormIt === void 0 ? void 0 : _general$inlineFormIt[size]) : _objectSpread({}, _data.general.inlineFormItemStyle.wide); // componentStyle?.width ? {} : { width: layout === 'inline' ? general.formItemStyle?.[size].width : general.formItemStyle.wide.width }
|
|
171
175
|
// 带前缀或后缀控件渲染
|
|
172
176
|
if (preExtra || extra) {
|
|
173
177
|
return /*#__PURE__*/_react.default.createElement(_antd.Space, null, preExtra ? preExtra(field, form) : '', /*#__PURE__*/_react.default.createElement(FormItem, {
|
|
174
178
|
noStyle: true,
|
|
175
179
|
rules: field.rules || (field.fieldOptions ? field.fieldOptions.rules : []),
|
|
176
|
-
name: field.filedName
|
|
180
|
+
name: field.filedName || field.fieldName
|
|
177
181
|
}, /*#__PURE__*/_react.default.createElement(_FieldComponent.default, _extends({}, field, {
|
|
182
|
+
// @ts-ignore
|
|
178
183
|
onChange: function onChange(eOrValue) {
|
|
179
184
|
updateFormFields();
|
|
180
185
|
for (var _len = arguments.length, otherParams = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
@@ -183,17 +188,24 @@ var RenderItemGroup = function RenderItemGroup(props) {
|
|
|
183
188
|
if (field.onChange) field.onChange.apply(field, [eOrValue].concat(otherParams));
|
|
184
189
|
},
|
|
185
190
|
fieldStatus: field.fieldStatus || fieldStatus,
|
|
186
|
-
size: field.protoConfig && field.protoConfig.size || field.size || fieldSize
|
|
187
|
-
|
|
191
|
+
size: field.protoConfig && field.protoConfig.size || field.size || fieldSize
|
|
192
|
+
// @ts-ignore
|
|
193
|
+
,
|
|
194
|
+
style: componentStyle || {}
|
|
195
|
+
// style={componentStyle || { ...general.formItemStyle.wide }}
|
|
196
|
+
// style={componentStyle || ( layout === 'inline' ? { ...general.inlineFormItemStyle?.[size] } : {...general.inlineFormItemStyle.wide})}
|
|
197
|
+
,
|
|
198
|
+
defaultStyle: componentStyle ? {} : FieldDefaultWidth
|
|
188
199
|
}))), extra ? extra(field, form) : '');
|
|
189
200
|
} else {
|
|
190
201
|
return /*#__PURE__*/_react.default.createElement(_FieldComponent.default, _extends({}, field, {
|
|
202
|
+
// @ts-ignore
|
|
191
203
|
onChange: function onChange(eOrValue) {
|
|
192
204
|
// let updateValue = val
|
|
193
205
|
// if (field.type === 'input' || field.type === 'textarea' || field.type === 'radio' || field.type === 'password') {
|
|
194
206
|
// updateValue = val.target.value
|
|
195
207
|
// }
|
|
196
|
-
// updateFormFields({ [field.filedName]: updateValue })
|
|
208
|
+
// updateFormFields({ [field.filedName || field.fieldName]: updateValue })
|
|
197
209
|
updateFormFields();
|
|
198
210
|
// if (field.onChange) field.onChange(val, form)
|
|
199
211
|
for (var _len2 = arguments.length, otherParams = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
|
@@ -203,7 +215,11 @@ var RenderItemGroup = function RenderItemGroup(props) {
|
|
|
203
215
|
},
|
|
204
216
|
fieldStatus: field.fieldStatus || fieldStatus,
|
|
205
217
|
size: field.protoConfig && field.protoConfig.size || field.size || fieldSize,
|
|
206
|
-
style: componentStyle ||
|
|
218
|
+
style: componentStyle || {}
|
|
219
|
+
// style={componentStyle || { ...general.formItemStyle.wide }}
|
|
220
|
+
// style={componentStyle || ( layout === 'inline' ? { ...general.inlineFormItemStyle?.[size] } : {...general.inlineFormItemStyle.wide})}
|
|
221
|
+
,
|
|
222
|
+
defaultStyle: componentStyle ? {} : FieldDefaultWidth
|
|
207
223
|
}));
|
|
208
224
|
}
|
|
209
225
|
};
|
|
@@ -212,14 +228,15 @@ var RenderItemGroup = function RenderItemGroup(props) {
|
|
|
212
228
|
description = item.description,
|
|
213
229
|
type = item.type,
|
|
214
230
|
customRender = item.customRender,
|
|
215
|
-
filedName = item.filedName
|
|
231
|
+
filedName = item.filedName,
|
|
232
|
+
fieldName = item.fieldName; // 当前可传参的配置值
|
|
216
233
|
if (layout === "horizontal" || layout === "vertical") {
|
|
217
234
|
return /*#__PURE__*/_react.default.createElement(_antd.Col, _extends({
|
|
218
235
|
key: index,
|
|
219
236
|
span: item.colSpan || setColSpan(item.display, size, columnCount),
|
|
220
237
|
style: item.style
|
|
221
238
|
}, item.protoCol), /*#__PURE__*/_react.default.createElement(FormItem, _extends({
|
|
222
|
-
name: type !== 'custom' && filedName,
|
|
239
|
+
name: type !== 'custom' && (filedName || fieldName),
|
|
223
240
|
className: (0, _classnames.default)(fieldStatus === 'viewOnly' ? 'form-item-view-only' : '', 'spec-item-group-form-item'),
|
|
224
241
|
label: description ? /*#__PURE__*/_react.default.createElement("span", null, label, /*#__PURE__*/_react.default.createElement(_antd.Tooltip, {
|
|
225
242
|
title: description
|
|
@@ -234,7 +251,7 @@ var RenderItemGroup = function RenderItemGroup(props) {
|
|
|
234
251
|
} else {
|
|
235
252
|
return /*#__PURE__*/_react.default.createElement(FormItem, _extends({
|
|
236
253
|
key: index,
|
|
237
|
-
name: type !== 'custom' && filedName,
|
|
254
|
+
name: type !== 'custom' && (filedName || fieldName),
|
|
238
255
|
className: (0, _classnames.default)(fieldStatus === 'viewOnly' ? 'form-item-view-only' : '', 'spec-item-group-form-item'),
|
|
239
256
|
label: description ? /*#__PURE__*/_react.default.createElement("span", null, label, /*#__PURE__*/_react.default.createElement(_antd.Tooltip, {
|
|
240
257
|
title: description
|
|
@@ -56,7 +56,7 @@ var NavLeafScroll = /*#__PURE__*/function (_Component) {
|
|
|
56
56
|
// const isEnough = wrapHeight % baseItemHeight === 0; // 剩余的是否足够容纳一个单元格
|
|
57
57
|
var isInsideEnoughWidth = navList.length * baseItemWidth <= _this.mainWrap.current.clientWidth;
|
|
58
58
|
var wrapWidth = _this.mainWrap.current.clientWidth - (isInsideEnoughWidth ? 0 : 30 * 2);
|
|
59
|
-
console.log('this.mainWrap.current.clientWidth',
|
|
59
|
+
// console.log('this.mainWrap.current.clientWidth', this.mainWrap.current.clientWidth, wrapWidth, isInsideEnoughWidth)
|
|
60
60
|
var floorWidth = _this.leafNav.current.clientWidth; // 所有楼层占用的宽度
|
|
61
61
|
if (type === 'horizontal') {
|
|
62
62
|
// 判断有效区域与单元格高度:若小于,则直接使用单元格高度,否则将内容区高度去除不足一个单元格高度
|
|
@@ -294,7 +294,7 @@ var NavLeafScroll = /*#__PURE__*/function (_Component) {
|
|
|
294
294
|
floorWidth = _this$state3$floorRel.floorWidth,
|
|
295
295
|
stepSize = _this$state3.stepSize;
|
|
296
296
|
if (type === 'horizontal') {}
|
|
297
|
-
if (
|
|
297
|
+
if (navList !== prevProps.navList || (type === 'horizontal' ? baseItemWidth !== prevProps.baseItemWidth : baseItemHeight !== prevProps.baseItemHeight) || align !== prevProps.align) {
|
|
298
298
|
this.initFloorValues();
|
|
299
299
|
}
|
|
300
300
|
if (forbidScroll !== prevProps.forbidScroll) {
|
|
@@ -304,7 +304,7 @@ var StandardModal = function StandardModal(props) {
|
|
|
304
304
|
// console.log('执行下一步骤,需要优先进行校验')
|
|
305
305
|
var currentFields = (formItemGroup || [])[current].fields;
|
|
306
306
|
var validatorGroup = currentFields && Array.isArray(currentFields) ? currentFields.map(function (fItem) {
|
|
307
|
-
return fItem.rules ? fItem.filedName : null;
|
|
307
|
+
return fItem.rules ? fItem.filedName || fItem.fieldName : null;
|
|
308
308
|
}) : [];
|
|
309
309
|
formChild.validateFields(validatorGroup).then(function () {
|
|
310
310
|
// if (stepClick) stepClick(type, formChild, values);
|
|
@@ -60,16 +60,19 @@ var StandardFilter = /*#__PURE__*/_react.default.forwardRef(function (props, ref
|
|
|
60
60
|
cancelButtonProps = _providerConfig$props6 === void 0 ? {} : _providerConfig$props6,
|
|
61
61
|
filterButtonColSpan = _providerConfig$props.filterButtonColSpan,
|
|
62
62
|
filterButtonConfig = _providerConfig$props.filterButtonConfig,
|
|
63
|
-
|
|
64
|
-
_providerConfig$props7
|
|
65
|
-
|
|
63
|
+
_providerConfig$props7 = _providerConfig$props.formLayout,
|
|
64
|
+
formLayout = _providerConfig$props7 === void 0 ? 'inline' : _providerConfig$props7,
|
|
65
|
+
_providerConfig$props8 = _providerConfig$props.gridLayout,
|
|
66
|
+
gridLayout = _providerConfig$props8 === void 0 ? 'inline' : _providerConfig$props8,
|
|
67
|
+
_providerConfig$props9 = _providerConfig$props.buttonGroupPlacement,
|
|
68
|
+
buttonGroupPlacement = _providerConfig$props9 === void 0 ? 'left' : _providerConfig$props9,
|
|
66
69
|
filterFormStyle = _providerConfig$props.filterFormStyle,
|
|
67
70
|
filterBtnsStyle = _providerConfig$props.filterBtnsStyle,
|
|
68
|
-
_providerConfig$
|
|
69
|
-
colon = _providerConfig$
|
|
71
|
+
_providerConfig$props10 = _providerConfig$props.colon,
|
|
72
|
+
colon = _providerConfig$props10 === void 0 ? true : _providerConfig$props10,
|
|
70
73
|
dateFormatter = _providerConfig$props.dateFormatter,
|
|
71
|
-
_providerConfig$
|
|
72
|
-
collapseable = _providerConfig$
|
|
74
|
+
_providerConfig$props11 = _providerConfig$props.collapseable,
|
|
75
|
+
collapseable = _providerConfig$props11 === void 0 ? false : _providerConfig$props11;
|
|
73
76
|
var filterFormRef = (0, _react.useRef)();
|
|
74
77
|
// ref 的转发
|
|
75
78
|
(0, _react.useImperativeHandle)(ref, function () {
|
|
@@ -307,7 +310,7 @@ var StandardFilter = /*#__PURE__*/_react.default.forwardRef(function (props, ref
|
|
|
307
310
|
// 判断是否隐藏结构, display:'none'
|
|
308
311
|
var setItemHiddenNode = function setItemHiddenNode(item, index, collapsed, showItemNumber) {
|
|
309
312
|
// console.log('判断是否隐藏结构==>当前执行序号', index, showItemNumber)
|
|
310
|
-
if (item.filedName === 'filterAction') {
|
|
313
|
+
if (item.filedName === 'filterAction' || item.fieldName === 'filterAction') {
|
|
311
314
|
return {
|
|
312
315
|
isHidden: false
|
|
313
316
|
};
|
|
@@ -402,7 +405,7 @@ var StandardFilter = /*#__PURE__*/_react.default.forwardRef(function (props, ref
|
|
|
402
405
|
};
|
|
403
406
|
var renderButtonGroup = function renderButtonGroup() {
|
|
404
407
|
return buttonGroup && buttonGroup.length > 0 ? /*#__PURE__*/_react.default.createElement("div", {
|
|
405
|
-
className: "filter-btns filter-btns-".concat(gridLayout),
|
|
408
|
+
className: "filter-btns filter-btns-".concat(gridLayout, " filter-btns-").concat(gridLayout, "-").concat(buttonGroupPlacement),
|
|
406
409
|
style: filterBtnsStyle
|
|
407
410
|
}, /*#__PURE__*/_react.default.createElement(_ButtonGroup.default, _extends({
|
|
408
411
|
options: buttonGroup,
|
|
@@ -34,7 +34,7 @@ var StandardFilterStyleFunc = function StandardFilterStyleFunc(prefix) {
|
|
|
34
34
|
},
|
|
35
35
|
'.filter-btns .ant-btn': {
|
|
36
36
|
marginLeft: token.paddingXS,
|
|
37
|
-
marginTop: token.paddingXS,
|
|
37
|
+
// marginTop: token.paddingXS,
|
|
38
38
|
// marginBottom: token.paddingMD,
|
|
39
39
|
marginBottom: token.paddingXS
|
|
40
40
|
},
|
|
@@ -42,9 +42,18 @@ var StandardFilterStyleFunc = function StandardFilterStyleFunc(prefix) {
|
|
|
42
42
|
// lineHeight: token.controlHeight - 2 + 'px' // 去除样式
|
|
43
43
|
},
|
|
44
44
|
'&.filter-grid-horizontal': {
|
|
45
|
-
'.filter-btn': {
|
|
46
|
-
|
|
47
|
-
|
|
45
|
+
// '.filter-btn': {
|
|
46
|
+
// '.spec-button-group': {
|
|
47
|
+
// paddingTop: token.paddingMD
|
|
48
|
+
// },
|
|
49
|
+
//
|
|
50
|
+
// },
|
|
51
|
+
'.filter-btns-horizontal': {
|
|
52
|
+
'&.filter-btns-horizontal-right .spec-button-group': {
|
|
53
|
+
justifyContent: 'end'
|
|
54
|
+
},
|
|
55
|
+
'&.filter-btns-horizontal-left .spec-button-group': {
|
|
56
|
+
justifyContent: 'start'
|
|
48
57
|
}
|
|
49
58
|
}
|
|
50
59
|
}
|
|
@@ -33,10 +33,17 @@
|
|
|
33
33
|
text-align: left;
|
|
34
34
|
|
|
35
35
|
.spec-button-group {
|
|
36
|
-
display:
|
|
36
|
+
display: flex;
|
|
37
|
+
flex-wrap: wrap;
|
|
37
38
|
padding-left: 0;
|
|
38
39
|
//padding-top: @padding-md;
|
|
39
|
-
|
|
40
|
+
//&:before {
|
|
41
|
+
// content: '';
|
|
42
|
+
// float: left;
|
|
43
|
+
//}
|
|
44
|
+
//&:after {
|
|
45
|
+
// clear: both;
|
|
46
|
+
//}
|
|
40
47
|
.ant-btn:first-child {
|
|
41
48
|
margin-left: 0;
|
|
42
49
|
}
|
|
@@ -99,7 +99,7 @@ var StepForm = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
|
|
|
99
99
|
var valitorGroup = curentFields && Array.isArray(curentFields) ? curentFields.filter(function (fItem) {
|
|
100
100
|
return fItem.rules;
|
|
101
101
|
}).map(function (matchItem) {
|
|
102
|
-
return matchItem.filedName;
|
|
102
|
+
return matchItem.filedName || matchItem.fieldName;
|
|
103
103
|
}) : [];
|
|
104
104
|
formChild && formChild.validateFields(valitorGroup).then(function (values) {
|
|
105
105
|
if (stepClick) stepClick(type, formChild, values);
|
|
@@ -315,7 +315,7 @@ var StandardModal = function StandardModal(props) {
|
|
|
315
315
|
// console.log('执行下一步骤,需要优先进行校验')
|
|
316
316
|
var currentFields = (formItemGroup || [])[current].fields;
|
|
317
317
|
var validatorGroup = currentFields && Array.isArray(currentFields) ? currentFields.map(function (fItem) {
|
|
318
|
-
return fItem.rules ? fItem.filedName : null;
|
|
318
|
+
return fItem.rules ? fItem.filedName || fItem.filedName : null;
|
|
319
319
|
}) : [];
|
|
320
320
|
formChild.validateFields(validatorGroup).then(function () {
|
|
321
321
|
// if (stepClick) stepClick(type, formChild, values);
|
|
@@ -4,7 +4,7 @@ interface StandardTableDataProps {
|
|
|
4
4
|
list?: object[];
|
|
5
5
|
pagination?: any;
|
|
6
6
|
}
|
|
7
|
-
interface StandardTableProps {
|
|
7
|
+
export interface StandardTableProps {
|
|
8
8
|
columns?: any[];
|
|
9
9
|
data: StandardTableDataProps;
|
|
10
10
|
rowKey?: string;
|
|
@@ -20,8 +20,9 @@ interface StandardTableProps {
|
|
|
20
20
|
buttonGroup?: any[];
|
|
21
21
|
title?: React.ReactNode | string;
|
|
22
22
|
min?: number;
|
|
23
|
-
buttonGroupConfig?: any
|
|
23
|
+
buttonGroupConfig?: any;
|
|
24
24
|
batchButtonGroup?: any[];
|
|
25
|
+
buttonGroupPlacement?: string | 'left' | 'right' | 'bottomLeft' | 'bottomRight';
|
|
25
26
|
[k: string]: any;
|
|
26
27
|
}
|
|
27
28
|
declare const StandardTable: FC<StandardTableProps>;
|
|
@@ -13,7 +13,7 @@ require("./style/index.less");
|
|
|
13
13
|
var _ConfigContext = require("../ConfigContext");
|
|
14
14
|
var _lodash = _interopRequireDefault(require("lodash"));
|
|
15
15
|
var _index3 = _interopRequireDefault(require("./style/index"));
|
|
16
|
-
var _excluded = ["data", "rowKey", "rowSelection", "columns", "hideOrderNumber", "orderNumber", "className", "emptyText", "codes", "permissionCodes", "columnsConfig", "title", "buttonGroup", "buttonGroupConfig", "min", "batchButtonGroup"];
|
|
16
|
+
var _excluded = ["data", "rowKey", "rowSelection", "columns", "hideOrderNumber", "orderNumber", "className", "emptyText", "codes", "permissionCodes", "columnsConfig", "title", "buttonGroup", "buttonGroupConfig", "min", "batchButtonGroup", "buttonGroupPlacement"];
|
|
17
17
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
18
18
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
19
19
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
@@ -61,6 +61,8 @@ var StandardTable = function StandardTable(props) {
|
|
|
61
61
|
buttonGroupConfig = _providerConfig$props.buttonGroupConfig,
|
|
62
62
|
min = _providerConfig$props.min,
|
|
63
63
|
batchButtonGroup = _providerConfig$props.batchButtonGroup,
|
|
64
|
+
_providerConfig$props5 = _providerConfig$props.buttonGroupPlacement,
|
|
65
|
+
buttonGroupPlacement = _providerConfig$props5 === void 0 ? 'right' : _providerConfig$props5,
|
|
64
66
|
rest = _objectWithoutProperties(_providerConfig$props, _excluded);
|
|
65
67
|
// 加上类型修复 TS:2322 报警
|
|
66
68
|
var resetColumns = [_objectSpread(_objectSpread({
|
|
@@ -152,8 +154,8 @@ var StandardTable = function StandardTable(props) {
|
|
|
152
154
|
}
|
|
153
155
|
var RenderExtraButtonGroup = function RenderExtraButtonGroup(exProps) {
|
|
154
156
|
// @ts-ignore
|
|
155
|
-
var _providerConfig$
|
|
156
|
-
rowSelection = _providerConfig$
|
|
157
|
+
var _providerConfig$props6 = _objectSpread(_objectSpread({}, providerConfig), props),
|
|
158
|
+
rowSelection = _providerConfig$props6.rowSelection;
|
|
157
159
|
var buttonGroup = exProps.buttonGroup,
|
|
158
160
|
batchButtonGroup = exProps.batchButtonGroup;
|
|
159
161
|
// 只有配置rowSelection才显示对应的批量按钮组
|
|
@@ -165,14 +167,19 @@ var StandardTable = function StandardTable(props) {
|
|
|
165
167
|
permissionCodes: permissionCodes
|
|
166
168
|
}, buttonGroupConfig));
|
|
167
169
|
};
|
|
170
|
+
// 根据placement判断按钮组显示在左边还是右边,
|
|
171
|
+
var placeButtonGroup = batchButtonGroup || buttonGroup ? /*#__PURE__*/_react.default.createElement(RenderExtraButtonGroup, {
|
|
172
|
+
buttonGroup: buttonGroup,
|
|
173
|
+
batchButtonGroup: batchButtonGroup
|
|
174
|
+
}) : null;
|
|
175
|
+
var placeTitle = title ? /*#__PURE__*/_react.default.createElement("span", {
|
|
176
|
+
className: 'ant-card-head-title-name'
|
|
177
|
+
}, title) : null;
|
|
168
178
|
return wrapSSR( /*#__PURE__*/_react.default.createElement(_antd.Card, {
|
|
169
179
|
className: (0, _classnames.default)(componentName, 'standard-table', className, hashId),
|
|
170
180
|
bordered: false,
|
|
171
|
-
title:
|
|
172
|
-
extra:
|
|
173
|
-
buttonGroup: buttonGroup,
|
|
174
|
-
batchButtonGroup: batchButtonGroup
|
|
175
|
-
}) : null
|
|
181
|
+
title: buttonGroupPlacement === 'left' ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, placeTitle, placeButtonGroup) : placeTitle,
|
|
182
|
+
extra: buttonGroupPlacement === 'left' ? null : placeButtonGroup
|
|
176
183
|
}, /*#__PURE__*/_react.default.createElement(_antd.Table, _extends({
|
|
177
184
|
rowKey: rowKey || 'id',
|
|
178
185
|
rowSelection: rowSelection ? _objectSpread({
|