fan-standard-comp 4.0.4 → 4.0.6
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/FormComp/RenderItemGroup/index.d.ts +1 -0
- package/es/FormComp/RenderItemGroup/index.js +12 -70
- package/es/FormComp/RenderItemGroup/style/index.js +1 -1
- package/es/StandardFilter/index.js +52 -14
- package/es/StandardForm/StepForm.js +16 -9
- package/es/StandardForm/style/index.js +2 -2
- package/es/StandardModal/style/index.js +7 -2
- package/es/StandardTable/index.js +2 -2
- package/es/StandardTable/style/index.js +2 -2
- package/es/StandardTable/style/index.less +0 -24
- package/es/data/general.config.d.ts +64 -0
- package/es/data/general.config.js +68 -4
- package/es/theme/index.js +1 -1
- package/lib/FormComp/RenderItemGroup/index.d.ts +1 -0
- package/lib/FormComp/RenderItemGroup/index.js +12 -70
- package/lib/FormComp/RenderItemGroup/style/index.js +1 -1
- package/lib/StandardFilter/index.js +52 -14
- package/lib/StandardForm/StepForm.js +16 -9
- package/lib/StandardForm/style/index.js +2 -2
- package/lib/StandardModal/style/index.js +7 -2
- package/lib/StandardTable/index.js +2 -2
- package/lib/StandardTable/style/index.js +2 -2
- package/lib/StandardTable/style/index.less +0 -24
- package/lib/data/general.config.d.ts +64 -0
- package/lib/data/general.config.js +68 -4
- package/lib/theme/index.js +1 -1
- package/package.json +1 -1
|
@@ -37,64 +37,13 @@ var RenderItemGroup = function RenderItemGroup(props) {
|
|
|
37
37
|
_props$layout = props.layout,
|
|
38
38
|
layout = _props$layout === void 0 ? "horizontal" : _props$layout,
|
|
39
39
|
gutter = props.gutter,
|
|
40
|
-
columnCount = props.columnCount
|
|
40
|
+
columnCount = props.columnCount,
|
|
41
|
+
parentNode = props.parentNode;
|
|
41
42
|
var componentName = 'spec-item-group';
|
|
42
43
|
var _useStyle = useStyle(componentName),
|
|
43
44
|
_useStyle2 = _slicedToArray(_useStyle, 2),
|
|
44
45
|
wrapSSR = _useStyle2[0],
|
|
45
46
|
hashId = _useStyle2[1];
|
|
46
|
-
// 栅格数量
|
|
47
|
-
// const columnNumber: number = useMemo(() => {
|
|
48
|
-
// // @ts-ignore
|
|
49
|
-
// return general.modalSize[size].columnNumber || 1
|
|
50
|
-
// }, [size, columnCount])
|
|
51
|
-
/*
|
|
52
|
-
// 当前需要显示的前几条表单项
|
|
53
|
-
// const [showItemNumber, setShowItemNumber] = useState(0)
|
|
54
|
-
// 计算当前栅格数量,及对应的size
|
|
55
|
-
const columnNumberAndSize = useMemo(() => {
|
|
56
|
-
// 当前栅栅数量
|
|
57
|
-
let itemGroupSize = size || (layout === 'horizontal' ? 'xxlg' : 'md')
|
|
58
|
-
if (columnCount) {
|
|
59
|
-
// 有配置栅格数 1,2,3,4
|
|
60
|
-
switch (columnCount) {
|
|
61
|
-
case 1:
|
|
62
|
-
itemGroupSize = 'sm'
|
|
63
|
-
break;
|
|
64
|
-
case 2:
|
|
65
|
-
itemGroupSize = 'md'
|
|
66
|
-
break;
|
|
67
|
-
case 3:
|
|
68
|
-
itemGroupSize = 'lg'
|
|
69
|
-
break;
|
|
70
|
-
case 4:
|
|
71
|
-
itemGroupSize = 'xxlg'
|
|
72
|
-
break;
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
return {
|
|
76
|
-
// @ts-ignore
|
|
77
|
-
columnNumber: general.modalSize[itemGroupSize].columnNumber,
|
|
78
|
-
itemGroupSize, columnCount
|
|
79
|
-
}
|
|
80
|
-
}, [size, columnCount, layout])
|
|
81
|
-
useEffect(() => {
|
|
82
|
-
setShowItemNumber(columnNumberAndSize.columnNumber - 1)
|
|
83
|
-
}, [columnNumberAndSize, size])
|
|
84
|
-
|
|
85
|
-
// 判断是否隐藏结构, display:'none'
|
|
86
|
-
const setItemHiddenNode = (item: any, index: number, collapsed: boolean, showItemNumber: number) => {
|
|
87
|
-
// updateFormFields() // TODO 放这执行会报错,但是不加的话,切换栅格变化会导致收缩状态下隐藏的表单项未更新
|
|
88
|
-
if (item.filedName === 'filterAction') {
|
|
89
|
-
return {
|
|
90
|
-
isHidden: false
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
return {
|
|
94
|
-
// 栅格列为1时,显示1个表单项
|
|
95
|
-
isHidden: collapsed ? false : (showItemNumber === 0 ? index !== 0 : !(index < showItemNumber))
|
|
96
|
-
}
|
|
97
|
-
}*/
|
|
98
47
|
var setColSpan = function setColSpan(display, modalSize, columnCount) {
|
|
99
48
|
if (_typeof(display) === 'object' || display === 'block') {
|
|
100
49
|
// 栅格数量为:1
|
|
@@ -139,6 +88,7 @@ var RenderItemGroup = function RenderItemGroup(props) {
|
|
|
139
88
|
// 优先级:若有displayLayout.block 则直接使用 general > displayLayout
|
|
140
89
|
// 还需要判断 layout为vertical还是horizontal
|
|
141
90
|
var calculateFormLayout = useCallback(function (itemData) {
|
|
91
|
+
var _general$modalSize$md, _general$modalSize$md2, _general$modalSize$lg, _general$modalSize$lg2;
|
|
142
92
|
var formLayout = {};
|
|
143
93
|
// 当布局为 'inline' 时,不配置栅格结构
|
|
144
94
|
if (layout === 'inline') {
|
|
@@ -153,11 +103,11 @@ var RenderItemGroup = function RenderItemGroup(props) {
|
|
|
153
103
|
}
|
|
154
104
|
};
|
|
155
105
|
} else {
|
|
156
|
-
var _general$modalSize;
|
|
106
|
+
var _general$modalSize, _general$modalSize2;
|
|
157
107
|
// @ts-ignore
|
|
158
|
-
var sizeFormLayout = (_general$modalSize = general.modalSize) === null || _general$modalSize === void 0 ? void 0 : _general$modalSize[size]
|
|
108
|
+
var sizeFormLayout = (_general$modalSize = general.modalSize) === null || _general$modalSize === void 0 || (_general$modalSize = _general$modalSize[size]) === null || _general$modalSize === void 0 ? void 0 : _general$modalSize[parentNode === 'standardFilter' && (size === 'md' || size === 'lg' || size === 'xlg') ? 'filterFormLayout' : 'formLayout'];
|
|
159
109
|
// @ts-ignore
|
|
160
|
-
var sizeFormBlockLayout = general.modalSize[size]
|
|
110
|
+
var sizeFormBlockLayout = (_general$modalSize2 = general.modalSize) === null || _general$modalSize2 === void 0 || (_general$modalSize2 = _general$modalSize2[size]) === null || _general$modalSize2 === void 0 ? void 0 : _general$modalSize2[parentNode === 'standardFilter' && (size === 'md' || size === 'lg' || size === 'xlg') ? 'filterFormBlockLayout' : 'formBlockLayout'];
|
|
161
111
|
// 优先级 displayLayout.side > displayLayout > general
|
|
162
112
|
// 优先级:若有displayLayout.block 则直接使用 general > displayLayout
|
|
163
113
|
// 还需要判断 layout为vertical还是horizontal
|
|
@@ -169,12 +119,12 @@ var RenderItemGroup = function RenderItemGroup(props) {
|
|
|
169
119
|
sizeFormBlockLayout = general.modalSize.sm.formBlockLayout;
|
|
170
120
|
break;
|
|
171
121
|
case 2:
|
|
172
|
-
sizeFormLayout = general.modalSize.md
|
|
173
|
-
sizeFormBlockLayout = general.modalSize.md
|
|
122
|
+
sizeFormLayout = (_general$modalSize$md = general.modalSize.md) === null || _general$modalSize$md === void 0 ? void 0 : _general$modalSize$md[parentNode === 'standardFilter' ? 'filterFormLayout' : 'formLayout'];
|
|
123
|
+
sizeFormBlockLayout = (_general$modalSize$md2 = general.modalSize.md) === null || _general$modalSize$md2 === void 0 ? void 0 : _general$modalSize$md2[parentNode === 'standardFilter' ? 'filterFormBlockLayout' : 'formBlockLayout'];
|
|
174
124
|
break;
|
|
175
125
|
case 3:
|
|
176
|
-
sizeFormLayout = general.modalSize.lg
|
|
177
|
-
sizeFormBlockLayout = general.modalSize.lg
|
|
126
|
+
sizeFormLayout = (_general$modalSize$lg = general.modalSize.lg) === null || _general$modalSize$lg === void 0 ? void 0 : _general$modalSize$lg[parentNode === 'standardFilter' ? 'filterFormLayout' : 'formLayout'];
|
|
127
|
+
sizeFormBlockLayout = (_general$modalSize$lg2 = general.modalSize.lg) === null || _general$modalSize$lg2 === void 0 ? void 0 : _general$modalSize$lg2[parentNode === 'standardFilter' ? 'filterFormBlockLayout' : 'formBlockLayout'];
|
|
178
128
|
break;
|
|
179
129
|
case 4:
|
|
180
130
|
sizeFormLayout = general.modalSize.xxlg.formLayout;
|
|
@@ -198,7 +148,7 @@ var RenderItemGroup = function RenderItemGroup(props) {
|
|
|
198
148
|
}
|
|
199
149
|
}
|
|
200
150
|
return formLayout;
|
|
201
|
-
}, [size, layout, columnCount]);
|
|
151
|
+
}, [size, layout, columnCount, parentNode]);
|
|
202
152
|
|
|
203
153
|
// 渲染表单控件
|
|
204
154
|
var renderFormField = function renderFormField(field) {
|
|
@@ -251,14 +201,6 @@ var RenderItemGroup = function RenderItemGroup(props) {
|
|
|
251
201
|
customRender = item.customRender,
|
|
252
202
|
filedName = item.filedName; // 当前可传参的配置值
|
|
253
203
|
if (layout === "horizontal" || layout === "vertical") {
|
|
254
|
-
// if (collapseable && layout === "horizontal") {
|
|
255
|
-
// const { isHidden } = setItemHiddenNode(item, index, collapsed, showItemNumber)
|
|
256
|
-
// item.isHidden = isHidden
|
|
257
|
-
// item.style = { ...(item.style || {}), display: item.isHidden ? 'none' : 'block' }
|
|
258
|
-
// // if (index < showItemNumber) {
|
|
259
|
-
// // console.log('===>>>>当前显示【常规表单项】=>>', item.filedName, '序号', index, '可显示数量', showItemNumber, collapsed)
|
|
260
|
-
// // }
|
|
261
|
-
// }
|
|
262
204
|
return /*#__PURE__*/React.createElement(Col, {
|
|
263
205
|
key: index,
|
|
264
206
|
span: item.colSpan || setColSpan(item.display, size, columnCount),
|
|
@@ -344,7 +286,7 @@ var RenderItemGroup = function RenderItemGroup(props) {
|
|
|
344
286
|
// 布局配置为horizontal或vertical
|
|
345
287
|
: /*#__PURE__*/React.createElement(Row, {
|
|
346
288
|
className: itemGroupCls,
|
|
347
|
-
gutter: layout === 'vertical' ? gutter || [
|
|
289
|
+
gutter: layout === 'vertical' ? gutter || [16, 16] : gutter
|
|
348
290
|
}, renderItemGroupNode())
|
|
349
291
|
/* itemGroup = ReactNode则直接返回 */ : /*#__PURE__*/React.createElement("div", {
|
|
350
292
|
className: itemGroupCls
|
|
@@ -28,7 +28,7 @@ var ItemGroupStyleFunc = function ItemGroupStyleFunc(prefix) {
|
|
|
28
28
|
}
|
|
29
29
|
},
|
|
30
30
|
'.modalPanelTitle, .modal-grid-title': {
|
|
31
|
-
margin: "0 0 ".concat(token.
|
|
31
|
+
margin: "0 0 ".concat(token.margin, "px 0"),
|
|
32
32
|
// paddingBottom: token.paddingXS,
|
|
33
33
|
borderBottom: "1px solid ".concat(token.colorBorder),
|
|
34
34
|
fontSize: token.fontSize
|
|
@@ -74,10 +74,14 @@ var StandardFilter = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
74
74
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
75
75
|
isHideCount = _useState4[0],
|
|
76
76
|
setIsHideCount = _useState4[1]; // 表单隐藏项数量值
|
|
77
|
-
var _useState5 = useState(
|
|
77
|
+
var _useState5 = useState(0),
|
|
78
78
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
79
|
-
|
|
80
|
-
|
|
79
|
+
additionalCount = _useState6[0],
|
|
80
|
+
setAdditionalCount = _useState6[1]; // 根据表单项配置dipslay或者colSpan,额外需要计算在内的栅格占用
|
|
81
|
+
var _useState7 = useState(false),
|
|
82
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
83
|
+
collapsed = _useState8[0],
|
|
84
|
+
setCollapsed = _useState8[1];
|
|
81
85
|
var componentName = 'spec-standard-filter';
|
|
82
86
|
var _useStyle = useStyle(componentName),
|
|
83
87
|
_useStyle2 = _slicedToArray(_useStyle, 2),
|
|
@@ -117,10 +121,40 @@ var StandardFilter = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
117
121
|
// 计算表单隐藏项(开启展开与收缩)
|
|
118
122
|
var calculateHideCount = function calculateHideCount(filterFormRef, groups) {
|
|
119
123
|
var _filterFormRef$curren;
|
|
124
|
+
var itemGroupSize = columnNumberAndSize.itemGroupSize,
|
|
125
|
+
columnNumber = columnNumberAndSize.columnNumber;
|
|
120
126
|
var formValues = filterFormRef === null || filterFormRef === void 0 || (_filterFormRef$curren = filterFormRef.current) === null || _filterFormRef$curren === void 0 ? void 0 : _filterFormRef$curren.getFieldValue();
|
|
121
|
-
|
|
127
|
+
// Rule1: 不包括isHidden跟isHide的数据
|
|
128
|
+
// Rule2:剩余的表单项中,查找是否有自定义配置 display='block' 或者colSpan的表单项
|
|
129
|
+
var notShowGroupItem = (groups || []).filter(function (item) {
|
|
122
130
|
return (item === null || item === void 0 ? void 0 : item.isHidden) || (item.hasOwnProperty('isHide') ? item.isHide(_objectSpread({}, formValues), filterFormRef) : false);
|
|
123
|
-
})
|
|
131
|
+
});
|
|
132
|
+
// 可显示的表单值
|
|
133
|
+
var showGroupItem = (groups || []).filter(function (item) {
|
|
134
|
+
return !(item !== null && item !== void 0 && item.isHidden || (item.hasOwnProperty('isHide') ? item.isHide(_objectSpread({}, formValues), filterFormRef) : false));
|
|
135
|
+
});
|
|
136
|
+
var showGroupWithSetting = showGroupItem.filter(function (item) {
|
|
137
|
+
return item.hasOwnProperty('colSpan');
|
|
138
|
+
});
|
|
139
|
+
var resultCount = notShowGroupItem.length;
|
|
140
|
+
var aCount = 0; // 需要再次额外新增的数量
|
|
141
|
+
if (showGroupWithSetting.length > 0) {
|
|
142
|
+
showGroupWithSetting.forEach(function (gItem) {
|
|
143
|
+
// colSpan 优先级更高
|
|
144
|
+
if (gItem.hasOwnProperty('colSpan')) {
|
|
145
|
+
// console.log('有配置了colSpan, 占用栅格数量', gItem.colSpan / (24 / columnNumber), '需要再额外减1', gItem.colSpan / (24 / columnNumber) - 1, Math.ceil(gItem.colSpan / (24 / columnNumber) - 1))
|
|
146
|
+
aCount += Math.ceil(gItem.colSpan / (24 / columnNumber) - 1); // 额外占用了
|
|
147
|
+
return;
|
|
148
|
+
}
|
|
149
|
+
// if (gItem.hasOwnProperty('display') && gItem.display === 'block' ) {
|
|
150
|
+
// // TODO.计算会有问题
|
|
151
|
+
// console.log('有配置了display=block', Math.ceil(24 / (24 / columnNumber) - 1))
|
|
152
|
+
// aCount += columnNumber -1 // Math.ceil(24 / (24 / columnNumber) - 1) // 额外占用了
|
|
153
|
+
// }
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
setAdditionalCount(aCount);
|
|
157
|
+
setIsHideCount(resultCount - aCount);
|
|
124
158
|
};
|
|
125
159
|
|
|
126
160
|
// 配置筛选按钮(确认与取消)
|
|
@@ -145,10 +179,13 @@ var StandardFilter = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
145
179
|
filedName: 'filterAction',
|
|
146
180
|
display: {
|
|
147
181
|
wrapperCol: {
|
|
148
|
-
// 占用的格子数按对应size配置的formItem
|
|
149
|
-
span: general.modalSize[itemGroupSize].
|
|
182
|
+
// 占用的格子数按对应size配置的formItem,如果是md则单独使用筛选的栅格配置
|
|
183
|
+
span: itemGroupSize === 'md' || itemGroupSize === 'lg' || itemGroupSize === 'xlg' ? general.modalSize[itemGroupSize].filterFormLayout.labelCol.span + general.modalSize[itemGroupSize].filterFormLayout.wrapperCol.span : general.modalSize[itemGroupSize].formLayout.labelCol.span + general.modalSize[itemGroupSize].formLayout.wrapperCol.span
|
|
150
184
|
}
|
|
151
185
|
},
|
|
186
|
+
style: {
|
|
187
|
+
// textAlign: 'right'
|
|
188
|
+
},
|
|
152
189
|
protoFormItem: {
|
|
153
190
|
style: {
|
|
154
191
|
textAlign: filterFormLayout === 'horizontal' ? 'right' : 'left'
|
|
@@ -159,17 +196,17 @@ var StandardFilter = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
159
196
|
customRender: function customRender() {
|
|
160
197
|
return /*#__PURE__*/React.createElement(FormItem, {
|
|
161
198
|
noStyle: true
|
|
162
|
-
},
|
|
199
|
+
}, onFilterReset && /*#__PURE__*/React.createElement(Button, _extends({
|
|
163
200
|
type: "primary",
|
|
164
|
-
|
|
165
|
-
|
|
201
|
+
onClick: handleReset,
|
|
202
|
+
ghost: true
|
|
203
|
+
}, cancelButtonProps), cancelText || '重置'), onFilterSearch && /*#__PURE__*/React.createElement(Button, _extends({
|
|
166
204
|
type: "primary",
|
|
167
205
|
style: {
|
|
168
206
|
marginLeft: 8
|
|
169
207
|
},
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
}, cancelButtonProps), cancelText || '重置'), filterFormLayout === 'horizontal' && collapseable && reFormItemGroup.length > columnNumberAndSize.columnNumber - 1 ? /*#__PURE__*/React.createElement(Button, {
|
|
208
|
+
htmlType: "submit"
|
|
209
|
+
}, confirmButtonProps), confirmText || '查询'), filterFormLayout === 'horizontal' && collapseable && reFormItemGroup.length > columnNumberAndSize.columnNumber - 1 ? /*#__PURE__*/React.createElement(Button, {
|
|
173
210
|
type: 'link',
|
|
174
211
|
onClick: function onClick() {
|
|
175
212
|
return setCollapsed(!collapsed);
|
|
@@ -334,7 +371,8 @@ var StandardFilter = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
334
371
|
layout: filterFormLayout,
|
|
335
372
|
form: filterFormRef,
|
|
336
373
|
collapseable: collapseable,
|
|
337
|
-
collapsed: collapsed
|
|
374
|
+
collapsed: collapsed,
|
|
375
|
+
parentNode: 'standardFilter'
|
|
338
376
|
// displayLayout={{labelCol: { span: 8 }, wrapperCol: { span: 16 },}}
|
|
339
377
|
,
|
|
340
378
|
doUpdateFormFields: function doUpdateFormFields() {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
3
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
3
4
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
4
5
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
@@ -29,19 +30,20 @@ var StepForm = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
29
30
|
formItemGroup = _providerConfig$props2 === void 0 ? [] : _providerConfig$props2,
|
|
30
31
|
_providerConfig$props3 = _providerConfig$props.grid,
|
|
31
32
|
grid = _providerConfig$props3 === void 0 ? 'md' : _providerConfig$props3,
|
|
32
|
-
|
|
33
|
+
_providerConfig$props4 = _providerConfig$props.layout,
|
|
34
|
+
layout = _providerConfig$props4 === void 0 ? 'horizontal' : _providerConfig$props4,
|
|
33
35
|
onSubmit = _providerConfig$props.onSubmit,
|
|
34
|
-
_providerConfig$
|
|
35
|
-
actionAlign = _providerConfig$
|
|
36
|
+
_providerConfig$props5 = _providerConfig$props.actionAlign,
|
|
37
|
+
actionAlign = _providerConfig$props5 === void 0 ? 'center' : _providerConfig$props5,
|
|
36
38
|
fieldStatus = _providerConfig$props.fieldStatus,
|
|
37
|
-
_providerConfig$
|
|
38
|
-
fieldSize = _providerConfig$
|
|
39
|
+
_providerConfig$props6 = _providerConfig$props.fieldSize,
|
|
40
|
+
fieldSize = _providerConfig$props6 === void 0 ? "middle" : _providerConfig$props6,
|
|
39
41
|
initialValues = _providerConfig$props.initialValues,
|
|
40
42
|
actionHide = _providerConfig$props.actionHide,
|
|
41
|
-
_providerConfig$
|
|
42
|
-
stepsConfig = _providerConfig$
|
|
43
|
+
_providerConfig$props7 = _providerConfig$props.stepsConfig,
|
|
44
|
+
stepsConfig = _providerConfig$props7 === void 0 ? {
|
|
43
45
|
current: 0
|
|
44
|
-
} : _providerConfig$
|
|
46
|
+
} : _providerConfig$props7,
|
|
45
47
|
stepClick = _providerConfig$props.stepClick,
|
|
46
48
|
displayLayout = _providerConfig$props.displayLayout;
|
|
47
49
|
var _useState = useState(),
|
|
@@ -214,7 +216,12 @@ var StepForm = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
214
216
|
onFinishFailed: function onFinishFailed() {
|
|
215
217
|
// setFieldFailed(true)
|
|
216
218
|
}
|
|
217
|
-
}, /*#__PURE__*/React.createElement(Steps,
|
|
219
|
+
}, /*#__PURE__*/React.createElement(Steps, _extends({
|
|
220
|
+
style: {
|
|
221
|
+
width: '80%',
|
|
222
|
+
margin: '0 auto'
|
|
223
|
+
}
|
|
224
|
+
}, stepsConfig), formItemGroup.filter(function (fItem) {
|
|
218
225
|
return !fItem.hideStep;
|
|
219
226
|
}).map(function (item, index) {
|
|
220
227
|
return /*#__PURE__*/React.createElement(Step, {
|
|
@@ -40,10 +40,10 @@ var StandardFormStyleFunc = function StandardFormStyleFunc(prefix) {
|
|
|
40
40
|
}
|
|
41
41
|
}), '.spec-standard-form', {
|
|
42
42
|
'.stepForm-content': {
|
|
43
|
-
margin: "".concat(token.
|
|
43
|
+
margin: "".concat(token.margin, "px 0px"),
|
|
44
44
|
'&.stepForm-content-vertical': {
|
|
45
45
|
'.standardForm-actions': {
|
|
46
|
-
marginTop: "".concat(token.
|
|
46
|
+
marginTop: "".concat(token.margin, "px")
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
49
|
}
|
|
@@ -15,7 +15,12 @@ var StandardPanelStyleFunc = function StandardPanelStyleFunc(prefix) {
|
|
|
15
15
|
return createStyleHook(prefix, function (token) {
|
|
16
16
|
var prefixCls = ".".concat(prefix);
|
|
17
17
|
return [_defineProperty(_defineProperty(_defineProperty({}, prefixCls, {
|
|
18
|
-
'.ant-modal-body ': _objectSpread({}, scrollBar(token)),
|
|
18
|
+
'.ant-modal-body ': _objectSpread(_objectSpread({}, scrollBar(token)), {}, {
|
|
19
|
+
padding: "".concat(token.paddingXS, "px 0")
|
|
20
|
+
}),
|
|
21
|
+
'&.ant-modal .ant-modal-footer .ant-btn + .ant-btn': {
|
|
22
|
+
marginInlineStart: token.marginXS
|
|
23
|
+
},
|
|
19
24
|
'.modalForm': {
|
|
20
25
|
'&.ant-form-horizontal .ant-form-item-label': {
|
|
21
26
|
'> label': {
|
|
@@ -36,7 +41,7 @@ var StandardPanelStyleFunc = function StandardPanelStyleFunc(prefix) {
|
|
|
36
41
|
borderLeft: " 4px solid ".concat(token.colorPrimary)
|
|
37
42
|
}
|
|
38
43
|
}), '.modalPanelTitle, .modal-grid-title', {
|
|
39
|
-
margin: "0 0 ".concat(token.
|
|
44
|
+
margin: "0 0 ".concat(token.margin, "px 0"),
|
|
40
45
|
paddingBottom: token.paddingXS,
|
|
41
46
|
borderBottom: "1px solid ".concat(token.colorBorder)
|
|
42
47
|
})];
|
|
@@ -160,10 +160,10 @@ var StandardTable = function StandardTable(props) {
|
|
|
160
160
|
className: classNames(componentName, 'standard-table', className, hashId),
|
|
161
161
|
bordered: false,
|
|
162
162
|
title: title,
|
|
163
|
-
extra: /*#__PURE__*/React.createElement(RenderExtraButtonGroup, {
|
|
163
|
+
extra: batchButtonGroup || buttonGroup ? /*#__PURE__*/React.createElement(RenderExtraButtonGroup, {
|
|
164
164
|
buttonGroup: buttonGroup,
|
|
165
165
|
batchButtonGroup: batchButtonGroup
|
|
166
|
-
})
|
|
166
|
+
}) : null
|
|
167
167
|
}, /*#__PURE__*/React.createElement(Table, _extends({
|
|
168
168
|
rowKey: rowKey || 'id',
|
|
169
169
|
rowSelection: rowSelection ? _objectSpread({
|
|
@@ -25,8 +25,8 @@ var StandardTableStyleFunc = function StandardTableStyleFunc(prefix) {
|
|
|
25
25
|
return [_defineProperty(_defineProperty(_defineProperty({}, prefixCls, {
|
|
26
26
|
'.spec-standard-table': {},
|
|
27
27
|
'.spec-pagination': {
|
|
28
|
-
padding:
|
|
29
|
-
background: token.colorBgBase
|
|
28
|
+
// padding: `${token.paddingSM}px 0 ${token.paddingXS}px 0`,
|
|
29
|
+
// background: token.colorBgBase,
|
|
30
30
|
},
|
|
31
31
|
'.ant-table-body': _objectSpread({}, scrollBar(token)),
|
|
32
32
|
'.spec-table-dropdown': {
|
|
@@ -7,19 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
.spec-pagination {
|
|
9
9
|
width: 100%;
|
|
10
|
-
margin-top: 0;
|
|
11
|
-
margin-bottom: 0;
|
|
12
|
-
//padding: @padding-sm 0 @padding-xs 0;
|
|
13
10
|
text-align: right;
|
|
14
|
-
//background: @background-color-base;
|
|
15
|
-
border-radius: 0;
|
|
16
|
-
|
|
17
|
-
.ant-pagination-total-text {
|
|
18
|
-
float: left;
|
|
19
|
-
flex:1;
|
|
20
|
-
text-align: left;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
11
|
.ant-pagination-options-size-changer.ant-select {
|
|
24
12
|
margin-right: 0
|
|
25
13
|
}
|
|
@@ -54,11 +42,6 @@
|
|
|
54
42
|
.ant-table-fixed-left .ant-table-thead > tr > th:first-child {
|
|
55
43
|
padding: 0;
|
|
56
44
|
}
|
|
57
|
-
|
|
58
|
-
.ant-table-body {
|
|
59
|
-
//.spec-scrollbar-base()
|
|
60
|
-
}
|
|
61
|
-
|
|
62
45
|
.spec-table-dropdown {
|
|
63
46
|
li a[disabled] {
|
|
64
47
|
//color: @disabled-bg;
|
|
@@ -72,12 +55,6 @@
|
|
|
72
55
|
//border-color: @error-color
|
|
73
56
|
}
|
|
74
57
|
|
|
75
|
-
.themeTech {
|
|
76
|
-
.standard-table .spec-pagination {
|
|
77
|
-
background: transparent;
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
|
|
81
58
|
.spec-pagination {
|
|
82
59
|
.ant-pagination-total-text {
|
|
83
60
|
float: left;
|
|
@@ -169,7 +146,6 @@
|
|
|
169
146
|
}
|
|
170
147
|
}
|
|
171
148
|
}
|
|
172
|
-
|
|
173
149
|
//.ant-table-tbody > tr.ant-table-expanded-row,
|
|
174
150
|
//.ant-table-tbody > tr.ant-table-expanded-row:hover {
|
|
175
151
|
// background: #f9f9fb;
|
|
@@ -105,6 +105,22 @@ declare const _default: {
|
|
|
105
105
|
span: number;
|
|
106
106
|
};
|
|
107
107
|
};
|
|
108
|
+
filterFormLayout: {
|
|
109
|
+
labelCol: {
|
|
110
|
+
span: number;
|
|
111
|
+
};
|
|
112
|
+
wrapperCol: {
|
|
113
|
+
span: number;
|
|
114
|
+
};
|
|
115
|
+
};
|
|
116
|
+
filterFormBlockLayout: {
|
|
117
|
+
labelCol: {
|
|
118
|
+
span: number;
|
|
119
|
+
};
|
|
120
|
+
wrapperCol: {
|
|
121
|
+
span: number;
|
|
122
|
+
};
|
|
123
|
+
};
|
|
108
124
|
};
|
|
109
125
|
md: {
|
|
110
126
|
columnNumber: number;
|
|
@@ -125,6 +141,22 @@ declare const _default: {
|
|
|
125
141
|
span: number;
|
|
126
142
|
};
|
|
127
143
|
};
|
|
144
|
+
filterFormLayout: {
|
|
145
|
+
labelCol: {
|
|
146
|
+
span: number;
|
|
147
|
+
};
|
|
148
|
+
wrapperCol: {
|
|
149
|
+
span: number;
|
|
150
|
+
};
|
|
151
|
+
};
|
|
152
|
+
filterFormBlockLayout: {
|
|
153
|
+
labelCol: {
|
|
154
|
+
span: number;
|
|
155
|
+
};
|
|
156
|
+
wrapperCol: {
|
|
157
|
+
span: number;
|
|
158
|
+
};
|
|
159
|
+
};
|
|
128
160
|
};
|
|
129
161
|
lg: {
|
|
130
162
|
columnNumber: number;
|
|
@@ -145,6 +177,22 @@ declare const _default: {
|
|
|
145
177
|
span: number;
|
|
146
178
|
};
|
|
147
179
|
};
|
|
180
|
+
filterFormLayout: {
|
|
181
|
+
labelCol: {
|
|
182
|
+
span: number;
|
|
183
|
+
};
|
|
184
|
+
wrapperCol: {
|
|
185
|
+
span: number;
|
|
186
|
+
};
|
|
187
|
+
};
|
|
188
|
+
filterFormBlockLayout: {
|
|
189
|
+
labelCol: {
|
|
190
|
+
span: number;
|
|
191
|
+
};
|
|
192
|
+
wrapperCol: {
|
|
193
|
+
span: number;
|
|
194
|
+
};
|
|
195
|
+
};
|
|
148
196
|
};
|
|
149
197
|
xlg: {
|
|
150
198
|
columnNumber: number;
|
|
@@ -165,6 +213,22 @@ declare const _default: {
|
|
|
165
213
|
span: number;
|
|
166
214
|
};
|
|
167
215
|
};
|
|
216
|
+
filterFormLayout: {
|
|
217
|
+
labelCol: {
|
|
218
|
+
span: number;
|
|
219
|
+
};
|
|
220
|
+
wrapperCol: {
|
|
221
|
+
span: number;
|
|
222
|
+
};
|
|
223
|
+
};
|
|
224
|
+
filterFormBlockLayout: {
|
|
225
|
+
labelCol: {
|
|
226
|
+
span: number;
|
|
227
|
+
};
|
|
228
|
+
wrapperCol: {
|
|
229
|
+
span: number;
|
|
230
|
+
};
|
|
231
|
+
};
|
|
168
232
|
};
|
|
169
233
|
xxlg: {
|
|
170
234
|
columnNumber: number;
|
|
@@ -98,18 +98,34 @@ export default {
|
|
|
98
98
|
width: 560,
|
|
99
99
|
formLayout: {
|
|
100
100
|
labelCol: {
|
|
101
|
-
span:
|
|
101
|
+
span: 7
|
|
102
102
|
},
|
|
103
103
|
wrapperCol: {
|
|
104
|
-
span:
|
|
104
|
+
span: 15
|
|
105
105
|
}
|
|
106
106
|
},
|
|
107
107
|
formBlockLayout: {
|
|
108
108
|
labelCol: {
|
|
109
|
-
span:
|
|
109
|
+
span: 7
|
|
110
110
|
},
|
|
111
111
|
wrapperCol: {
|
|
112
|
-
span:
|
|
112
|
+
span: 15
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
filterFormLayout: {
|
|
116
|
+
labelCol: {
|
|
117
|
+
span: 7
|
|
118
|
+
},
|
|
119
|
+
wrapperCol: {
|
|
120
|
+
span: 15
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
filterFormBlockLayout: {
|
|
124
|
+
labelCol: {
|
|
125
|
+
span: 7
|
|
126
|
+
},
|
|
127
|
+
wrapperCol: {
|
|
128
|
+
span: 15
|
|
113
129
|
}
|
|
114
130
|
}
|
|
115
131
|
},
|
|
@@ -132,6 +148,22 @@ export default {
|
|
|
132
148
|
wrapperCol: {
|
|
133
149
|
span: 19
|
|
134
150
|
}
|
|
151
|
+
},
|
|
152
|
+
filterFormLayout: {
|
|
153
|
+
labelCol: {
|
|
154
|
+
span: 8
|
|
155
|
+
},
|
|
156
|
+
wrapperCol: {
|
|
157
|
+
span: 16
|
|
158
|
+
}
|
|
159
|
+
},
|
|
160
|
+
filterFormBlockLayout: {
|
|
161
|
+
labelCol: {
|
|
162
|
+
span: 4
|
|
163
|
+
},
|
|
164
|
+
wrapperCol: {
|
|
165
|
+
span: 20
|
|
166
|
+
}
|
|
135
167
|
}
|
|
136
168
|
},
|
|
137
169
|
// 宽度大,1000px下
|
|
@@ -154,6 +186,22 @@ export default {
|
|
|
154
186
|
wrapperCol: {
|
|
155
187
|
span: 21
|
|
156
188
|
}
|
|
189
|
+
},
|
|
190
|
+
filterFormLayout: {
|
|
191
|
+
labelCol: {
|
|
192
|
+
span: 8
|
|
193
|
+
},
|
|
194
|
+
wrapperCol: {
|
|
195
|
+
span: 16
|
|
196
|
+
}
|
|
197
|
+
},
|
|
198
|
+
filterFormBlockLayout: {
|
|
199
|
+
labelCol: {
|
|
200
|
+
span: 4
|
|
201
|
+
},
|
|
202
|
+
wrapperCol: {
|
|
203
|
+
span: 20
|
|
204
|
+
}
|
|
157
205
|
}
|
|
158
206
|
},
|
|
159
207
|
// 超级宽度大,1200px下
|
|
@@ -176,6 +224,22 @@ export default {
|
|
|
176
224
|
wrapperCol: {
|
|
177
225
|
span: 21
|
|
178
226
|
}
|
|
227
|
+
},
|
|
228
|
+
filterFormLayout: {
|
|
229
|
+
labelCol: {
|
|
230
|
+
span: 8
|
|
231
|
+
},
|
|
232
|
+
wrapperCol: {
|
|
233
|
+
span: 16
|
|
234
|
+
}
|
|
235
|
+
},
|
|
236
|
+
filterFormBlockLayout: {
|
|
237
|
+
labelCol: {
|
|
238
|
+
span: 4
|
|
239
|
+
},
|
|
240
|
+
wrapperCol: {
|
|
241
|
+
span: 20
|
|
242
|
+
}
|
|
179
243
|
}
|
|
180
244
|
},
|
|
181
245
|
xxlg: {
|
package/es/theme/index.js
CHANGED
|
@@ -5,7 +5,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
5
5
|
import { TinyColor } from '@ctrl/tinycolor';
|
|
6
6
|
export var scrollBar = function scrollBar(token) {
|
|
7
7
|
return _defineProperty(_defineProperty(_defineProperty({}, '&::-webkit-scrollbar-track-piece', {
|
|
8
|
-
background: new TinyColor('#c1c1c1').setAlpha(0.
|
|
8
|
+
background: new TinyColor('#c1c1c1').setAlpha(0.02).toRgbString() // new TinyColor(token.colorPrimary).setAlpha(0.1)
|
|
9
9
|
}), '&::-webkit-scrollbar', {
|
|
10
10
|
width: '6px',
|
|
11
11
|
height: '6px'
|