@para-ui/core 4.0.0-rc → 4.0.0-rc.1
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/AutoBox/index.d.ts +1 -1
- package/AutoBox/index.js +12 -12
- package/AutoTips/autoTipsMultiline/index.d.ts +1 -1
- package/AutoTips/index.d.ts +2 -2
- package/AutoTips/index.js +12 -12
- package/Badge/index.d.ts +23 -0
- package/Badge/index.js +54 -0
- package/Breadcrumbs/index.js +8 -8
- package/Button/SplitButton.d.ts +1 -1
- package/Button/index.d.ts +1 -1
- package/Button/index.js +3 -3
- package/Carousel/index.d.ts +6 -6
- package/Carousel/index.js +5 -5
- package/Cascader/Cascader.d.ts +10 -10
- package/Cascader/OptionList/Column.d.ts +3 -3
- package/Cascader/OptionList/index.d.ts +2 -2
- package/Cascader/index.d.ts +1 -1
- package/Cascader/index.js +4 -2
- package/Cascader/lang/en_US.d.ts +5 -0
- package/Cascader/lang/index.d.ts +11 -0
- package/Cascader/lang/zh_CN.d.ts +5 -0
- package/Cascader/utils/treeUtil.d.ts +1 -1
- package/Checkbox/index.d.ts +1 -1
- package/Checkbox/index.js +4 -4
- package/CheckboxGroup/index.d.ts +2 -2
- package/CheckboxGroup/index.js +3 -3
- package/Collapse/index.js +4 -4
- package/CollapseBox/index.js +12 -20
- package/CollapseLayout/index.js +20 -20
- package/ColorPicker/index.js +2 -2
- package/ComboSelect/index.js +43 -52
- package/ComboSelect/interface.d.ts +3 -3
- package/Container/index.d.ts +3 -3
- package/Container/index.js +56 -56
- package/CopyText/index.d.ts +2 -2
- package/DatePicker/generatePicker/index.d.ts +22 -22
- package/DatePicker/index.js +8 -7
- package/DatePicker/util.d.ts +1 -1
- package/Desktop/index.d.ts +1 -1
- package/Desktop/index.js +18 -13
- package/DragVerify/index.d.ts +1 -1
- package/DragVerify/index.js +13 -13
- package/Drawer/index.js +29 -33
- package/Drawer/interface.d.ts +2 -2
- package/Dropdown/index.d.ts +1 -1
- package/DynamicMultiBox/formItem.d.ts +1 -1
- package/DynamicMultiBox/index.d.ts +1 -1
- package/DynamicMultiBox/index.js +38 -35
- package/DynamicMultiBox/interface.d.ts +8 -8
- package/DynamicMultiBox/rowForm.d.ts +3 -1
- package/Empty/index.d.ts +1 -1
- package/Empty/index.js +2 -2
- package/Form/index.d.ts +12 -13
- package/Form/index.js +10 -8
- package/FormItem/compoments/defaultCompoments/index.d.ts +4 -4
- package/FormItem/compoments/formCheckboxGroup/index.d.ts +1 -1
- package/FormItem/compoments/formFile/index.d.ts +2 -2
- package/FormItem/compoments/formRadioGroup/index.d.ts +1 -1
- package/FormItem/compoments/formSelect/index.d.ts +7 -7
- package/FormItem/errorTips.d.ts +3 -3
- package/FormItem/index.d.ts +5 -5
- package/FormItem/index.js +3 -2
- package/FormItem/lang/en_US.d.ts +10 -0
- package/FormItem/lang/index.d.ts +21 -0
- package/FormItem/lang/zh_CN.d.ts +10 -0
- package/FormItem/validateFunction.d.ts +1 -1
- package/FunctionModal/dialog.d.ts +26 -26
- package/FunctionModal/index.d.ts +6 -6
- package/FunctionModal/index.js +6 -6
- package/FunctionModal/modalContext.d.ts +3 -3
- package/GlobalContext/componentsProps.d.ts +7 -7
- package/GlobalContext/index.d.ts +2 -2
- package/GlobalContext/useFormatMessage.d.ts +1 -1
- package/Help/index.js +1 -1
- package/HelperText/index.js +1 -1
- package/InputLang/index.d.ts +2 -2
- package/InputLang/index.js +8 -8
- package/InputNumber/index.d.ts +2 -2
- package/InputNumber/index.js +3 -3
- package/Label/index.js +2 -2
- package/Loading/index.js +1 -1
- package/Menu/index.js +14 -14
- package/Menu/interface.d.ts +1 -1
- package/Message/index.js +12 -12
- package/Modal/Confirm/index.d.ts +3 -3
- package/Modal/index.d.ts +1 -1
- package/Modal/index.js +5 -5
- package/MultiBox/index.d.ts +2 -2
- package/MultiBox/index.js +3 -3
- package/Notification/index.js +1 -1
- package/OperateBtn/index.d.ts +2 -2
- package/OperateBtn/index.js +40 -36
- package/PageHeader/index.js +30 -30
- package/PageHeader/interface.d.ts +1 -1
- package/Pagination/index.d.ts +1 -1
- package/Pagination/index.js +17 -17
- package/PasswordRules/index.js +7 -7
- package/PopConfirm/index.js +3 -3
- package/Progress/Line.d.ts +10 -10
- package/Progress/Steps.d.ts +2 -2
- package/Progress/index.d.ts +12 -12
- package/Progress/index.js +40 -40
- package/Progress/utils.d.ts +4 -4
- package/Querying/index.d.ts +1 -1
- package/Querying/index.js +2 -2
- package/README.md +3 -0
- package/Radio/index.d.ts +1 -1
- package/Radio/index.js +4 -4
- package/RadioGroup/index.d.ts +2 -2
- package/RadioGroup/index.js +3 -3
- package/Search/index.js +1 -1
- package/Select/index.d.ts +3 -3
- package/Select/index.js +42 -42
- package/SelectInput/index.js +2 -2
- package/Selector/index.js +15 -15
- package/Selector/interface.d.ts +6 -6
- package/SelectorPicker/index.d.ts +4 -4
- package/SelectorPicker/index.js +9 -9
- package/SingleBox/index.d.ts +2 -2
- package/SingleBox/index.js +3 -3
- package/Slider/interface.d.ts +1 -1
- package/Status/index.d.ts +4 -4
- package/Status/index.js +4 -4
- package/Stepper/index.d.ts +5 -5
- package/Stepper/index.js +23 -23
- package/Switch/index.d.ts +7 -7
- package/Switch/index.js +23 -5
- package/Switch/lang/en_US.d.ts +4 -0
- package/Switch/lang/index.d.ts +9 -0
- package/Switch/lang/zh_CN.d.ts +4 -0
- package/Table/index.js +34 -34
- package/Table/interface.d.ts +4 -4
- package/Table/tableBodyElement/index.d.ts +1 -1
- package/Table/tableBodyInterface.d.ts +2 -2
- package/Table/tableContainer/index.d.ts +1 -1
- package/Table/tableElement/index.d.ts +1 -1
- package/Table/tableHeadElement/index.d.ts +1 -1
- package/Table/tableHeadInterface.d.ts +1 -1
- package/Table/tablePaginationInterface.d.ts +6 -6
- package/Table/tdElement/index.d.ts +1 -1
- package/Table/thElement/index.d.ts +2 -2
- package/Table/trElement/index.d.ts +1 -1
- package/Table/util.d.ts +1 -1
- package/Tabs/index.d.ts +1 -1
- package/Tabs/index.js +25 -17
- package/Tag/TagGroup.d.ts +5 -5
- package/Tag/index.d.ts +7 -7
- package/Tag/index.js +25 -25
- package/TextEditor/index.d.ts +2 -2
- package/TextEditor/index.js +45 -27
- package/TextEditor/lang/en_US.d.ts +4 -0
- package/TextEditor/lang/index.d.ts +9 -0
- package/TextEditor/lang/zh_CN.d.ts +4 -0
- package/TextField/index.d.ts +1 -1
- package/TextField/index.js +13 -13
- package/TimePicker/index.d.ts +1 -1
- package/TimePicker/index.js +1 -1
- package/Timeline/TimelineItem.d.ts +1 -1
- package/Timeline/index.d.ts +5 -5
- package/Timeline/index.js +14 -14
- package/Title/index.d.ts +4 -4
- package/Title/index.js +3 -3
- package/ToggleButton/ToggleButtonGroup.d.ts +1 -1
- package/ToggleButton/index.d.ts +5 -1
- package/ToggleButton/index.js +17 -10
- package/Transfer/box.d.ts +6 -6
- package/Transfer/index.js +21 -21
- package/Tree/OperateBar/index.d.ts +4 -4
- package/Tree/Tree.d.ts +2 -2
- package/Tree/index.js +2 -2
- package/Tree/interface.d.ts +4 -4
- package/Tree/utils/tools.d.ts +1 -1
- package/Upload/Dragger/index.d.ts +2 -2
- package/Upload/ErroTip/index.d.ts +1 -1
- package/Upload/index.d.ts +2 -2
- package/Upload/index.js +7 -7
- package/Upload/interface.d.ts +1 -1
- package/_verture/{index-8469865e.js → index-0f315bca.js} +2 -2
- package/_verture/{index-e1b800aa.js → index-92e406f4.js} +48 -24
- package/_verture/{index-47297a40.js → index-bc461491.js} +45 -45
- package/_verture/{index-1c8d3e94.js → index-d251967e.js} +101 -47
- package/_verture/{modalContext-670eab09.js → modalContext-9299acc9.js} +25 -25
- package/index.d.ts +2 -0
- package/index.js +8 -7
- package/locale/en-US.d.ts +19 -0
- package/locale/index.d.ts +38 -0
- package/locale/index.js +39 -1
- package/locale/zh-CN.d.ts +19 -0
- package/package.json +3 -1
- package/umd/AutoBox.js +1 -1
- package/umd/AutoTips.js +1 -1
- package/umd/Badge.js +1 -0
- package/umd/Breadcrumbs.js +1 -1
- package/umd/Button.js +2 -2
- package/umd/ButtonGroup.js +2 -2
- package/umd/Cascader.js +5 -5
- package/umd/Checkbox.js +1 -1
- package/umd/CheckboxGroup.js +1 -1
- package/umd/Collapse.js +1 -1
- package/umd/CollapseBox.js +1 -1
- package/umd/CollapseLayout.js +4 -4
- package/umd/ComboSelect.js +4 -4
- package/umd/CopyText.js +1 -1
- package/umd/DatePicker.js +2 -2
- package/umd/Desktop.js +2 -2
- package/umd/DragVerify.js +4 -4
- package/umd/Drawer.js +2 -2
- package/umd/DynamicMultiBox.js +4 -4
- package/umd/Form.js +4 -4
- package/umd/FormItem.js +4 -4
- package/umd/FunctionModal.js +2 -2
- package/umd/Help.js +1 -1
- package/umd/HelperText.js +1 -1
- package/umd/InputLang.js +1 -1
- package/umd/InputNumber.js +1 -1
- package/umd/Label.js +1 -1
- package/umd/Loading.js +1 -1
- package/umd/Menu.js +2 -2
- package/umd/Message.js +1 -1
- package/umd/Modal.js +2 -2
- package/umd/MultiBox.js +7 -7
- package/umd/Notification.js +1 -1
- package/umd/OperateBtn.js +2 -2
- package/umd/PageHeader.js +2 -2
- package/umd/Pagination.js +4 -4
- package/umd/PasswordRules.js +4 -4
- package/umd/PopConfirm.js +2 -2
- package/umd/Progress.js +1 -1
- package/umd/Radio.js +1 -1
- package/umd/RadioGroup.js +1 -1
- package/umd/Search.js +7 -7
- package/umd/Select.js +1 -1
- package/umd/SelectInput.js +1 -1
- package/umd/Selector.js +1 -1
- package/umd/SelectorPicker.js +1 -1
- package/umd/SingleBox.js +1 -1
- package/umd/Stepper.js +1 -1
- package/umd/Switch.js +4 -4
- package/umd/Table.js +2 -2
- package/umd/Tabs.js +4 -4
- package/umd/Tag.js +1 -1
- package/umd/TextEditor.js +2 -2
- package/umd/TextField.js +7 -7
- package/umd/TimePicker.js +2 -2
- package/umd/Title.js +1 -1
- package/umd/ToggleButton.js +4 -4
- package/umd/Transfer.js +2 -2
- package/umd/Tree.js +1 -1
- package/umd/Upload.js +2 -2
- package/umd/locale.js +1 -1
package/Table/index.js
CHANGED
|
@@ -100,14 +100,14 @@ var handGetReqParams = function handGetReqParams(obj) {
|
|
|
100
100
|
} else {
|
|
101
101
|
val = encodeURIComponent(val);
|
|
102
102
|
}
|
|
103
|
-
paramsArr.push(key
|
|
103
|
+
paramsArr.push("".concat(key, "=").concat(val));
|
|
104
104
|
}
|
|
105
105
|
var paramsStr = paramsArr.join('&');
|
|
106
106
|
var pos = str.indexOf('?');
|
|
107
107
|
if (pos !== -1) {
|
|
108
108
|
str += (pos === str.length - 1 ? '' : '&') + paramsStr;
|
|
109
109
|
} else {
|
|
110
|
-
str +=
|
|
110
|
+
str += "?".concat(paramsStr);
|
|
111
111
|
}
|
|
112
112
|
return str;
|
|
113
113
|
};
|
|
@@ -116,7 +116,7 @@ var handGetReqParams = function handGetReqParams(obj) {
|
|
|
116
116
|
* */
|
|
117
117
|
var getStringInNumber = function getStringInNumber(str) {
|
|
118
118
|
if (typeof str === 'number') return str;
|
|
119
|
-
var strHand = str.replace(/[^0-9$]/
|
|
119
|
+
var strHand = str.replace(/[^0-9$]/gi, '');
|
|
120
120
|
return Number(strHand);
|
|
121
121
|
};
|
|
122
122
|
/**
|
|
@@ -185,7 +185,7 @@ var TableHeadElement = function TableHeadElement(props) {
|
|
|
185
185
|
otherProps = __rest(props, ["className", "style", "children"]);
|
|
186
186
|
var handClass = function handClass() {
|
|
187
187
|
var str = 'table-head-element';
|
|
188
|
-
if (className) str +=
|
|
188
|
+
if (className) str += " ".concat(className);
|
|
189
189
|
return str;
|
|
190
190
|
};
|
|
191
191
|
return jsx("thead", Object.assign({
|
|
@@ -206,7 +206,7 @@ var TrElement = function TrElement(props) {
|
|
|
206
206
|
otherProps = __rest(props, ["className", "style", "children"]);
|
|
207
207
|
var handClass = function handClass() {
|
|
208
208
|
var str = 'tr-element';
|
|
209
|
-
if (className) str +=
|
|
209
|
+
if (className) str += " ".concat(className);
|
|
210
210
|
return str;
|
|
211
211
|
};
|
|
212
212
|
return jsx("tr", Object.assign({
|
|
@@ -266,14 +266,14 @@ var ThElement = function ThElement(props) {
|
|
|
266
266
|
// 鼠标移动事件
|
|
267
267
|
var mousemove = function mousemove(e) {
|
|
268
268
|
var result = handMinWidth(e);
|
|
269
|
-
constData.current.lineDom.style.left = result.left
|
|
269
|
+
constData.current.lineDom.style.left = "".concat(result.left, "px");
|
|
270
270
|
};
|
|
271
271
|
// 鼠标抬起
|
|
272
272
|
var mouseup = function mouseup(e) {
|
|
273
273
|
var _a, _b;
|
|
274
274
|
var dom = domRef.current;
|
|
275
275
|
var result = handMinWidth(e);
|
|
276
|
-
dom.style.width = result.width
|
|
276
|
+
dom.style.width = "".concat(result.width, "px");
|
|
277
277
|
(_a = constData.current.tableContainer) === null || _a === void 0 ? void 0 : _a.removeChild(constData.current.lineDom);
|
|
278
278
|
(_b = constData.current.table) === null || _b === void 0 ? void 0 : _b.classList.remove("".concat($prefixCls, "-table-draggable"));
|
|
279
279
|
onDragDown && onDragDown(result);
|
|
@@ -301,9 +301,9 @@ var ThElement = function ThElement(props) {
|
|
|
301
301
|
var div = document.createElement('div');
|
|
302
302
|
div.setAttribute('class', 'table-pos-line');
|
|
303
303
|
// 定位线高度
|
|
304
|
-
div.style.height = (tableDomHeight > tableContainerHeight ? tableContainerHeight : tableDomHeight
|
|
304
|
+
div.style.height = "".concat(tableDomHeight > tableContainerHeight ? tableContainerHeight : tableDomHeight, "px");
|
|
305
305
|
// 定位线的居左距离
|
|
306
|
-
div.style.left = constData.current.th.offsetLeft + constData.current.th.offsetWidth
|
|
306
|
+
div.style.left = "".concat(constData.current.th.offsetLeft + constData.current.th.offsetWidth, "px");
|
|
307
307
|
constData.current.lineDom = div;
|
|
308
308
|
constData.current.tableContainer.appendChild(div);
|
|
309
309
|
};
|
|
@@ -319,7 +319,7 @@ var ThElement = function ThElement(props) {
|
|
|
319
319
|
var handClass = function handClass() {
|
|
320
320
|
var str = 'th-element';
|
|
321
321
|
if (draggable) str += ' th-element-draggable';
|
|
322
|
-
if (className) str +=
|
|
322
|
+
if (className) str += " ".concat(className);
|
|
323
323
|
return str;
|
|
324
324
|
};
|
|
325
325
|
return jsxs("th", Object.assign({
|
|
@@ -765,7 +765,7 @@ var TableHead$1 = function TableHead(props) {
|
|
|
765
765
|
var w = item.width || '';
|
|
766
766
|
var name = item.name || '';
|
|
767
767
|
var wDrag = headDataConfig[name] && headDataConfig[name].width;
|
|
768
|
-
if (wDrag) w = wDrag
|
|
768
|
+
if (wDrag) w = "".concat(wDrag, "px");
|
|
769
769
|
return w;
|
|
770
770
|
};
|
|
771
771
|
// 内容列memo
|
|
@@ -781,7 +781,7 @@ var TableHead$1 = function TableHead(props) {
|
|
|
781
781
|
var str = '';
|
|
782
782
|
if (item.className) str += item.className;
|
|
783
783
|
if (fixedColumn && item.fixed) {
|
|
784
|
-
str +=
|
|
784
|
+
str += " table-fixed-dom-".concat(item.fixed);
|
|
785
785
|
// 固定左边,判断是否是最后一个
|
|
786
786
|
if (item.fixed === 'left' && item.paraui_fixed_left_last) {
|
|
787
787
|
str += ' table-fixed-dom-left-last';
|
|
@@ -799,10 +799,10 @@ var TableHead$1 = function TableHead(props) {
|
|
|
799
799
|
};
|
|
800
800
|
if (fixedColumn && item.fixed && item.width) {
|
|
801
801
|
if (item.fixed === 'left') {
|
|
802
|
-
json.left = item.paraui_left_width
|
|
802
|
+
json.left = "".concat(item.paraui_left_width, "px");
|
|
803
803
|
}
|
|
804
804
|
if (item.fixed === 'right') {
|
|
805
|
-
json.right = item.paraui_right_width
|
|
805
|
+
json.right = "".concat(item.paraui_right_width, "px");
|
|
806
806
|
}
|
|
807
807
|
}
|
|
808
808
|
return Object.assign(Object.assign({}, json), item.style);
|
|
@@ -896,7 +896,7 @@ var TableHead$1 = function TableHead(props) {
|
|
|
896
896
|
width: operate.width
|
|
897
897
|
};
|
|
898
898
|
if (fixedColumn) {
|
|
899
|
-
json.right = showColumns ===
|
|
899
|
+
json.right = showColumns === 'inside' ? '53px' : '0px';
|
|
900
900
|
}
|
|
901
901
|
return Object.assign(Object.assign({}, json), operate.style);
|
|
902
902
|
};
|
|
@@ -1032,7 +1032,7 @@ var TableBodyElement = function TableBodyElement(props) {
|
|
|
1032
1032
|
otherProps = __rest(props, ["className", "style", "children"]);
|
|
1033
1033
|
var handClass = function handClass() {
|
|
1034
1034
|
var str = 'table-body-element';
|
|
1035
|
-
if (className) str +=
|
|
1035
|
+
if (className) str += " ".concat(className);
|
|
1036
1036
|
return str;
|
|
1037
1037
|
};
|
|
1038
1038
|
return jsx("tbody", Object.assign({
|
|
@@ -1053,7 +1053,7 @@ var TdElement = function TdElement(props) {
|
|
|
1053
1053
|
otherProps = __rest(props, ["className", "style", "children"]);
|
|
1054
1054
|
var handClass = function handClass() {
|
|
1055
1055
|
var str = 'td-element';
|
|
1056
|
-
if (className) str +=
|
|
1056
|
+
if (className) str += " ".concat(className);
|
|
1057
1057
|
return str;
|
|
1058
1058
|
};
|
|
1059
1059
|
return jsx("td", Object.assign({
|
|
@@ -1260,7 +1260,7 @@ var TableBody = function TableBody(props) {
|
|
|
1260
1260
|
// 处理className
|
|
1261
1261
|
var handClassNoData = function handClassNoData() {
|
|
1262
1262
|
var str = 'table-no-data';
|
|
1263
|
-
if (emptyProps === null || emptyProps === void 0 ? void 0 : emptyProps.size) str +=
|
|
1263
|
+
if (emptyProps === null || emptyProps === void 0 ? void 0 : emptyProps.size) str += " table-no-data-".concat(emptyProps === null || emptyProps === void 0 ? void 0 : emptyProps.size);
|
|
1264
1264
|
return str;
|
|
1265
1265
|
};
|
|
1266
1266
|
return jsx(TrElement, Object.assign({
|
|
@@ -1412,7 +1412,7 @@ var TableBody = function TableBody(props) {
|
|
|
1412
1412
|
};
|
|
1413
1413
|
var handContentClass = function handContentClass(item) {
|
|
1414
1414
|
var str = 'table-content-columms';
|
|
1415
|
-
if (item.className) str +=
|
|
1415
|
+
if (item.className) str += " ".concat(item.className);
|
|
1416
1416
|
// 排序
|
|
1417
1417
|
if (sortTable && item.name && item.sort !== false) {
|
|
1418
1418
|
var index = orderFieldArr.indexOf(item.name);
|
|
@@ -1428,7 +1428,7 @@ var TableBody = function TableBody(props) {
|
|
|
1428
1428
|
}
|
|
1429
1429
|
}
|
|
1430
1430
|
if (item.fixed && fixedColumn) {
|
|
1431
|
-
str +=
|
|
1431
|
+
str += " table-fixed-dom-".concat(item.fixed);
|
|
1432
1432
|
// 固定左边,判断是否是最后一个
|
|
1433
1433
|
if (item.fixed === 'left' && item.paraui_fixed_left_last) {
|
|
1434
1434
|
str += ' table-fixed-dom-left-last';
|
|
@@ -1444,10 +1444,10 @@ var TableBody = function TableBody(props) {
|
|
|
1444
1444
|
var json = {};
|
|
1445
1445
|
if (fixedColumn && item.fixed && item.width) {
|
|
1446
1446
|
if (item.fixed === 'left') {
|
|
1447
|
-
json.left = item.paraui_left_width
|
|
1447
|
+
json.left = "".concat(item.paraui_left_width, "px");
|
|
1448
1448
|
}
|
|
1449
1449
|
if (item.fixed === 'right') {
|
|
1450
|
-
json.right = item.paraui_right_width
|
|
1450
|
+
json.right = "".concat(item.paraui_right_width, "px");
|
|
1451
1451
|
}
|
|
1452
1452
|
}
|
|
1453
1453
|
return json;
|
|
@@ -1480,7 +1480,7 @@ var TableBody = function TableBody(props) {
|
|
|
1480
1480
|
var TableOperateUseCallback = useCallback(function (row, rowIndex) {
|
|
1481
1481
|
if (operate) {
|
|
1482
1482
|
var colSpan = 1;
|
|
1483
|
-
if (showColumns ===
|
|
1483
|
+
if (showColumns === 'inside') colSpan = 2;
|
|
1484
1484
|
var handOperate = function handOperate() {
|
|
1485
1485
|
if (operate.render) return operate.render(row);
|
|
1486
1486
|
if (operate.operateBtnRender) {
|
|
@@ -1539,7 +1539,7 @@ var TableBody = function TableBody(props) {
|
|
|
1539
1539
|
return jsx(TrElement, Object.assign({
|
|
1540
1540
|
className: "more-table-row",
|
|
1541
1541
|
style: {
|
|
1542
|
-
height: lineHeight
|
|
1542
|
+
height: "".concat(lineHeight, "px")
|
|
1543
1543
|
},
|
|
1544
1544
|
onClick: clickMore
|
|
1545
1545
|
}, {
|
|
@@ -1562,13 +1562,13 @@ var TableBody = function TableBody(props) {
|
|
|
1562
1562
|
children: rowData.map(function (row, index) {
|
|
1563
1563
|
var str = 'table-body-row';
|
|
1564
1564
|
if (rowClassMapping && rowClassMapping[row[rowKey]]) {
|
|
1565
|
-
str +=
|
|
1565
|
+
str += " ".concat(rowClassMapping[row[rowKey]]);
|
|
1566
1566
|
}
|
|
1567
1567
|
return jsxs(Fragment$1, {
|
|
1568
1568
|
children: [jsxs(TrElement, Object.assign({
|
|
1569
1569
|
className: str,
|
|
1570
1570
|
style: {
|
|
1571
|
-
height: lineHeight
|
|
1571
|
+
height: "".concat(lineHeight, "px")
|
|
1572
1572
|
},
|
|
1573
1573
|
onClick: function onClick(e) {
|
|
1574
1574
|
onClickRow && onClickRow(row, e);
|
|
@@ -1730,7 +1730,7 @@ var TableContainer = function TableContainer(props) {
|
|
|
1730
1730
|
otherProps = __rest(props, ["cRef", "className", "style", "children"]);
|
|
1731
1731
|
var handClass = function handClass() {
|
|
1732
1732
|
var str = 'table-container';
|
|
1733
|
-
if (className) str +=
|
|
1733
|
+
if (className) str += " ".concat(className);
|
|
1734
1734
|
return str;
|
|
1735
1735
|
};
|
|
1736
1736
|
return jsx("div", Object.assign({
|
|
@@ -1754,7 +1754,7 @@ var TableElement = function TableElement(props) {
|
|
|
1754
1754
|
var handClass = function handClass() {
|
|
1755
1755
|
var str = 'table-element';
|
|
1756
1756
|
if (fixedColumn) str += ' table-element-fixed-column';
|
|
1757
|
-
if (className) str +=
|
|
1757
|
+
if (className) str += " ".concat(className);
|
|
1758
1758
|
return str;
|
|
1759
1759
|
};
|
|
1760
1760
|
return jsx("table", Object.assign({
|
|
@@ -2278,7 +2278,7 @@ var Table = function Table(propsInit) {
|
|
|
2278
2278
|
/** 处理本地搜索, 返回true满足搜索条件 */
|
|
2279
2279
|
var handLocalSearch = function handLocalSearch(item) {
|
|
2280
2280
|
var searchKey;
|
|
2281
|
-
if (constData.current.search && typeof constData.current.search !==
|
|
2281
|
+
if (constData.current.search && typeof constData.current.search !== 'string' && constData.current.search.searchKey) {
|
|
2282
2282
|
searchKey = constData.current.search.searchKey;
|
|
2283
2283
|
}
|
|
2284
2284
|
if (searchKey !== undefined && constData.current.searchKeyName && constData.current.searchKeyName.length > 0) {
|
|
@@ -2307,7 +2307,7 @@ var Table = function Table(propsInit) {
|
|
|
2307
2307
|
}
|
|
2308
2308
|
// url
|
|
2309
2309
|
if (props.url) {
|
|
2310
|
-
return props.url
|
|
2310
|
+
return "".concat(props.url, "_").concat(props.method || 'Get');
|
|
2311
2311
|
}
|
|
2312
2312
|
return '';
|
|
2313
2313
|
};
|
|
@@ -2417,7 +2417,7 @@ var Table = function Table(propsInit) {
|
|
|
2417
2417
|
for (var i = 0, l = arr.length; i < l; i++) {
|
|
2418
2418
|
var item = arr[i];
|
|
2419
2419
|
var name = item.name || '';
|
|
2420
|
-
if (typeof item.width === 'number') item.width = item.width
|
|
2420
|
+
if (typeof item.width === 'number') item.width = "".concat(item.width, "px");
|
|
2421
2421
|
if (!bol) item.orderNum = i;
|
|
2422
2422
|
handHeadShow(item, headShowArr, localHead);
|
|
2423
2423
|
headArr.push(item);
|
|
@@ -3083,7 +3083,7 @@ var Table = function Table(propsInit) {
|
|
|
3083
3083
|
};
|
|
3084
3084
|
// 处理class
|
|
3085
3085
|
var handClass = function handClass() {
|
|
3086
|
-
var str = $prefixCls
|
|
3086
|
+
var str = "".concat($prefixCls, "-table");
|
|
3087
3087
|
if (showColumns === 'inside') str += " ".concat($prefixCls, "-table-columns-inside");
|
|
3088
3088
|
if (pagination) str += " ".concat($prefixCls, "-table-pagination");
|
|
3089
3089
|
if (loadMore) str += " ".concat($prefixCls, "-table-load-more");
|
|
@@ -3095,7 +3095,7 @@ var Table = function Table(propsInit) {
|
|
|
3095
3095
|
if (expandable) str += " ".concat($prefixCls, "-table-expandable");
|
|
3096
3096
|
if (rowData.length === 0) str += " ".concat($prefixCls, "-table-no-data");
|
|
3097
3097
|
if (loadState) str += " ".concat($prefixCls, "-table-load");
|
|
3098
|
-
if (className) str +=
|
|
3098
|
+
if (className) str += " ".concat(className);
|
|
3099
3099
|
return str;
|
|
3100
3100
|
};
|
|
3101
3101
|
// 改变屏幕大小
|
|
@@ -3117,7 +3117,7 @@ var Table = function Table(propsInit) {
|
|
|
3117
3117
|
children: jsxs(TableElement, Object.assign({
|
|
3118
3118
|
fixedColumn: fixedColumn,
|
|
3119
3119
|
style: {
|
|
3120
|
-
minWidth: tableMinWidth
|
|
3120
|
+
minWidth: "".concat(tableMinWidth, "px")
|
|
3121
3121
|
}
|
|
3122
3122
|
}, {
|
|
3123
3123
|
children: [TableHeadMemo, TableBodyMemo]
|
package/Table/interface.d.ts
CHANGED
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
* @description 表格
|
|
5
5
|
*/
|
|
6
6
|
import React, { ReactNode } from 'react';
|
|
7
|
-
import { EmptyProps } from
|
|
8
|
-
import { OperateBtnProps } from
|
|
9
|
-
import { PaginationFlippingArrow, PaginationLayout } from
|
|
7
|
+
import { EmptyProps } from '../Empty';
|
|
8
|
+
import { OperateBtnProps } from '../OperateBtn';
|
|
9
|
+
import { PaginationFlippingArrow, PaginationLayout } from '../Pagination';
|
|
10
10
|
/** 任意类型 */
|
|
11
11
|
export interface Anyjson {
|
|
12
12
|
[name: string]: any;
|
|
@@ -290,7 +290,7 @@ export interface TableProps extends TableHeadBodyPublicProps {
|
|
|
290
290
|
* 返回true,走组件内部错误处理
|
|
291
291
|
* 不返回或者返回false,走外部逻辑
|
|
292
292
|
* */
|
|
293
|
-
onError?: (err: any) =>
|
|
293
|
+
onError?: (err: any) => Promise<boolean | void> | (boolean | void);
|
|
294
294
|
[key: string]: any;
|
|
295
295
|
}
|
|
296
296
|
export interface ExpandableRowItem {
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
* @date 2021/8/6 11:06
|
|
4
4
|
* @description 表格内容参数
|
|
5
5
|
*/
|
|
6
|
-
import React, { ReactNode } from
|
|
6
|
+
import React, { ReactNode } from 'react';
|
|
7
7
|
import { TableHeadBodyPublicProps, Anyjson, ExpandableStatus } from './interface';
|
|
8
|
-
import { EmptyProps } from
|
|
8
|
+
import { EmptyProps } from '../Empty';
|
|
9
9
|
/** 表格头部参数 */
|
|
10
10
|
export interface TableBodyProps extends TableHeadBodyPublicProps {
|
|
11
11
|
/** 请求地址 */
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import React from 'react';
|
|
7
7
|
import { TableHeadBodyPublicProps, SelectStatus, HeadDataProps } from './interface';
|
|
8
|
-
import { DragResultProps } from
|
|
8
|
+
import { DragResultProps } from './thElement';
|
|
9
9
|
/** 表格头部参数 */
|
|
10
10
|
export interface TableHeadProps extends TableHeadBodyPublicProps {
|
|
11
11
|
/** 是否拖动列 */
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
/**
|
|
3
|
-
* @author linhd
|
|
4
|
-
* @date 2021/8/6 11:07
|
|
5
|
-
* @description 表格分页参数
|
|
6
|
-
*/
|
|
7
|
-
import { PaginationFlippingArrow, PaginationLayout } from
|
|
8
|
-
import { SelectStatus } from
|
|
3
|
+
* @author linhd
|
|
4
|
+
* @date 2021/8/6 11:07
|
|
5
|
+
* @description 表格分页参数
|
|
6
|
+
*/
|
|
7
|
+
import { PaginationFlippingArrow, PaginationLayout } from '../Pagination';
|
|
8
|
+
import { SelectStatus } from './interface';
|
|
9
9
|
/** 表格分页参数 */
|
|
10
10
|
export interface TablePaginationProps {
|
|
11
11
|
/** 内置刷新 */
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
* @date 2022/4/26 11:00 AM
|
|
4
4
|
* @description 表格th元素
|
|
5
5
|
*/
|
|
6
|
-
import React, { FunctionComponent } from
|
|
7
|
-
import { HeadDataProps } from
|
|
6
|
+
import React, { FunctionComponent } from 'react';
|
|
7
|
+
import { HeadDataProps } from '../interface';
|
|
8
8
|
import './index.scss';
|
|
9
9
|
export interface DragResultProps {
|
|
10
10
|
width: number;
|
package/Table/util.d.ts
CHANGED
package/Tabs/index.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ import React, { FC, ReactNode } from 'react';
|
|
|
7
7
|
import { TabPane, TabsProps as RcTabsProps, TabPaneProps } from 'rc-tabs';
|
|
8
8
|
import { PopConfirmProps } from '../PopConfirm';
|
|
9
9
|
import { HelpProps } from '../Help';
|
|
10
|
-
import { TooltipProps } from
|
|
10
|
+
import { TooltipProps } from '../Tooltip';
|
|
11
11
|
import './index.scss';
|
|
12
12
|
export type TabsType = 'line' | 'card' | 'editable-card' | 'track' | 'card-container';
|
|
13
13
|
export type { TabPaneProps };
|
package/Tabs/index.js
CHANGED
|
@@ -84,6 +84,7 @@ var Tabs = function Tabs(props) {
|
|
|
84
84
|
var intl = useFormatMessage('Tabs', localeJson);
|
|
85
85
|
var prefixCls = "".concat($prefixCls, "-tabs");
|
|
86
86
|
var inType = type !== null && type !== void 0 ? type : mode;
|
|
87
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
87
88
|
var _useState = useState(defaultRadioValue),
|
|
88
89
|
_useState2 = _slicedToArray(_useState, 2),
|
|
89
90
|
radioValueCom = _useState2[0],
|
|
@@ -91,10 +92,25 @@ var Tabs = function Tabs(props) {
|
|
|
91
92
|
useEffect(function () {
|
|
92
93
|
radioValue !== undefined && setRadioValueCom(radioValue);
|
|
93
94
|
}, [radioValue]);
|
|
95
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
94
96
|
var onRadioChangeCom = function onRadioChangeCom(val) {
|
|
95
97
|
radioValue === undefined && setRadioValueCom(val);
|
|
96
98
|
onRadioChange === null || onRadioChange === void 0 ? void 0 : onRadioChange(val);
|
|
97
99
|
};
|
|
100
|
+
var getCurrItem = function getCurrItem(key) {
|
|
101
|
+
var currItem = {};
|
|
102
|
+
var tKey = key;
|
|
103
|
+
if (data) {
|
|
104
|
+
currItem = data.find(function (_) {
|
|
105
|
+
return String(_.value) === key;
|
|
106
|
+
}) || {};
|
|
107
|
+
if ((currItem === null || currItem === void 0 ? void 0 : currItem.value) !== undefined) tKey = currItem.value;
|
|
108
|
+
}
|
|
109
|
+
return {
|
|
110
|
+
currItem: currItem,
|
|
111
|
+
tKey: tKey
|
|
112
|
+
};
|
|
113
|
+
};
|
|
98
114
|
var inEditable;
|
|
99
115
|
//可编辑标签
|
|
100
116
|
if (inType === 'editable-card' || editable) {
|
|
@@ -102,17 +118,12 @@ var Tabs = function Tabs(props) {
|
|
|
102
118
|
onEdit: function onEdit(editType, _ref) {
|
|
103
119
|
var key = _ref.key,
|
|
104
120
|
event = _ref.event;
|
|
105
|
-
var currItem = {};
|
|
106
121
|
if (editType === 'add') {
|
|
107
|
-
if (onAdd) onAdd(event);else _onEdit === null || _onEdit === void 0 ? void 0 : _onEdit(
|
|
122
|
+
if (onAdd) onAdd(event);else _onEdit === null || _onEdit === void 0 ? void 0 : _onEdit({}, event, editType);
|
|
108
123
|
} else {
|
|
109
|
-
var
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
return String(_.value) === key;
|
|
113
|
-
}) || {};
|
|
114
|
-
if ((currItem === null || currItem === void 0 ? void 0 : currItem.value) !== undefined) tKey = currItem.value;
|
|
115
|
-
}
|
|
124
|
+
var _getCurrItem = getCurrItem(key),
|
|
125
|
+
currItem = _getCurrItem.currItem,
|
|
126
|
+
tKey = _getCurrItem.tKey;
|
|
116
127
|
_onEdit === null || _onEdit === void 0 ? void 0 : _onEdit(currItem, tKey, editType);
|
|
117
128
|
}
|
|
118
129
|
},
|
|
@@ -123,14 +134,9 @@ var Tabs = function Tabs(props) {
|
|
|
123
134
|
}
|
|
124
135
|
//onchange
|
|
125
136
|
var handleChange = function handleChange(newActiveKey) {
|
|
126
|
-
var
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
currItem = data.find(function (_) {
|
|
130
|
-
return String(_.value) === newActiveKey;
|
|
131
|
-
}) || {};
|
|
132
|
-
if ((currItem === null || currItem === void 0 ? void 0 : currItem.value) !== undefined) tKey = currItem.value;
|
|
133
|
-
}
|
|
137
|
+
var _getCurrItem2 = getCurrItem(newActiveKey),
|
|
138
|
+
currItem = _getCurrItem2.currItem,
|
|
139
|
+
tKey = _getCurrItem2.tKey;
|
|
134
140
|
onChange === null || onChange === void 0 ? void 0 : onChange(tKey, currItem);
|
|
135
141
|
};
|
|
136
142
|
//渲染closeIcon
|
|
@@ -210,10 +216,12 @@ var Tabs = function Tabs(props) {
|
|
|
210
216
|
var hasChildNode = function hasChildNode() {
|
|
211
217
|
var hasChild;
|
|
212
218
|
if (data === null || data === void 0 ? void 0 : data.length) {
|
|
219
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
213
220
|
hasChild = data.some(function (_) {
|
|
214
221
|
return _.content;
|
|
215
222
|
});
|
|
216
223
|
} else {
|
|
224
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
217
225
|
hasChild = React__default.Children.toArray(children).some(function (_) {
|
|
218
226
|
return _.props.children;
|
|
219
227
|
});
|
package/Tag/TagGroup.d.ts
CHANGED
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
* @date 2022/1/12 下午1:16
|
|
4
4
|
* @description tag group
|
|
5
5
|
*/
|
|
6
|
-
import React, { FunctionComponent } from
|
|
7
|
-
import { TagProps } from
|
|
8
|
-
import
|
|
9
|
-
interface TagItem extends Omit<TagProps,
|
|
6
|
+
import React, { FunctionComponent } from 'react';
|
|
7
|
+
import { TagProps } from './index';
|
|
8
|
+
import './index.scss';
|
|
9
|
+
interface TagItem extends Omit<TagProps, 'visible' | 'size'> {
|
|
10
10
|
/**
|
|
11
11
|
* label
|
|
12
12
|
*/
|
|
@@ -37,7 +37,7 @@ export interface TagGroupProps {
|
|
|
37
37
|
/**
|
|
38
38
|
* 大小
|
|
39
39
|
*/
|
|
40
|
-
size?:
|
|
40
|
+
size?: 'small' | 'large';
|
|
41
41
|
/**
|
|
42
42
|
* input 默认值
|
|
43
43
|
*/
|
package/Tag/index.d.ts
CHANGED
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
* @date 2022/1/11 上午10:15
|
|
4
4
|
* @description tag
|
|
5
5
|
*/
|
|
6
|
-
import React, { PropsWithChildren } from
|
|
7
|
-
import TagGroup, { TagGroupProps } from
|
|
8
|
-
import
|
|
9
|
-
type PresetColorTypes =
|
|
10
|
-
type TagType =
|
|
6
|
+
import React, { PropsWithChildren } from 'react';
|
|
7
|
+
import TagGroup, { TagGroupProps } from './TagGroup';
|
|
8
|
+
import './index.scss';
|
|
9
|
+
type PresetColorTypes = 'blue' | 'green' | 'yellow' | 'red';
|
|
10
|
+
type TagType = 'normal' | 'outline';
|
|
11
11
|
export interface TagProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
12
12
|
/** 标签是否描边 */
|
|
13
13
|
type?: TagType;
|
|
@@ -32,11 +32,11 @@ export interface TagProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
|
32
32
|
/** 图标 */
|
|
33
33
|
icon?: React.ReactNode;
|
|
34
34
|
/** 标签最大宽度 */
|
|
35
|
-
maxWidth?: number;
|
|
35
|
+
maxWidth?: number | string;
|
|
36
36
|
/** cls */
|
|
37
37
|
className?: string;
|
|
38
38
|
/** 大小 */
|
|
39
|
-
size?:
|
|
39
|
+
size?: 'small' | 'large';
|
|
40
40
|
/** 编辑输入框样式 */
|
|
41
41
|
editInputClassName?: string;
|
|
42
42
|
/** 编辑输入框宽度 */
|