fan-standard-comp 3.1.9 → 3.1.11

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.
Files changed (110) hide show
  1. package/dist/fan-standard-comp.umd.js +15 -15
  2. package/es/ButtonGroup/ButtonList.js +0 -3
  3. package/es/ButtonGroup/ButtonMenu.js +0 -3
  4. package/es/ButtonGroup/PopConfirmTitle.js +5 -15
  5. package/es/ButtonGroup/index.d.ts +2 -0
  6. package/es/ButtonGroup/index.js +90 -96
  7. package/es/DragContent/DragBar.js +2 -6
  8. package/es/DragContent/index.js +44 -75
  9. package/es/FormComp/ChunkUploader/api.js +6 -10
  10. package/es/FormComp/ChunkUploader/index.js +105 -171
  11. package/es/FormComp/ChunkUploader/lib.js +4 -17
  12. package/es/FormComp/ChunkUploader/upload-queue.class.js +10 -45
  13. package/es/FormComp/ChunkUploader/worker.js +0 -3
  14. package/es/FormComp/EditButton/index.js +24 -49
  15. package/es/FormComp/FieldComponent/ReUpload.js +18 -38
  16. package/es/FormComp/FieldComponent/RefactorTreeSelect.js +37 -75
  17. package/es/FormComp/FieldComponent/TitleNode.js +1 -3
  18. package/es/FormComp/FieldComponent/index.js +38 -74
  19. package/es/FormComp/FieldComponent/setReadonlyValues.js +34 -63
  20. package/es/FormComp/FieldComponent/style/index.less +6 -0
  21. package/es/FormComp/RenderItemGroup/index.js +46 -74
  22. package/es/FormComp/Uploader/index.js +36 -77
  23. package/es/FormComp/Uploader/util.js +0 -6
  24. package/es/FormComp/VarTemplate/index.js +58 -96
  25. package/es/NavLeafScroll/index.js +66 -120
  26. package/es/RefactorTree/index.js +36 -53
  27. package/es/RefactorTree/indexTreeNode.js +35 -68
  28. package/es/RefactorTree/util.js +9 -43
  29. package/es/SpecIcon/fonts/iconfont.js +7 -12
  30. package/es/SpecIcon/index.js +16 -25
  31. package/es/SplitterLayout/Pane.js +2 -5
  32. package/es/SplitterLayout/index.js +20 -70
  33. package/es/StandardContent/SplitterLayout/Pane.js +6 -10
  34. package/es/StandardContent/SplitterLayout/index.js +12 -63
  35. package/es/StandardContent/SubfieldContent.js +12 -14
  36. package/es/StandardContent/WrapperContent.js +8 -10
  37. package/es/StandardDragModal/index.js +4 -9
  38. package/es/StandardFilter/index.d.ts +1 -0
  39. package/es/StandardFilter/index.js +32 -70
  40. package/es/StandardFilter/style/index.less +1 -1
  41. package/es/StandardForm/ActionList.js +5 -7
  42. package/es/StandardForm/StepForm.js +36 -57
  43. package/es/StandardForm/TabForm.js +24 -39
  44. package/es/StandardForm/index.js +37 -56
  45. package/es/StandardModal/UpdateFormRef.js +1 -4
  46. package/es/StandardModal/index.js +94 -156
  47. package/es/StandardPanel/index.js +19 -35
  48. package/es/StandardTable/index.js +20 -30
  49. package/es/components/IconNode/index.js +0 -4
  50. package/es/index.js +14 -14
  51. package/es/utils/ValueFormat.js +0 -9
  52. package/es/utils/filterPermission.js +16 -34
  53. package/es/utils/getParentNodes.js +17 -44
  54. package/lib/ButtonGroup/ButtonList.js +1 -13
  55. package/lib/ButtonGroup/ButtonMenu.js +1 -8
  56. package/lib/ButtonGroup/PopConfirmTitle.js +3 -16
  57. package/lib/ButtonGroup/index.d.ts +2 -0
  58. package/lib/ButtonGroup/index.js +93 -119
  59. package/lib/DragContent/DragBar.js +2 -10
  60. package/lib/DragContent/index.js +47 -85
  61. package/lib/FormComp/ChunkUploader/api.js +6 -15
  62. package/lib/FormComp/ChunkUploader/index.js +107 -185
  63. package/lib/FormComp/ChunkUploader/lib.js +8 -27
  64. package/lib/FormComp/ChunkUploader/upload-queue.class.js +10 -46
  65. package/lib/FormComp/ChunkUploader/worker.js +1 -5
  66. package/lib/FormComp/EditButton/index.js +26 -60
  67. package/lib/FormComp/FieldComponent/ReUpload.js +21 -50
  68. package/lib/FormComp/FieldComponent/RefactorTreeSelect.js +39 -90
  69. package/lib/FormComp/FieldComponent/TitleNode.js +1 -5
  70. package/lib/FormComp/FieldComponent/index.js +38 -110
  71. package/lib/FormComp/FieldComponent/setReadonlyValues.js +37 -79
  72. package/lib/FormComp/FieldComponent/style/index.less +6 -0
  73. package/lib/FormComp/RenderItemGroup/index.js +46 -87
  74. package/lib/FormComp/Uploader/index.js +38 -95
  75. package/lib/FormComp/Uploader/util.js +1 -9
  76. package/lib/FormComp/VarTemplate/index.js +62 -106
  77. package/lib/FormComp/index.js +0 -2
  78. package/lib/NavLeafScroll/index.js +68 -131
  79. package/lib/RefactorTree/index.js +36 -67
  80. package/lib/RefactorTree/indexTreeNode.js +37 -83
  81. package/lib/RefactorTree/util.js +11 -45
  82. package/lib/SpecIcon/fonts/iconfont.js +7 -12
  83. package/lib/SpecIcon/index.js +16 -30
  84. package/lib/SplitterLayout/Pane.js +0 -7
  85. package/lib/SplitterLayout/index.js +18 -72
  86. package/lib/StandardContent/SplitterLayout/Pane.js +6 -14
  87. package/lib/StandardContent/SplitterLayout/index.js +12 -68
  88. package/lib/StandardContent/SubfieldContent.js +12 -21
  89. package/lib/StandardContent/WrapperContent.js +8 -16
  90. package/lib/StandardDragModal/index.js +4 -14
  91. package/lib/StandardFilter/index.d.ts +1 -0
  92. package/lib/StandardFilter/index.js +30 -78
  93. package/lib/StandardFilter/style/index.less +1 -1
  94. package/lib/StandardForm/ActionList.js +5 -12
  95. package/lib/StandardForm/StepForm.js +37 -75
  96. package/lib/StandardForm/TabForm.js +27 -57
  97. package/lib/StandardForm/index.js +40 -75
  98. package/lib/StandardModal/UpdateFormRef.js +4 -12
  99. package/lib/StandardModal/index.js +96 -180
  100. package/lib/StandardPanel/index.js +22 -48
  101. package/lib/StandardTable/index.js +20 -39
  102. package/lib/components/IconNode/index.js +0 -7
  103. package/lib/components/index.js +0 -2
  104. package/lib/data/index.js +4 -7
  105. package/lib/index.js +42 -68
  106. package/lib/utils/ValueFormat.js +0 -10
  107. package/lib/utils/filterPermission.js +15 -39
  108. package/lib/utils/getParentNodes.js +18 -49
  109. package/lib/utils/index.js +6 -9
  110. package/package.json +4 -4
