@zgfe/business-lib 1.1.22 → 1.1.24
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/es/addToPanel/components/addPanel.js +8 -21
- package/es/addToPanel/components/radioGroup.js +1 -3
- package/es/addToPanel/components/styleList.js +5 -22
- package/es/addToPanel/demo/edit.js +5 -12
- package/es/addToPanel/demo/index.js +5 -12
- package/es/addToPanel/index.js +21 -58
- package/es/addToScene/addGroup.js +0 -4
- package/es/addToScene/demo/index.js +5 -12
- package/es/addToScene/index.js +13 -40
- package/es/assets/demo/index.d.ts +3 -1
- package/es/assets/demo/index.js +0 -2
- package/es/assets/demo/input.js +5 -12
- package/es/assets/iconfont/iconfont.js +10 -17
- package/es/assets/styles/resetAntd.less +5 -0
- package/es/assets/theme.js +0 -1
- package/es/attrConditions/components/operateList.js +10 -27
- package/es/attrConditions/components/stringList.js +68 -97
- package/es/attrConditions/components/valuesList.js +14 -40
- package/es/attrConditions/demo/group.js +11 -23
- package/es/attrConditions/demo/index.js +17 -26
- package/es/attrConditions/group.js +17 -48
- package/es/attrConditions/index.js +22 -49
- package/es/attrConditions/types.js +0 -1
- package/es/attributeSelector/demo/disable.js +8 -16
- package/es/attributeSelector/demo/index.js +8 -17
- package/es/attributeSelector/index.js +22 -45
- package/es/attributeSelector/listPanel.js +18 -46
- package/es/attributeSelector/option.js +3 -13
- package/es/attributeSelector/types.js +0 -5
- package/es/attributeSelector/util.js +0 -3
- package/es/chart/demo/index.js +5 -14
- package/es/chart/index.js +30 -44
- package/es/chart/util/chartOptionConfig.d.ts +3 -3
- package/es/chart/util/chartOptionConfig.js +13 -37
- package/es/chart/util/data/china.js +1 -4
- package/es/chart/util/formatData.d.ts +2 -2
- package/es/chart/util/formatData.js +0 -5
- package/es/chart/util/formatOption.js +0 -13
- package/es/chart/util/mapUtil.js +5 -26
- package/es/config.js +0 -2
- package/es/cycleTime/demo/disable.js +0 -1
- package/es/cycleTime/index.js +19 -46
- package/es/cycleTime/month.js +8 -27
- package/es/datePicker/datePicker.js +5 -23
- package/es/datePicker/demo/customType.js +13 -22
- package/es/datePicker/demo/day.js +13 -22
- package/es/datePicker/demo/index.js +12 -21
- package/es/datePicker/index.js +18 -41
- package/es/datePicker/utils.js +0 -7
- package/es/demoWrapper/content.js +31 -56
- package/es/demoWrapper/head.js +9 -23
- package/es/demoWrapper/index.js +14 -30
- package/es/dialog/demo/index.js +5 -12
- package/es/dialog/index.js +4 -6
- package/es/dnd/demo/data.js +19 -28
- package/es/dnd/demo/handle.js +19 -28
- package/es/dnd/index.js +21 -45
- package/es/dnd/item.js +10 -30
- package/es/eventSelector/demo/index.js +12 -23
- package/es/eventSelector/index.js +14 -42
- package/es/eventSelector/listPanel.js +26 -60
- package/es/eventSelector/option.js +6 -11
- package/es/icon/iconFont.js +7 -13
- package/es/layout/analysisLayout/demo/index.js +0 -6
- package/es/layout/analysisLayout/index.d.ts +1 -1
- package/es/layout/analysisLayout/index.js +16 -34
- package/es/layout/detail/index.js +1 -3
- package/es/loginForm/index.js +7 -18
- package/es/searchInput/index.js +2 -7
- package/es/select/demo/children.js +8 -16
- package/es/select/demo/customLabel.js +0 -2
- package/es/select/demo/group.js +8 -17
- package/es/select/demo/index.js +11 -19
- package/es/select/demo/loading.js +8 -18
- package/es/select/demo/multiple.js +8 -16
- package/es/select/handle.js +14 -34
- package/es/select/index.js +22 -58
- package/es/select/option.js +10 -26
- package/es/select/overlay.js +25 -55
- package/es/table/demo/data/table.js +0 -2
- package/es/table/demo/index.js +13 -39
- package/es/table/demo/index2.js +5 -15
- package/es/table/demo/index3.js +7 -28
- package/es/table/index.js +14 -33
- package/es/targetConditionGroup/components/targetDimension.js +12 -37
- package/es/targetConditionGroup/demo/group.js +21 -36
- package/es/targetConditionGroup/demo/index.js +5 -13
- package/es/targetConditionGroup/index.js +31 -82
- package/es/targetSelector/demo/index.js +15 -28
- package/es/targetSelector/editBox.js +5 -20
- package/es/targetSelector/index.js +15 -36
- package/es/targetSelector/optionIcon.js +1 -5
- package/es/targetSelector/optionMenu.js +0 -3
- package/es/userCondition/conditionTypeList.js +7 -12
- package/es/userCondition/conditionWrap.js +0 -2
- package/es/userCondition/conditions/cdpCondition.js +51 -97
- package/es/userCondition/conditions/eventCondition.js +6 -16
- package/es/userCondition/conditions/periodCondition.d.ts +1 -1
- package/es/userCondition/conditions/periodCondition.js +8 -26
- package/es/userCondition/conditions/propCondition.js +29 -61
- package/es/userCondition/conditions/runTimesCondition.js +5 -10
- package/es/userCondition/conditions/tagsCondition.d.ts +1 -1
- package/es/userCondition/conditions/tagsCondition.js +15 -33
- package/es/userCondition/conditions/textDesc.js +16 -67
- package/es/userCondition/demo/index.js +11 -21
- package/es/userCondition/index.js +51 -91
- package/es/userCondition/orConditions.js +11 -48
- package/es/userCondition/relationLabel.js +1 -4
- package/es/userCondition/types.d.ts +2 -2
- package/es/userCondition/types.js +0 -1
- package/es/userCondition/util.js +4 -13
- package/es/userGroup/demo/group.js +14 -23
- package/es/userGroup/demo/index.js +5 -15
- package/es/userGroup/index.js +12 -30
- package/es/userTagsSelector/cascaderOverlay.js +19 -51
- package/es/userTagsSelector/components/search/index.js +0 -2
- package/es/userTagsSelector/demo/index.js +0 -3
- package/es/userTagsSelector/groups/groupOption.js +6 -8
- package/es/userTagsSelector/groups/index.js +15 -30
- package/es/userTagsSelector/index.js +17 -35
- package/es/userTagsSelector/multipleCheckPanel/checkOption.js +3 -6
- package/es/userTagsSelector/multipleCheckPanel/index.js +8 -21
- package/es/userTagsSelector/util.js +0 -2
- package/es/utils/ajax.js +45 -71
- package/es/utils/base64.js +3 -22
- package/es/utils/type.d.ts +1 -1
- package/es/utils/type.js +4 -7
- package/es/utils/util.js +1 -17
- package/package.json +12 -15
package/es/select/option.js
CHANGED
|
@@ -1,48 +1,36 @@
|
|
|
1
1
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
|
-
|
|
3
2
|
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
3
|
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); }
|
|
6
|
-
|
|
7
|
-
function
|
|
8
|
-
|
|
9
|
-
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
10
|
-
|
|
4
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
5
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
11
6
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
12
|
-
|
|
13
7
|
import { Tooltip } from 'antd';
|
|
14
8
|
import React, { useEffect, useRef, useState } from 'react';
|
|
15
9
|
import { classPrefix } from '.';
|
|
16
10
|
import IconFont from '../icon/iconFont';
|
|
17
11
|
import { util } from '../utils';
|
|
18
|
-
|
|
19
12
|
var SelectOption = function SelectOption(props) {
|
|
20
13
|
var option = props.option,
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
14
|
+
group = props.group,
|
|
15
|
+
checked = props.checked,
|
|
16
|
+
disabled = props.disabled,
|
|
17
|
+
multiple = props.multiple,
|
|
18
|
+
customLabel = props.customLabel;
|
|
26
19
|
var optionRef = useRef(null);
|
|
27
|
-
|
|
28
20
|
var _useState = useState(false),
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
21
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
22
|
+
isOverflow = _useState2[0],
|
|
23
|
+
setIsOverflow = _useState2[1];
|
|
33
24
|
useEffect(function () {
|
|
34
25
|
var _optionRef$current, _optionRef$current2;
|
|
35
|
-
|
|
36
26
|
var clientWidth = (_optionRef$current = optionRef.current) === null || _optionRef$current === void 0 ? void 0 : _optionRef$current.clientWidth;
|
|
37
27
|
var scrollWidth = (_optionRef$current2 = optionRef.current) === null || _optionRef$current2 === void 0 ? void 0 : _optionRef$current2.scrollWidth;
|
|
38
28
|
setIsOverflow(clientWidth < scrollWidth);
|
|
39
29
|
}, []);
|
|
40
|
-
|
|
41
30
|
function onClick() {
|
|
42
31
|
if (disabled) return;
|
|
43
32
|
if (props.onClick) props.onClick(option);
|
|
44
33
|
}
|
|
45
|
-
|
|
46
34
|
function getLabel(label) {
|
|
47
35
|
if (!props.highlight || !props.highlight.enable || !props.highlight.text) return label;
|
|
48
36
|
var text = props.highlight.text;
|
|
@@ -56,12 +44,10 @@ var SelectOption = function SelectOption(props) {
|
|
|
56
44
|
}, text);
|
|
57
45
|
});
|
|
58
46
|
}
|
|
59
|
-
|
|
60
47
|
function renderLabel(option) {
|
|
61
48
|
var dom = getLabel(option[props.labelField]);
|
|
62
49
|
return customLabel ? customLabel(dom, option) : dom;
|
|
63
50
|
}
|
|
64
|
-
|
|
65
51
|
if (group) {
|
|
66
52
|
return /*#__PURE__*/React.createElement("div", {
|
|
67
53
|
className: "".concat(classPrefix, "-group")
|
|
@@ -69,7 +55,6 @@ var SelectOption = function SelectOption(props) {
|
|
|
69
55
|
className: "".concat(classPrefix, "-split")
|
|
70
56
|
}), /*#__PURE__*/React.createElement("span", null, group.name));
|
|
71
57
|
}
|
|
72
|
-
|
|
73
58
|
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
74
59
|
placement: "rightBottom",
|
|
75
60
|
title: isOverflow ? option[props.labelField] : null,
|
|
@@ -92,5 +77,4 @@ var SelectOption = function SelectOption(props) {
|
|
|
92
77
|
className: "".concat(classPrefix, "-option-btn")
|
|
93
78
|
}, props.extra && props.extra(option))));
|
|
94
79
|
};
|
|
95
|
-
|
|
96
80
|
export default SelectOption;
|
package/es/select/overlay.js
CHANGED
|
@@ -1,17 +1,13 @@
|
|
|
1
|
-
function
|
|
2
|
-
|
|
1
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
3
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
4
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
3
5
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
4
|
-
|
|
5
6
|
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."); }
|
|
6
|
-
|
|
7
7
|
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); }
|
|
8
|
-
|
|
9
|
-
function
|
|
10
|
-
|
|
11
|
-
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
12
|
-
|
|
8
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
9
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
13
10
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
14
|
-
|
|
15
11
|
import React, { useEffect, useState } from 'react';
|
|
16
12
|
import { Spin } from 'antd';
|
|
17
13
|
import BizSearchInput from '../searchInput';
|
|
@@ -20,31 +16,27 @@ import SelectOption from './option';
|
|
|
20
16
|
import _ from 'lodash';
|
|
21
17
|
var SelectOverlay = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
22
18
|
var labelField = props.labelField,
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
19
|
+
keyField = props.keyField,
|
|
20
|
+
options = props.options,
|
|
21
|
+
extra = props.extra,
|
|
22
|
+
multiple = props.multiple,
|
|
23
|
+
disableItemList = props.disableItemList,
|
|
24
|
+
dropdownExtra = props.dropdownExtra,
|
|
25
|
+
loading = props.loading,
|
|
26
|
+
customLabel = props.customLabel,
|
|
27
|
+
overlayClassName = props.overlayClassName;
|
|
33
28
|
var _useState = useState(),
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
29
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
30
|
+
searchValue = _useState2[0],
|
|
31
|
+
setSearchValue = _useState2[1];
|
|
38
32
|
var _useState3 = useState(),
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
33
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
34
|
+
current = _useState4[0],
|
|
35
|
+
setCurrent = _useState4[1];
|
|
43
36
|
var _useState5 = useState([]),
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
37
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
38
|
+
showList = _useState6[0],
|
|
39
|
+
setShowList = _useState6[1];
|
|
48
40
|
useEffect(function () {
|
|
49
41
|
if (props.value) setCurrent(props.value);
|
|
50
42
|
}, [props.value]);
|
|
@@ -55,7 +47,6 @@ var SelectOverlay = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
55
47
|
}, [props.searchValue]);
|
|
56
48
|
useEffect(function () {
|
|
57
49
|
var ids = [];
|
|
58
|
-
|
|
59
50
|
if (current) {
|
|
60
51
|
if (multiple) {
|
|
61
52
|
if (current) {
|
|
@@ -67,10 +58,8 @@ var SelectOverlay = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
67
58
|
ids = [current[keyField]];
|
|
68
59
|
}
|
|
69
60
|
}
|
|
70
|
-
|
|
71
61
|
setShowList(function () {
|
|
72
62
|
var list = [];
|
|
73
|
-
|
|
74
63
|
if (props.type === 'group') {
|
|
75
64
|
list = options.map(function (group) {
|
|
76
65
|
var groupDom = /*#__PURE__*/React.createElement(SelectOption, {
|
|
@@ -84,7 +73,6 @@ var SelectOverlay = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
84
73
|
} else {
|
|
85
74
|
list = getOptionDom(options, ids);
|
|
86
75
|
}
|
|
87
|
-
|
|
88
76
|
if (options.length && !list.flat().length) {
|
|
89
77
|
var dom = /*#__PURE__*/React.createElement("div", {
|
|
90
78
|
className: "".concat(classPrefix, "-notfound"),
|
|
@@ -92,22 +80,16 @@ var SelectOverlay = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
92
80
|
}, props.notFound ? props.notFound : '未找到匹配数据');
|
|
93
81
|
list = [dom];
|
|
94
82
|
}
|
|
95
|
-
|
|
96
83
|
return list;
|
|
97
84
|
});
|
|
98
85
|
}, [searchValue, options, current]);
|
|
99
|
-
|
|
100
86
|
function getOptionDom(data, ids) {
|
|
101
87
|
var optionsDom = [];
|
|
102
|
-
|
|
103
88
|
var list = _.cloneDeep(data);
|
|
104
|
-
|
|
105
89
|
if (props.enableCreate && searchValue) {
|
|
106
90
|
var _list$push;
|
|
107
|
-
|
|
108
91
|
list.push((_list$push = {}, _defineProperty(_list$push, props.keyField, searchValue), _defineProperty(_list$push, props.labelField, searchValue), _defineProperty(_list$push, "isTemp", true), _list$push));
|
|
109
92
|
}
|
|
110
|
-
|
|
111
93
|
var tempOption = null;
|
|
112
94
|
var useTemp = true;
|
|
113
95
|
list.forEach(function (option) {
|
|
@@ -134,31 +116,25 @@ var SelectOverlay = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
134
116
|
key: option[keyField] || String(Math.random()),
|
|
135
117
|
customLabel: customLabel
|
|
136
118
|
});
|
|
137
|
-
|
|
138
119
|
if (option.isTemp) {
|
|
139
120
|
tempOption = dom;
|
|
140
121
|
return;
|
|
141
122
|
}
|
|
142
|
-
|
|
143
123
|
optionsDom.push(dom);
|
|
144
124
|
});
|
|
145
|
-
|
|
146
125
|
if (useTemp && tempOption) {
|
|
147
126
|
optionsDom.push(tempOption);
|
|
148
127
|
}
|
|
149
|
-
|
|
150
128
|
return optionsDom;
|
|
151
129
|
}
|
|
152
|
-
|
|
153
130
|
function onClick(option) {
|
|
154
131
|
var currentOption = _.cloneDeep(current);
|
|
155
|
-
|
|
156
132
|
if (multiple) {
|
|
157
133
|
if (!currentOption) {
|
|
158
134
|
currentOption = [option];
|
|
159
135
|
} else {
|
|
160
136
|
var num = 0,
|
|
161
|
-
|
|
137
|
+
flag = false;
|
|
162
138
|
currentOption.forEach(function (item, i) {
|
|
163
139
|
if (item[keyField] === option[keyField]) {
|
|
164
140
|
flag = true;
|
|
@@ -166,7 +142,6 @@ var SelectOverlay = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
166
142
|
return;
|
|
167
143
|
}
|
|
168
144
|
});
|
|
169
|
-
|
|
170
145
|
if (flag) {
|
|
171
146
|
currentOption.splice(num, 1);
|
|
172
147
|
} else {
|
|
@@ -176,18 +151,14 @@ var SelectOverlay = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
176
151
|
} else {
|
|
177
152
|
currentOption = option;
|
|
178
153
|
}
|
|
179
|
-
|
|
180
154
|
setCurrent(currentOption);
|
|
181
155
|
if (props.onChange) props.onChange(currentOption);
|
|
182
156
|
}
|
|
183
|
-
|
|
184
157
|
function onSearch(v) {
|
|
185
158
|
setSearchValue(v);
|
|
186
159
|
}
|
|
187
|
-
|
|
188
160
|
function render() {
|
|
189
161
|
if (loading) return /*#__PURE__*/React.createElement(Spin, null);
|
|
190
|
-
|
|
191
162
|
if (showList && showList.length) {
|
|
192
163
|
return showList;
|
|
193
164
|
} else {
|
|
@@ -196,7 +167,6 @@ var SelectOverlay = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
196
167
|
}, "\u6682\u65E0\u6570\u636E");
|
|
197
168
|
}
|
|
198
169
|
}
|
|
199
|
-
|
|
200
170
|
return /*#__PURE__*/React.createElement("div", {
|
|
201
171
|
className: "".concat(classPrefix, "-overlay ").concat(overlayClassName),
|
|
202
172
|
ref: ref
|
|
@@ -24,7 +24,6 @@ export var columns = [{
|
|
|
24
24
|
}
|
|
25
25
|
}];
|
|
26
26
|
var tableData = [];
|
|
27
|
-
|
|
28
27
|
for (var i = 0; i < 100; i++) {
|
|
29
28
|
tableData.push({
|
|
30
29
|
key: i,
|
|
@@ -33,5 +32,4 @@ for (var i = 0; i < 100; i++) {
|
|
|
33
32
|
address: "London Park no. ".concat(i)
|
|
34
33
|
});
|
|
35
34
|
}
|
|
36
|
-
|
|
37
35
|
export default tableData;
|
package/es/table/demo/index.js
CHANGED
|
@@ -1,38 +1,26 @@
|
|
|
1
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
1
2
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
2
|
-
|
|
3
3
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
4
|
-
|
|
5
4
|
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
6
|
-
|
|
7
5
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
8
|
-
|
|
9
6
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
10
|
-
|
|
11
7
|
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."); }
|
|
12
|
-
|
|
13
|
-
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
14
|
-
|
|
8
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
15
9
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
16
|
-
|
|
17
10
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
18
|
-
|
|
19
11
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
20
|
-
|
|
21
|
-
function
|
|
22
|
-
|
|
12
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
13
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
14
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
23
15
|
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e2) { throw _e2; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
24
|
-
|
|
25
16
|
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); }
|
|
26
|
-
|
|
27
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
28
|
-
|
|
17
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
29
18
|
import React, { useEffect, useState } from 'react';
|
|
30
19
|
import { BizTable } from '@zgfe/business-lib';
|
|
31
20
|
import util from '../../utils/util';
|
|
32
21
|
import chartData from './data/data';
|
|
33
22
|
import { chartColors as color } from './data/color';
|
|
34
23
|
import '@zgfe/business-lib/es/assets/styles/resetAntd.less';
|
|
35
|
-
|
|
36
24
|
var getColumn = function getColumn(columnData) {
|
|
37
25
|
var data = [{
|
|
38
26
|
title: '显示',
|
|
@@ -45,7 +33,6 @@ var getColumn = function getColumn(columnData) {
|
|
|
45
33
|
for (var _len = arguments.length, res = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
46
34
|
res[_key] = arguments[_key];
|
|
47
35
|
}
|
|
48
|
-
|
|
49
36
|
return /*#__PURE__*/React.createElement("div", {
|
|
50
37
|
style: {
|
|
51
38
|
width: '12px',
|
|
@@ -63,10 +50,8 @@ var getColumn = function getColumn(columnData) {
|
|
|
63
50
|
ellipsis: true,
|
|
64
51
|
fixed: 'left'
|
|
65
52
|
}];
|
|
66
|
-
|
|
67
53
|
for (var i = 0; i < columnData.length; i++) {
|
|
68
54
|
var value = columnData[i];
|
|
69
|
-
|
|
70
55
|
if (/^\d{4}-\d{2}-\d{2}$/.test(value)) {
|
|
71
56
|
value = value.replace(/\d{4}-/, '');
|
|
72
57
|
} else if (/^\d{4}-\d{2}-\d{2}\|\d{4}-\d{2}-\d{2}$/.test(value)) {
|
|
@@ -74,14 +59,12 @@ var getColumn = function getColumn(columnData) {
|
|
|
74
59
|
value = dates ? dates[0].replace(/\d{4}-/, '') + '~' + dates[1].replace(/\d{4}-/, '') : value;
|
|
75
60
|
} else {
|
|
76
61
|
value = util.strMiddleSplit(value);
|
|
77
|
-
|
|
78
62
|
if (/:/.test(value)) {
|
|
79
63
|
value = value.replace(/\d{4}-\d{2}-\d{2}\s/, '');
|
|
80
64
|
} else if (/,/.test(value)) {
|
|
81
65
|
value = value.replace(/,/g, '-');
|
|
82
66
|
}
|
|
83
67
|
}
|
|
84
|
-
|
|
85
68
|
data.push({
|
|
86
69
|
title: value,
|
|
87
70
|
width: 100,
|
|
@@ -95,7 +78,6 @@ var getColumn = function getColumn(columnData) {
|
|
|
95
78
|
}
|
|
96
79
|
});
|
|
97
80
|
}
|
|
98
|
-
|
|
99
81
|
data.push({
|
|
100
82
|
title: '操作',
|
|
101
83
|
dataIndex: 'operation',
|
|
@@ -108,13 +90,10 @@ var getColumn = function getColumn(columnData) {
|
|
|
108
90
|
});
|
|
109
91
|
return data;
|
|
110
92
|
};
|
|
111
|
-
|
|
112
93
|
var formateTableData = function formateTableData(sData) {
|
|
113
94
|
var tableData = [];
|
|
114
|
-
|
|
115
95
|
var _iterator = _createForOfIteratorHelper(sData),
|
|
116
|
-
|
|
117
|
-
|
|
96
|
+
_step;
|
|
118
97
|
try {
|
|
119
98
|
var _loop = function _loop() {
|
|
120
99
|
var row = _step.value;
|
|
@@ -128,7 +107,6 @@ var formateTableData = function formateTableData(sData) {
|
|
|
128
107
|
});
|
|
129
108
|
tableData.push(_objectSpread({}, item));
|
|
130
109
|
};
|
|
131
|
-
|
|
132
110
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
133
111
|
_loop();
|
|
134
112
|
}
|
|
@@ -137,21 +115,17 @@ var formateTableData = function formateTableData(sData) {
|
|
|
137
115
|
} finally {
|
|
138
116
|
_iterator.f();
|
|
139
117
|
}
|
|
140
|
-
|
|
141
118
|
return tableData;
|
|
142
119
|
};
|
|
143
|
-
|
|
144
120
|
export default (function () {
|
|
145
121
|
var _useState = useState([]),
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
122
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
123
|
+
columns = _useState2[0],
|
|
124
|
+
setColumns = _useState2[1];
|
|
150
125
|
var _useState3 = useState([]),
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
126
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
127
|
+
tableData = _useState4[0],
|
|
128
|
+
setTableData = _useState4[1];
|
|
155
129
|
useEffect(function () {
|
|
156
130
|
var data = getColumn(chartData.xData);
|
|
157
131
|
setColumns(function () {
|
package/es/table/demo/index2.js
CHANGED
|
@@ -1,28 +1,20 @@
|
|
|
1
1
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
|
-
|
|
3
2
|
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
3
|
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); }
|
|
6
|
-
|
|
7
|
-
function
|
|
8
|
-
|
|
9
|
-
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
10
|
-
|
|
4
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
5
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
11
6
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
12
|
-
|
|
13
7
|
import React, { useEffect, useState } from 'react';
|
|
14
8
|
import { BizTable } from '@zgfe/business-lib';
|
|
15
9
|
import { columns } from './data/table';
|
|
16
10
|
export default (function () {
|
|
17
11
|
var _useState = useState([]),
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
12
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
13
|
+
tableData = _useState2[0],
|
|
14
|
+
setTableData = _useState2[1];
|
|
22
15
|
var getData = function getData(pagination) {
|
|
23
16
|
var current = pagination && pagination.current || 0;
|
|
24
17
|
var data = [];
|
|
25
|
-
|
|
26
18
|
for (var i = 0; i < 10; i++) {
|
|
27
19
|
data.push({
|
|
28
20
|
key: current * 10 + i,
|
|
@@ -31,12 +23,10 @@ export default (function () {
|
|
|
31
23
|
address: "London Park no. ".concat(current * 10 + i)
|
|
32
24
|
});
|
|
33
25
|
}
|
|
34
|
-
|
|
35
26
|
setTableData(function () {
|
|
36
27
|
return data;
|
|
37
28
|
});
|
|
38
29
|
};
|
|
39
|
-
|
|
40
30
|
useEffect(function () {
|
|
41
31
|
getData();
|
|
42
32
|
}, []);
|
package/es/table/demo/index3.js
CHANGED
|
@@ -1,23 +1,13 @@
|
|
|
1
1
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
2
|
-
|
|
3
2
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
4
|
-
|
|
5
3
|
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
6
|
-
|
|
7
4
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
8
|
-
|
|
9
5
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
10
|
-
|
|
11
6
|
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."); }
|
|
12
|
-
|
|
13
7
|
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); }
|
|
14
|
-
|
|
15
|
-
function
|
|
16
|
-
|
|
17
|
-
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
18
|
-
|
|
8
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
9
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
19
10
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
20
|
-
|
|
21
11
|
import React, { useEffect, useState } from 'react';
|
|
22
12
|
import { BizTable } from '@zgfe/business-lib';
|
|
23
13
|
var dataSource2 = [{
|
|
@@ -137,10 +127,9 @@ var column2 = [{
|
|
|
137
127
|
}];
|
|
138
128
|
export default (function () {
|
|
139
129
|
var _useState = useState([]),
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
130
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
131
|
+
tableData = _useState2[0],
|
|
132
|
+
setTableData = _useState2[1];
|
|
144
133
|
var sortData = function sortData(data) {
|
|
145
134
|
var compare = function compare(a, b) {
|
|
146
135
|
if (a.attr1 !== b.attr1) {
|
|
@@ -151,35 +140,28 @@ export default (function () {
|
|
|
151
140
|
return a.attr3 - b.attr3;
|
|
152
141
|
}
|
|
153
142
|
};
|
|
154
|
-
|
|
155
143
|
data.sort(compare);
|
|
156
144
|
return data;
|
|
157
145
|
};
|
|
158
|
-
|
|
159
146
|
var mergeRow = function mergeRow(source, field, field2, field3) {
|
|
160
147
|
var count = 0,
|
|
161
|
-
|
|
162
|
-
|
|
148
|
+
scount = 0,
|
|
149
|
+
tcount = 0;
|
|
163
150
|
var indexCount = 1;
|
|
164
151
|
var data = JSON.parse(JSON.stringify(source));
|
|
165
|
-
|
|
166
152
|
while (indexCount < data.length) {
|
|
167
153
|
var item = data.slice(count, count + 1)[0];
|
|
168
|
-
|
|
169
154
|
if (!item["".concat(field, "RowSpan")]) {
|
|
170
155
|
item["".concat(field, "RowSpan")] = 1;
|
|
171
156
|
item["".concat(field2, "RowSpan")] = 1;
|
|
172
157
|
item["".concat(field3, "RowSpan")] = 1;
|
|
173
158
|
}
|
|
174
|
-
|
|
175
159
|
if (item[field] === data[indexCount][field]) {
|
|
176
160
|
item["".concat(field, "RowSpan")]++;
|
|
177
161
|
data[indexCount]["".concat(field, "RowSpan")] = 0;
|
|
178
|
-
|
|
179
162
|
if (data[scount][field2] === data[indexCount][field2]) {
|
|
180
163
|
data[scount]["".concat(field2, "RowSpan")]++;
|
|
181
164
|
data[indexCount]["".concat(field2, "RowSpan")] = 0;
|
|
182
|
-
|
|
183
165
|
if (data[tcount][field3] === data[indexCount][field3]) {
|
|
184
166
|
data[tcount]["".concat(field3, "RowSpan")]++;
|
|
185
167
|
data[indexCount]["".concat(field3, "RowSpan")] = 0;
|
|
@@ -198,13 +180,10 @@ export default (function () {
|
|
|
198
180
|
scount = indexCount;
|
|
199
181
|
tcount = indexCount;
|
|
200
182
|
}
|
|
201
|
-
|
|
202
183
|
indexCount++;
|
|
203
184
|
}
|
|
204
|
-
|
|
205
185
|
return data;
|
|
206
186
|
};
|
|
207
|
-
|
|
208
187
|
useEffect(function () {
|
|
209
188
|
var data = mergeRow(sortData(dataSource2), 'attr1', 'attr2', 'attr3');
|
|
210
189
|
setTableData(function () {
|