@@ -8,7 +8,6 @@ import SpecIcon from "@/SpecIcon";
8
8
  import buttonMenu from './ButtonMenu';
9
9
  import IconNode from "@/components/IconNode";
10
10
  import { btnIsDisabled } from "@/utils/filterPermission";
11
-
12
11
  var RenderButtonList = function RenderButtonList(item) {
13
12
  if (Array.isArray(item.children) && item.children.length > 0) {
14
13
  return /*#__PURE__*/React.createElement(_Dropdown, {
@@ -20,7 +19,6 @@ var RenderButtonList = function RenderButtonList(item) {
20
19
  name: "down"
21
20
  })));
22
21
  }
23
-
24
22
  return /*#__PURE__*/React.createElement(_Button, {
25
23
  type: item.type ? item.type : 'primary',
26
24
  danger: item.danger,
@@ -33,5 +31,4 @@ var RenderButtonList = function RenderButtonList(item) {
33
31
  } : null
34
32
  }, item.exName || item.name);
35
33
  };
36
-
37
34
  export default RenderButtonList;
@@ -3,7 +3,6 @@ import _Menu from "antd/es/menu";
3
3
  // 渲染按钮多层级形式 (用于筛选)
4
4
  import React from "react";
5
5
  import IconNode from "@/components/IconNode";
6
-
7
6
  var RenderButtonList = function RenderButtonList(group) {
8
7
  return /*#__PURE__*/React.createElement(_Menu, null, group.map(function (item, index) {
9
8
  if (item.children) {
@@ -22,7 +21,6 @@ var RenderButtonList = function RenderButtonList(group) {
22
21
  }), " ", child.exName || child.name));
23
22
  }));
24
23
  }
25
-
26
24
  return /*#__PURE__*/React.createElement(_Menu.Item, {
27
25
  key: index
28
26
  }, /*#__PURE__*/React.createElement("a", {
@@ -34,5 +32,4 @@ var RenderButtonList = function RenderButtonList(group) {
34
32
  }), " ", item.exName || item.name));
35
33
  }));
36
34
  };
37
-
38
35
  export default RenderButtonList;
@@ -1,22 +1,15 @@
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 _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 _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); }
8
-
4
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
9
5
  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
10
-
11
6
  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; }
12
-
13
- import React from "react"; // 气泡确认框标题配置
14
-
7
+ import React from "react";
8
+ // 气泡确认框标题配置
15
9
  var PopConfirmTitle = function PopConfirmTitle(propsData) {
16
10
  var confirmConfig = propsData.confirmConfig,
17
- confirmText = propsData.confirmText,
18
- extraRow = propsData.extraRow;
19
-
11
+ confirmText = propsData.confirmText,
12
+ extraRow = propsData.extraRow;
20
13
  if (propsData.hasOwnProperty('confirmConfig') && confirmConfig.title) {
21
14
  var title = confirmConfig.title;
22
15
  if (!title) return /*#__PURE__*/React.createElement(React.Fragment, null, null);
@@ -24,14 +17,11 @@ var PopConfirmTitle = function PopConfirmTitle(propsData) {
24
17
  return extraRow[pItem];
25
18
  }))) : title;
26
19
  }
27
-
28
20
  if (confirmText) {
29
21
  return typeof confirmText === "function" ? confirmText.apply(void 0, _toConsumableArray(Object.keys(extraRow).map(function (pItem) {
30
22
  return extraRow[pItem];
31
23
  }))) : confirmText;
32
24
  }
33
-
34
25
  return /*#__PURE__*/React.createElement(React.Fragment, null, null);
35
26
  };
36
-
37
27
  export default PopConfirmTitle;
@@ -17,6 +17,7 @@ export interface ButtonGroupOptionsProps {
17
17
  render?: (() => React.ReactNode) | React.ReactNode;
18
18
  confirmText?: any;
19
19
  confirmConfig?: any;
20
+ dropdownConfig?: any;
20
21
  }
21
22
  interface ButtonGroupProps {
22
23
  type?: 'button' | 'text';
@@ -25,6 +26,7 @@ interface ButtonGroupProps {
25
26
  permissionCodes?: string[];
26
27
  options?: ButtonGroupOptionsProps[];
27
28
  min?: number;
29
+ dropdownConfig?: Object;
28
30
  }
29
31
  declare const ButtonGroup: (props: ButtonGroupProps) => JSX.Element;
30
32
  export default ButtonGroup;
@@ -6,27 +6,16 @@ import "antd/es/dropdown/style";
6
6
  import _Dropdown from "antd/es/dropdown";
7
7
  import "antd/es/menu/style";
8
8
  import _Menu from "antd/es/menu";
9
-
10
9
  function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
11
-
12
10
  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."); }
13
-
14
- function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); }
15
-
11
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
16
12
  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
17
-
18
13
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
19
-
20
14
  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."); }
21
-
22
15
  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); }
23
-
24
16
  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; }
25
-
26
- function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_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; }
27
-
17
+ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0) { ; } } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
28
18
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
29
-
30
19
  import { __rest } from "tslib";
31
20
  import React, { useState, useEffect } from "react";
32
21
  import { IconNode } from "../components/index";
@@ -36,41 +25,37 @@ import { funcCode } from "../data/index";
36
25
  import { DownOutlined, QuestionCircleOutlined } from "@ant-design/icons";
37
26
  import { removeNoPermission, btnIsDisabled } from '../utils/filterPermission.js';
38
27
  import './style/index.less';
39
-
40
28
  var ButtonGroup = function ButtonGroup(props) {
41
29
  var _props$type = props.type,
42
- type = _props$type === void 0 ? 'button' : _props$type,
43
- _props$rowParams = props.rowParams,
44
- rowParams = _props$rowParams === void 0 ? {
45
- text: undefined,
46
- record: undefined,
47
- rowIndex: undefined
48
- } : _props$rowParams,
49
- _props$codes = props.codes,
50
- codes = _props$codes === void 0 ? funcCode.btnFuncCodes : _props$codes,
51
- permissionCodes = props.permissionCodes;
30
+ type = _props$type === void 0 ? 'button' : _props$type,
31
+ _props$rowParams = props.rowParams,
32
+ rowParams = _props$rowParams === void 0 ? {
33
+ text: undefined,
34
+ record: undefined,
35
+ rowIndex: undefined
36
+ } : _props$rowParams,
37
+ _props$codes = props.codes,
38
+ codes = _props$codes === void 0 ? funcCode.btnFuncCodes : _props$codes,
39
+ permissionCodes = props.permissionCodes,
40
+ _props$dropdownConfig = props.dropdownConfig,
41
+ dropdownConfig = _props$dropdownConfig === void 0 ? {} : _props$dropdownConfig;
52
42
  var _props$options = props.options,
53
- options = _props$options === void 0 ? [] : _props$options,
54
- _props$min = props.min,
55
- min = _props$min === void 0 ? 3 : _props$min; // 最小展示长度不能小于2
56
-
43
+ options = _props$options === void 0 ? [] : _props$options,
44
+ _props$min = props.min,
45
+ min = _props$min === void 0 ? 3 : _props$min; // 最小展示长度不能小于2
57
46
  if (!options) return null; // 没有配置list返回null
58
-
59
47
  var _useState = useState(-1),
60
- _useState2 = _slicedToArray(_useState, 2),
61
- popVisibleIndex = _useState2[0],
62
- setPopVisibleIndex = _useState2[1];
63
-
48
+ _useState2 = _slicedToArray(_useState, 2),
49
+ popVisibleIndex = _useState2[0],
50
+ setPopVisibleIndex = _useState2[1];
64
51
  var _useState3 = useState({}),
65
- _useState4 = _slicedToArray(_useState3, 2),
66
- popRow = _useState4[0],
67
- setPopRow = _useState4[1];
68
-
52
+ _useState4 = _slicedToArray(_useState3, 2),
53
+ popRow = _useState4[0],
54
+ setPopRow = _useState4[1];
69
55
  var _useState5 = useState([]),
70
- _useState6 = _slicedToArray(_useState5, 2),
71
- resetList = _useState6[0],
72
- setResetList = _useState6[1];
73
-
56
+ _useState6 = _slicedToArray(_useState5, 2),
57
+ resetList = _useState6[0],
58
+ setResetList = _useState6[1];
74
59
  useEffect(function () {
75
60
  // 重组选项options集合数据,排除:无权限(有配置code,并且不包含permissionCodes内)的数据及,isHide 为true的数据
76
61
  setResetList(_toConsumableArray(removeNoPermission(options, permissionCodes, codes, rowParams)) || []);
@@ -80,8 +65,8 @@ var ButtonGroup = function ButtonGroup(props) {
80
65
  }, [options, codes, permissionCodes]);
81
66
  useEffect(function () {
82
67
  setPopVisibleIndex(-1);
83
- }, [rowParams]); // 渲染按钮多层级形式 (用于筛选)
84
-
68
+ }, [rowParams]);
69
+ // 渲染按钮多层级形式 (用于筛选)
85
70
  var buttonMenu = function buttonMenu(group) {
86
71
  return /*#__PURE__*/React.createElement(_Menu, null, group.map(function (item, index) {
87
72
  if (item.children) {
@@ -100,7 +85,6 @@ var ButtonGroup = function ButtonGroup(props) {
100
85
  }), " ", child.exName || child.name));
101
86
  }));
102
87
  }
103
-
104
88
  return /*#__PURE__*/React.createElement(_Menu.Item, {
105
89
  key: index
106
90
  }, /*#__PURE__*/React.createElement("a", {
@@ -111,34 +95,31 @@ var ButtonGroup = function ButtonGroup(props) {
111
95
  icon: item.icon
112
96
  }), " ", item.exName || item.name));
113
97
  }));
114
- }; // 渲染按钮形式 (用于筛选)
115
-
116
-
98
+ };
99
+ // 渲染按钮形式 (用于筛选)
117
100
  var RenderButtonList = function RenderButtonList(item) {
118
101
  var exName = item.exName,
119
- name = item.name,
120
- type = item.type,
121
- icon = item.icon,
122
- ghost = item.ghost,
123
- danger = item.danger,
124
- disabled = item.disabled,
125
- loading = item.loading,
126
- fn = item.fn,
127
- code = item.code,
128
- rowParams = item.rowParams,
129
- others = __rest(item, ["exName", "name", "type", "icon", "ghost", "danger", "disabled", "loading", "fn", "code", "rowParams"]);
130
-
102
+ name = item.name,
103
+ type = item.type,
104
+ icon = item.icon,
105
+ ghost = item.ghost,
106
+ danger = item.danger,
107
+ disabled = item.disabled,
108
+ loading = item.loading,
109
+ fn = item.fn,
110
+ code = item.code,
111
+ rowParams = item.rowParams,
112
+ others = __rest(item, ["exName", "name", "type", "icon", "ghost", "danger", "disabled", "loading", "fn", "code", "rowParams"]);
131
113
  if (Array.isArray(item.children) && item.children.length > 0) {
132
- return /*#__PURE__*/React.createElement(_Dropdown, {
114
+ return /*#__PURE__*/React.createElement(_Dropdown, Object.assign({
133
115
  overlay: buttonMenu(item.children),
134
116
  placement: "bottomRight"
135
- }, /*#__PURE__*/React.createElement(_Button, {
117
+ }, (item === null || item === void 0 ? void 0 : item.dropdownConfig) || dropdownConfig || {}), /*#__PURE__*/React.createElement(_Button, {
136
118
  type: "primary"
137
119
  }, item.exName || item.name, " ", /*#__PURE__*/React.createElement(SpecIcon, {
138
120
  name: "down"
139
121
  })));
140
122
  }
141
-
142
123
  return /*#__PURE__*/React.createElement(_Button, Object.assign({
143
124
  type: type || 'primary',
144
125
  danger: danger,
@@ -152,9 +133,39 @@ var ButtonGroup = function ButtonGroup(props) {
152
133
  }),
153
134
  disabled: btnIsDisabled(disabled, rowParams)
154
135
  }), exName || name);
155
- }; // 渲染文本形式多级菜单列表(用于表格)
156
-
157
-
136
+ };
137
+ /*const textMenuItems = (group) => {
138
+ return (group || []).map((gItem: any, gIndex) => {
139
+ return {
140
+ disabled: btnIsDisabled(gItem.disabled, rowParams),
141
+ label: gItem.hasOwnProperty('confirmText') || gItem.hasOwnProperty('confirmConfig') ?
142
+ // @ts-ignore
143
+ <a disabled={btnIsDisabled(gItem.disabled, rowParams)}
144
+ onClick={gItem.fn ? () => {
145
+ setPopVisibleIndex(rowParams.rowIndex)
146
+ setPopRow(gItem)
147
+ } : null}>
148
+ {gItem.render ? gItem.render(...Object.keys(rowParams).map((pItem) => rowParams[pItem])) : (gItem.exName || gItem.name)}
149
+ </a>
150
+ : <a className="spec-button-group-text"
151
+ onClick={gItem.fn ? () => gItem.fn(...Object.keys(rowParams).map((pItem) => rowParams[pItem])) : null}
152
+ // @ts-ignore
153
+ disabled={btnIsDisabled(gItem.disabled, rowParams)}>
154
+ {gItem.render ? gItem.render(...Object.keys(rowParams).map((pItem) => rowParams[pItem])) : (gItem.exName || gItem.name)}
155
+ </a>,
156
+ key: gIndex + (gItem.exName || gItem.name),
157
+ children: gItem.children ? (gItem.children || []).map((child: any, childIndex: number) => {
158
+ return {
159
+ label: <a onClick={child.fn ? () => child.fn(...Object.keys(rowParams).map((pItem) => rowParams[pItem])) : null}>
160
+ {child.render ? child.render(...Object.keys(rowParams).map((pItem) => rowParams[pItem])) : (child.exName || child.name)}
161
+ </a>,
162
+ key: childIndex
163
+ }
164
+ }) : undefined
165
+ }
166
+ })
167
+ }*/
168
+ // 渲染文本形式多级菜单列表(用于表格)
158
169
  var textMenu = function textMenu(group) {
159
170
  return /*#__PURE__*/React.createElement(_Menu, {
160
171
  className: "spec-button-text-dropdown"
@@ -177,7 +188,6 @@ var ButtonGroup = function ButtonGroup(props) {
177
188
  }))) : child.exName || child.name));
178
189
  }));
179
190
  }
180
-
181
191
  return /*#__PURE__*/React.createElement(_Menu.Item, {
182
192
  key: gIndex,
183
193
  disabled: btnIsDisabled(gItem.disabled, rowParams)
@@ -205,15 +215,14 @@ var ButtonGroup = function ButtonGroup(props) {
205
215
  return rowParams[pItem];
206
216
  }))) : gItem.exName || gItem.name));
207
217
  }));
208
- }; // 渲染文本形式 列表(用于表格)
209
-
210
-
218
+ };
219
+ // 渲染文本形式 列表(用于表格)
211
220
  var RenderTextList = function RenderTextList(item) {
212
221
  if (Array.isArray(item.children) && item.children.length > 0) {
213
- return /*#__PURE__*/React.createElement(_Dropdown, {
222
+ return /*#__PURE__*/React.createElement(_Dropdown, Object.assign({
214
223
  overlay: textMenu(item.children),
215
224
  placement: "bottomRight"
216
- }, /*#__PURE__*/React.createElement("a", {
225
+ }, (item === null || item === void 0 ? void 0 : item.dropdownConfig) || dropdownConfig || {}), /*#__PURE__*/React.createElement("a", {
217
226
  className: "spec-button-group-text"
218
227
  }, item.render ? item.render.apply(item, _toConsumableArray(Object.keys(rowParams).map(function (pItem) {
219
228
  return rowParams[pItem];
@@ -221,7 +230,6 @@ var ButtonGroup = function ButtonGroup(props) {
221
230
  name: "down"
222
231
  })));
223
232
  }
224
-
225
233
  return /*#__PURE__*/React.createElement(React.Fragment, null, item.hasOwnProperty('confirmText') || item.hasOwnProperty('confirmConfig') ? /*#__PURE__*/React.createElement(_Popconfirm, Object.assign({
226
234
  placement: "topRight",
227
235
  icon: /*#__PURE__*/React.createElement(QuestionCircleOutlined, null)
@@ -232,7 +240,6 @@ var ButtonGroup = function ButtonGroup(props) {
232
240
  onCancel: function onCancel() {
233
241
  if (item.hasOwnProperty('confirmConfig') && item.confirmConfig.onCancel) {
234
242
  var _item$confirmConfig;
235
-
236
243
  (_item$confirmConfig = item.confirmConfig).onCancel.apply(_item$confirmConfig, _toConsumableArray(Object.keys(rowParams).map(function (pItem) {
237
244
  return rowParams[pItem];
238
245
  })));
@@ -241,7 +248,6 @@ var ButtonGroup = function ButtonGroup(props) {
241
248
  onConfirm: function onConfirm() {
242
249
  if (item.hasOwnProperty('confirmConfig') && item.confirmConfig.onConfirm) {
243
250
  var _item$confirmConfig2;
244
-
245
251
  (_item$confirmConfig2 = item.confirmConfig).onConfirm.apply(_item$confirmConfig2, _toConsumableArray(Object.keys(rowParams).map(function (pItem) {
246
252
  return rowParams[pItem];
247
253
  })));
@@ -273,9 +279,8 @@ var ButtonGroup = function ButtonGroup(props) {
273
279
  }, item.render ? item.render.apply(item, _toConsumableArray(Object.keys(rowParams).map(function (pItem) {
274
280
  return rowParams[pItem];
275
281
  }))) : item.exName || item.name));
276
- }; // 渲染展示的按钮列表
277
-
278
-
282
+ };
283
+ // 渲染展示的按钮列表
279
284
  var renderDisplayButton = function renderDisplayButton(item, index) {
280
285
  /*渲染自定义*/
281
286
  if (item.render) {
@@ -284,8 +289,6 @@ var ButtonGroup = function ButtonGroup(props) {
284
289
  }))) : item.render);
285
290
  }
286
291
  /*渲染按钮形式*/
287
-
288
-
289
292
  if (type === 'button') {
290
293
  return /*#__PURE__*/React.createElement(RenderButtonList, Object.assign({
291
294
  key: index
@@ -294,19 +297,14 @@ var ButtonGroup = function ButtonGroup(props) {
294
297
  }));
295
298
  }
296
299
  /*渲染文本形式*/
297
-
298
-
299
300
  return /*#__PURE__*/React.createElement(RenderTextList, Object.assign({
300
301
  key: index
301
302
  }, item));
302
303
  };
303
-
304
304
  if (min < 2) min = 2;
305
-
306
305
  if (resetList.length === 0) {
307
306
  return /*#__PURE__*/React.createElement(React.Fragment, null, type !== 'button' ? '-' : null);
308
307
  }
309
-
310
308
  if (resetList.length > min) {
311
309
  var forGroup = resetList.slice(0, min - 1);
312
310
  var forDrop = resetList.slice(min - 1);
@@ -314,10 +312,10 @@ var ButtonGroup = function ButtonGroup(props) {
314
312
  className: "spec-button-group"
315
313
  }, forGroup.map(function (item, index) {
316
314
  return index < min - 1 ? renderDisplayButton(item, index) : null;
317
- }), type === 'button' ? /*#__PURE__*/React.createElement(_Dropdown, {
315
+ }), type === 'button' ? /*#__PURE__*/React.createElement(_Dropdown, Object.assign({
318
316
  overlay: buttonMenu(forDrop),
319
317
  placement: "bottomRight"
320
- }, /*#__PURE__*/React.createElement(_Button, {
318
+ }, dropdownConfig), /*#__PURE__*/React.createElement(_Button, {
321
319
  type: "primary"
322
320
  }, "\u66F4\u591A ", /*#__PURE__*/React.createElement(SpecIcon, {
323
321
  name: "down"
@@ -331,22 +329,20 @@ var ButtonGroup = function ButtonGroup(props) {
331
329
  extraRow: rowParams
332
330
  })),
333
331
  onCancel: function onCancel() {
334
- setPopVisibleIndex(-1); // 优先调用其 confirmConfig 配置的 onCancel 事件
335
-
332
+ setPopVisibleIndex(-1);
333
+ // 优先调用其 confirmConfig 配置的 onCancel 事件
336
334
  if (popRow.hasOwnProperty('confirmConfig') && popRow.confirmConfig.onCancel) {
337
335
  var _popRow$confirmConfig;
338
-
339
336
  (_popRow$confirmConfig = popRow.confirmConfig).onCancel.apply(_popRow$confirmConfig, _toConsumableArray(Object.keys(rowParams).map(function (pItem) {
340
337
  return rowParams[pItem];
341
338
  })));
342
339
  }
343
340
  },
344
341
  onConfirm: function onConfirm() {
345
- setPopVisibleIndex(-1); // 优先调用其 confirmConfig 配置的 onConfirm 事件
346
-
342
+ setPopVisibleIndex(-1);
343
+ // 优先调用其 confirmConfig 配置的 onConfirm 事件
347
344
  if (popRow.hasOwnProperty('confirmConfig') && popRow.confirmConfig.onConfirm) {
348
345
  var _popRow$confirmConfig2;
349
-
350
346
  (_popRow$confirmConfig2 = popRow.confirmConfig).onConfirm.apply(_popRow$confirmConfig2, _toConsumableArray(Object.keys(rowParams).map(function (pItem) {
351
347
  return rowParams[pItem];
352
348
  })));
@@ -356,19 +352,17 @@ var ButtonGroup = function ButtonGroup(props) {
356
352
  })));
357
353
  }
358
354
  }
359
- }), /*#__PURE__*/React.createElement(_Dropdown, {
355
+ }), /*#__PURE__*/React.createElement(_Dropdown, Object.assign({
360
356
  overlay: textMenu(forDrop),
361
357
  placement: "bottomRight"
362
- }, /*#__PURE__*/React.createElement("a", {
358
+ }, dropdownConfig), /*#__PURE__*/React.createElement("a", {
363
359
  className: "spec-button-group-text"
364
360
  }, "\u66F4\u591A ", /*#__PURE__*/React.createElement(DownOutlined, null)))));
365
361
  }
366
-
367
362
  return /*#__PURE__*/React.createElement("span", {
368
363
  className: "spec-button-group"
369
364
  }, resetList.map(function (item, index) {
370
365
  return renderDisplayButton(item, index);
371
366
  }));
372
367
  };
373
-
374
368
  export default ButtonGroup;
@@ -1,21 +1,17 @@
1
1
  import React from 'react';
2
2
  import classNames from 'classnames';
3
3
  import './index.less';
4
-
5
4
  var DragBar = function DragBar(props) {
6
5
  var direction = props.direction,
7
- className = props.className,
8
- onMouseDown = props.onMouseDown;
6
+ className = props.className,
7
+ onMouseDown = props.onMouseDown;
9
8
  var directionStyle = direction === 'left' ? "spec-grid-dragbar-left-horizontal" : direction === 'right' ? "spec-grid-dragbar-right-horizontal" : direction === 'top' ? "spec-grid-dragbar-up-vertical" : "spec-grid-dragbar-down-vertical";
10
-
11
9
  var handleMouseDown = function handleMouseDown(e) {
12
10
  onMouseDown(e, direction);
13
11
  };
14
-
15
12
  return /*#__PURE__*/React.createElement("div", {
16
13
  className: classNames(directionStyle, className),
17
14
  onMouseDown: handleMouseDown
18
15
  });
19
16
  };
20
-
21
17
  export default DragBar;