fan-standard-comp 3.1.10 → 3.2.0
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/Readme.md +35 -0
- package/dist/fan-standard-comp.umd.js +15 -15
- package/es/ButtonGroup/ButtonList.js +0 -3
- package/es/ButtonGroup/ButtonMenu.js +0 -3
- package/es/ButtonGroup/PopConfirmTitle.js +5 -15
- package/es/ButtonGroup/index.js +212 -216
- package/es/ButtonGroup/style/index.less +1 -1
- package/es/DragContent/DragBar.js +2 -6
- package/es/DragContent/index.js +44 -75
- package/es/FormComp/ChunkUploader/api.js +6 -10
- package/es/FormComp/ChunkUploader/index.js +105 -171
- package/es/FormComp/ChunkUploader/lib.js +4 -17
- package/es/FormComp/ChunkUploader/upload-queue.class.js +10 -45
- package/es/FormComp/ChunkUploader/worker.js +0 -3
- package/es/FormComp/EditButton/index.js +24 -49
- package/es/FormComp/FieldComponent/ReUpload.js +18 -38
- package/es/FormComp/FieldComponent/RefactorTreeSelect.js +36 -74
- package/es/FormComp/FieldComponent/TitleNode.js +1 -3
- package/es/FormComp/FieldComponent/index.js +38 -74
- package/es/FormComp/FieldComponent/setReadonlyValues.js +34 -63
- package/es/FormComp/RenderItemGroup/index.js +46 -74
- package/es/FormComp/Uploader/index.js +36 -77
- package/es/FormComp/Uploader/util.js +0 -6
- package/es/FormComp/VarTemplate/index.js +58 -96
- package/es/NavLeafScroll/index.js +172 -154
- package/es/NavLeafScroll/style/index.less +33 -1
- package/es/RefactorTree/index.js +36 -53
- package/es/RefactorTree/indexTreeNode.js +35 -68
- package/es/RefactorTree/util.js +9 -43
- package/es/SpecIcon/fonts/iconfont.js +7 -12
- package/es/SpecIcon/index.js +16 -25
- package/es/SplitterLayout/Pane.js +2 -5
- package/es/SplitterLayout/index.js +20 -70
- package/es/StandardContent/SplitterLayout/Pane.js +6 -10
- package/es/StandardContent/SplitterLayout/index.js +12 -63
- package/es/StandardContent/SubfieldContent.js +12 -14
- package/es/StandardContent/WrapperContent.js +8 -10
- package/es/StandardDragModal/ChangeStandardModal.d.ts +44 -0
- package/es/StandardDragModal/ChangeStandardModal.js +493 -0
- package/es/StandardDragModal/DraggableModal.d.ts +7 -0
- package/es/StandardDragModal/DraggableModal.js +31 -0
- package/es/StandardDragModal/DraggableModalContext.d.ts +9 -0
- package/es/StandardDragModal/DraggableModalContext.js +5 -0
- package/es/StandardDragModal/DraggableModalInner.d.ts +16 -0
- package/es/StandardDragModal/DraggableModalInner.js +114 -0
- package/es/StandardDragModal/DraggableModalProvider.d.ts +4 -0
- package/es/StandardDragModal/DraggableModalProvider.js +40 -0
- package/es/StandardDragModal/Modal.d.ts +11 -0
- package/es/StandardDragModal/Modal.js +24 -0
- package/es/StandardDragModal/ResizeHandle.d.ts +2 -0
- package/es/StandardDragModal/ResizeHandle.js +8 -0
- package/es/StandardDragModal/clamp.d.ts +1 -0
- package/es/StandardDragModal/clamp.js +3 -0
- package/es/StandardDragModal/draggableModalReducer.d.ts +66 -0
- package/es/StandardDragModal/draggableModalReducer.js +157 -0
- package/es/StandardDragModal/getWindowSize.d.ts +4 -0
- package/es/StandardDragModal/getWindowSize.js +6 -0
- package/es/StandardDragModal/index.d.ts +3 -11
- package/es/StandardDragModal/index.js +3 -30
- package/es/StandardDragModal/index.less +65 -0
- package/es/StandardDragModal/useDrag.d.ts +5 -0
- package/es/StandardDragModal/useDrag.js +66 -0
- package/es/StandardDragModal/usePrevious.d.ts +1 -0
- package/es/StandardDragModal/usePrevious.js +8 -0
- package/es/StandardDragModal/useResize.d.ts +7 -0
- package/es/StandardDragModal/useResize.js +74 -0
- package/es/StandardFilter/index.js +30 -70
- package/es/StandardForm/ActionList.js +5 -7
- package/es/StandardForm/StepForm.js +50 -71
- package/es/StandardForm/TabForm.js +58 -70
- package/es/StandardForm/index.js +37 -56
- package/es/StandardModal/UpdateFormRef.js +1 -4
- package/es/StandardModal/index.d.ts +0 -1
- package/es/StandardModal/index.js +113 -157
- package/es/StandardPanel/index.js +19 -35
- package/es/StandardTable/index.js +18 -29
- package/es/components/IconNode/index.js +0 -4
- package/es/index.d.ts +1 -0
- package/es/index.js +15 -14
- package/es/utils/ValueFormat.js +0 -9
- package/es/utils/dictSelectUtil.js +153 -0
- package/es/utils/filterPermission.js +16 -34
- package/es/utils/getParentNodes.js +24 -47
- package/es/utils/index.js +2 -1
- package/lib/ButtonGroup/ButtonList.js +1 -13
- package/lib/ButtonGroup/ButtonMenu.js +1 -8
- package/lib/ButtonGroup/PopConfirmTitle.js +3 -16
- package/lib/ButtonGroup/index.js +215 -239
- package/lib/ButtonGroup/style/index.less +1 -1
- package/lib/DragContent/DragBar.js +2 -10
- package/lib/DragContent/index.js +47 -85
- package/lib/FormComp/ChunkUploader/api.js +6 -15
- package/lib/FormComp/ChunkUploader/index.js +107 -185
- package/lib/FormComp/ChunkUploader/lib.js +8 -27
- package/lib/FormComp/ChunkUploader/upload-queue.class.js +10 -46
- package/lib/FormComp/ChunkUploader/worker.js +1 -5
- package/lib/FormComp/EditButton/index.js +26 -60
- package/lib/FormComp/FieldComponent/ReUpload.js +21 -50
- package/lib/FormComp/FieldComponent/RefactorTreeSelect.js +38 -89
- package/lib/FormComp/FieldComponent/TitleNode.js +1 -5
- package/lib/FormComp/FieldComponent/index.js +38 -110
- package/lib/FormComp/FieldComponent/setReadonlyValues.js +37 -79
- package/lib/FormComp/RenderItemGroup/index.js +46 -87
- package/lib/FormComp/Uploader/index.js +38 -95
- package/lib/FormComp/Uploader/util.js +1 -9
- package/lib/FormComp/VarTemplate/index.js +62 -106
- package/lib/FormComp/index.js +0 -2
- package/lib/NavLeafScroll/index.js +174 -165
- package/lib/NavLeafScroll/style/index.less +33 -1
- package/lib/RefactorTree/index.js +36 -67
- package/lib/RefactorTree/indexTreeNode.js +37 -83
- package/lib/RefactorTree/util.js +11 -45
- package/lib/SpecIcon/fonts/iconfont.js +7 -12
- package/lib/SpecIcon/index.js +16 -30
- package/lib/SplitterLayout/Pane.js +0 -7
- package/lib/SplitterLayout/index.js +18 -72
- package/lib/StandardContent/SplitterLayout/Pane.js +6 -14
- package/lib/StandardContent/SplitterLayout/index.js +12 -68
- package/lib/StandardContent/SubfieldContent.js +12 -21
- package/lib/StandardContent/WrapperContent.js +8 -16
- package/lib/StandardDragModal/ChangeStandardModal.d.ts +44 -0
- package/lib/StandardDragModal/ChangeStandardModal.js +502 -0
- package/lib/StandardDragModal/DraggableModal.d.ts +7 -0
- package/lib/StandardDragModal/DraggableModal.js +40 -0
- package/lib/StandardDragModal/DraggableModalContext.d.ts +9 -0
- package/lib/StandardDragModal/DraggableModalContext.js +15 -0
- package/lib/StandardDragModal/DraggableModalInner.d.ts +16 -0
- package/lib/StandardDragModal/DraggableModalInner.js +124 -0
- package/lib/StandardDragModal/DraggableModalProvider.d.ts +4 -0
- package/lib/StandardDragModal/DraggableModalProvider.js +48 -0
- package/lib/StandardDragModal/Modal.d.ts +11 -0
- package/lib/StandardDragModal/Modal.js +32 -0
- package/lib/StandardDragModal/ResizeHandle.d.ts +2 -0
- package/lib/StandardDragModal/ResizeHandle.js +18 -0
- package/lib/StandardDragModal/clamp.d.ts +1 -0
- package/lib/StandardDragModal/clamp.js +10 -0
- package/lib/StandardDragModal/draggableModalReducer.d.ts +66 -0
- package/lib/StandardDragModal/draggableModalReducer.js +167 -0
- package/lib/StandardDragModal/getWindowSize.d.ts +4 -0
- package/lib/StandardDragModal/getWindowSize.js +13 -0
- package/lib/StandardDragModal/index.d.ts +3 -11
- package/lib/StandardDragModal/index.js +33 -38
- package/lib/StandardDragModal/index.less +65 -0
- package/lib/StandardDragModal/useDrag.d.ts +5 -0
- package/lib/StandardDragModal/useDrag.js +73 -0
- package/lib/StandardDragModal/usePrevious.d.ts +1 -0
- package/lib/StandardDragModal/usePrevious.js +15 -0
- package/lib/StandardDragModal/useResize.d.ts +7 -0
- package/lib/StandardDragModal/useResize.js +81 -0
- package/lib/StandardFilter/index.js +28 -78
- package/lib/StandardForm/ActionList.js +5 -12
- package/lib/StandardForm/StepForm.js +52 -90
- package/lib/StandardForm/TabForm.js +61 -88
- package/lib/StandardForm/index.js +40 -75
- package/lib/StandardModal/UpdateFormRef.js +4 -12
- package/lib/StandardModal/index.d.ts +0 -1
- package/lib/StandardModal/index.js +115 -182
- package/lib/StandardPanel/index.js +22 -48
- package/lib/StandardTable/index.js +18 -38
- package/lib/components/IconNode/index.js +0 -7
- package/lib/components/index.js +0 -2
- package/lib/data/index.js +4 -7
- package/lib/index.d.ts +1 -0
- package/lib/index.js +50 -68
- package/lib/utils/ValueFormat.js +0 -10
- package/lib/utils/dictSelectUtil.js +161 -0
- package/lib/utils/filterPermission.js +15 -39
- package/lib/utils/getParentNodes.js +25 -52
- package/lib/utils/index.js +24 -9
- package/package.json +5 -4
package/lib/ButtonGroup/index.js
CHANGED
|
@@ -1,108 +1,70 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(
|
|
4
|
-
|
|
3
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.default = void 0;
|
|
9
|
-
|
|
10
8
|
require("antd/es/popconfirm/style");
|
|
11
|
-
|
|
12
9
|
var _popconfirm = _interopRequireDefault(require("antd/es/popconfirm"));
|
|
13
|
-
|
|
14
10
|
require("antd/es/button/style");
|
|
15
|
-
|
|
16
11
|
var _button = _interopRequireDefault(require("antd/es/button"));
|
|
17
|
-
|
|
18
12
|
require("antd/es/dropdown/style");
|
|
19
|
-
|
|
20
13
|
var _dropdown = _interopRequireDefault(require("antd/es/dropdown"));
|
|
21
|
-
|
|
22
|
-
require("antd/es/menu/style");
|
|
23
|
-
|
|
24
|
-
var _menu = _interopRequireDefault(require("antd/es/menu"));
|
|
25
|
-
|
|
26
14
|
var _tslib = require("tslib");
|
|
27
|
-
|
|
28
15
|
var _react = _interopRequireWildcard(require("react"));
|
|
29
|
-
|
|
30
16
|
var _index = require("../components/index");
|
|
31
|
-
|
|
32
17
|
var _index2 = _interopRequireDefault(require("../SpecIcon/index"));
|
|
33
|
-
|
|
34
18
|
var _PopConfirmTitle = _interopRequireDefault(require("./PopConfirmTitle"));
|
|
35
|
-
|
|
36
19
|
var _index3 = require("../data/index");
|
|
37
|
-
|
|
38
20
|
var _icons = require("@ant-design/icons");
|
|
39
|
-
|
|
40
|
-
var _filterPermission = require("../utils/filterPermission.js");
|
|
41
|
-
|
|
21
|
+
var _filterPermission = require("../utils/filterPermission");
|
|
42
22
|
require("./style/index.less");
|
|
43
|
-
|
|
44
|
-
function
|
|
45
|
-
|
|
46
|
-
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
47
|
-
|
|
23
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
24
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
48
25
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
49
|
-
|
|
50
26
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
51
|
-
|
|
52
27
|
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."); }
|
|
53
|
-
|
|
54
|
-
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); }
|
|
55
|
-
|
|
28
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
56
29
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
57
|
-
|
|
58
30
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
59
|
-
|
|
60
31
|
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."); }
|
|
61
|
-
|
|
62
32
|
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); }
|
|
63
|
-
|
|
64
33
|
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; }
|
|
65
|
-
|
|
66
|
-
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; }
|
|
67
|
-
|
|
34
|
+
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; } }
|
|
68
35
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
69
|
-
|
|
70
36
|
var ButtonGroup = function ButtonGroup(props) {
|
|
71
37
|
var _props$type = props.type,
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
38
|
+
type = _props$type === void 0 ? 'button' : _props$type,
|
|
39
|
+
_props$rowParams = props.rowParams,
|
|
40
|
+
rowParams = _props$rowParams === void 0 ? {
|
|
41
|
+
text: undefined,
|
|
42
|
+
record: undefined,
|
|
43
|
+
rowIndex: undefined
|
|
44
|
+
} : _props$rowParams,
|
|
45
|
+
_props$codes = props.codes,
|
|
46
|
+
codes = _props$codes === void 0 ? _index3.funcCode.btnFuncCodes : _props$codes,
|
|
47
|
+
permissionCodes = props.permissionCodes,
|
|
48
|
+
_props$dropdownConfig = props.dropdownConfig,
|
|
49
|
+
dropdownConfig = _props$dropdownConfig === void 0 ? {} : _props$dropdownConfig;
|
|
84
50
|
var _props$options = props.options,
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
51
|
+
options = _props$options === void 0 ? [] : _props$options,
|
|
52
|
+
_props$min = props.min,
|
|
53
|
+
min = _props$min === void 0 ? 3 : _props$min; // 最小展示长度不能小于2
|
|
54
|
+
var moreText = '更多';
|
|
89
55
|
if (!options) return null; // 没有配置list返回null
|
|
90
|
-
|
|
91
56
|
var _useState = (0, _react.useState)(-1),
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
57
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
58
|
+
popVisibleIndex = _useState2[0],
|
|
59
|
+
setPopVisibleIndex = _useState2[1];
|
|
96
60
|
var _useState3 = (0, _react.useState)({}),
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
61
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
62
|
+
popRow = _useState4[0],
|
|
63
|
+
setPopRow = _useState4[1];
|
|
101
64
|
var _useState5 = (0, _react.useState)([]),
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
65
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
66
|
+
resetList = _useState6[0],
|
|
67
|
+
setResetList = _useState6[1];
|
|
106
68
|
(0, _react.useEffect)(function () {
|
|
107
69
|
// 重组选项options集合数据,排除:无权限(有配置code,并且不包含permissionCodes内)的数据及,isHide 为true的数据
|
|
108
70
|
setResetList(_toConsumableArray((0, _filterPermission.removeNoPermission)(options, permissionCodes, codes, rowParams)) || []);
|
|
@@ -112,65 +74,140 @@ var ButtonGroup = function ButtonGroup(props) {
|
|
|
112
74
|
}, [options, codes, permissionCodes]);
|
|
113
75
|
(0, _react.useEffect)(function () {
|
|
114
76
|
setPopVisibleIndex(-1);
|
|
115
|
-
}, [rowParams]);
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
77
|
+
}, [rowParams]);
|
|
78
|
+
/* // 渲染按钮多层级形式 (用于筛选)
|
|
79
|
+
const buttonMenu = (group: any) => {
|
|
80
|
+
return (<Menu>
|
|
81
|
+
{
|
|
82
|
+
group.map((item: any, index: number) => {
|
|
83
|
+
if (item.children) {
|
|
84
|
+
return <Menu.SubMenu title={item.exName || item.name} key={index}>
|
|
85
|
+
{
|
|
86
|
+
item.children.map((child: any, childIndex: number) => {
|
|
87
|
+
return (<Menu.Item key={childIndex}>
|
|
88
|
+
<a onClick={child.fn ? () => child.fn(child) : null}
|
|
89
|
+
>
|
|
90
|
+
<IconNode icon={child.icon}/> {child.exName || child.name}
|
|
91
|
+
</a>
|
|
92
|
+
</Menu.Item>)
|
|
93
|
+
})
|
|
94
|
+
}
|
|
95
|
+
</Menu.SubMenu>
|
|
96
|
+
}
|
|
97
|
+
return (
|
|
98
|
+
<Menu.Item key={index}>
|
|
99
|
+
<a onClick={item.fn ? () => item.fn(item) : null}>
|
|
100
|
+
<IconNode icon={item.icon}/> {item.exName || item.name}
|
|
101
|
+
</a>
|
|
102
|
+
</Menu.Item>
|
|
103
|
+
)
|
|
104
|
+
})
|
|
105
|
+
}
|
|
106
|
+
</Menu>)
|
|
107
|
+
};
|
|
108
|
+
// 渲染文本形式多级菜单列表(用于表格)
|
|
109
|
+
const textMenu = (group: any[]) => {
|
|
110
|
+
return (
|
|
111
|
+
<Menu className="spec-button-text-dropdown">
|
|
112
|
+
{
|
|
113
|
+
group.map((gItem: any, gIndex: number) => {
|
|
114
|
+
|
|
115
|
+
if (gItem.children) {
|
|
116
|
+
return <Menu.SubMenu title={gItem.exName || gItem.name} key={gItem}>
|
|
117
|
+
{
|
|
118
|
+
gItem.children.map((child: any, childIndex: number) => <Menu.Item key={childIndex}>
|
|
119
|
+
<a onClick={child.fn ? () => child.fn(...Object.keys(rowParams).map((pItem) => rowParams[pItem])) : null}>
|
|
120
|
+
{child.render ? child.render(...Object.keys(rowParams).map((pItem) => rowParams[pItem])) : (child.exName || child.name)}
|
|
121
|
+
</a>
|
|
122
|
+
</Menu.Item>)
|
|
123
|
+
}
|
|
124
|
+
</Menu.SubMenu>
|
|
125
|
+
}
|
|
126
|
+
return <Menu.Item key={gIndex}
|
|
127
|
+
disabled={btnIsDisabled(gItem.disabled, rowParams)}>
|
|
128
|
+
{
|
|
129
|
+
gItem.hasOwnProperty('confirmText') || gItem.hasOwnProperty('confirmConfig') ?
|
|
130
|
+
// @ts-ignore
|
|
131
|
+
<a disabled={btnIsDisabled(gItem.disabled, rowParams)}
|
|
132
|
+
onClick={gItem.fn ? () => {
|
|
133
|
+
setPopVisibleIndex(rowParams.rowIndex)
|
|
134
|
+
setPopRow(gItem)
|
|
135
|
+
} : null}>
|
|
136
|
+
{gItem.render ? gItem.render(...Object.keys(rowParams).map((pItem) => rowParams[pItem])) : (gItem.exName || gItem.name)}
|
|
137
|
+
</a>
|
|
138
|
+
: <a className="spec-button-group-text"
|
|
139
|
+
onClick={gItem.fn ? () => gItem.fn(...Object.keys(rowParams).map((pItem) => rowParams[pItem])) : null}
|
|
140
|
+
// @ts-ignore
|
|
141
|
+
disabled={btnIsDisabled(gItem.disabled, rowParams)}>
|
|
142
|
+
{gItem.render ? gItem.render(...Object.keys(rowParams).map((pItem) => rowParams[pItem])) : (gItem.exName || gItem.name)}
|
|
143
|
+
</a>
|
|
144
|
+
}
|
|
145
|
+
</Menu.Item>
|
|
146
|
+
})
|
|
147
|
+
}
|
|
148
|
+
</Menu>
|
|
149
|
+
)
|
|
150
|
+
};*/
|
|
151
|
+
// 递归转换原来的数组结构
|
|
152
|
+
var deepTransButtonMenus = function deepTransButtonMenus(groupArray) {
|
|
153
|
+
if (!Array.isArray(groupArray)) {
|
|
154
|
+
return [];
|
|
155
|
+
}
|
|
156
|
+
return groupArray.map(function (vItem, i) {
|
|
157
|
+
var code = vItem.code,
|
|
158
|
+
fn = vItem.fn,
|
|
159
|
+
exName = vItem.exName,
|
|
160
|
+
name = vItem.name,
|
|
161
|
+
children = vItem.children,
|
|
162
|
+
icon = vItem.icon,
|
|
163
|
+
others = (0, _tslib.__rest)(vItem, ["code", "fn", "exName", "name", "children", "icon"]);
|
|
164
|
+
return Object.assign(Object.assign({}, others), {
|
|
165
|
+
key: code ? code + i : i,
|
|
166
|
+
icon: /*#__PURE__*/_react.default.createElement(_index.IconNode, {
|
|
167
|
+
icon: icon
|
|
168
|
+
}),
|
|
169
|
+
label: /*#__PURE__*/_react.default.createElement("a", {
|
|
170
|
+
onClick: function onClick() {
|
|
171
|
+
return fn && fn(vItem);
|
|
172
|
+
}
|
|
173
|
+
}, exName || name),
|
|
174
|
+
children: children && children.length > 0 ? deepTransButtonMenus(children) : undefined
|
|
175
|
+
});
|
|
176
|
+
});
|
|
177
|
+
};
|
|
178
|
+
// 自定义渲染显示的文本
|
|
179
|
+
var renderCustomLabel = function renderCustomLabel(gItem) {
|
|
180
|
+
return gItem.render ? gItem.render.apply(gItem, _toConsumableArray(Object.keys(rowParams).map(function (pItem) {
|
|
181
|
+
return rowParams[pItem];
|
|
182
|
+
}))) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, gItem.icon ? ' ' : '', gItem.exName || gItem.name);
|
|
183
|
+
};
|
|
184
|
+
// 渲染按钮形式 (用于筛选)
|
|
149
185
|
var RenderButtonList = function RenderButtonList(item) {
|
|
150
186
|
var exName = item.exName,
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
187
|
+
name = item.name,
|
|
188
|
+
type = item.type,
|
|
189
|
+
icon = item.icon,
|
|
190
|
+
ghost = item.ghost,
|
|
191
|
+
danger = item.danger,
|
|
192
|
+
disabled = item.disabled,
|
|
193
|
+
loading = item.loading,
|
|
194
|
+
fn = item.fn,
|
|
195
|
+
code = item.code,
|
|
196
|
+
rowParams = item.rowParams,
|
|
197
|
+
others = (0, _tslib.__rest)(item, ["exName", "name", "type", "icon", "ghost", "danger", "disabled", "loading", "fn", "code", "rowParams"]);
|
|
163
198
|
if (Array.isArray(item.children) && item.children.length > 0) {
|
|
199
|
+
// overlay={buttonMenu(item.children)}
|
|
164
200
|
return /*#__PURE__*/_react.default.createElement(_dropdown.default, Object.assign({
|
|
165
|
-
|
|
201
|
+
menu: {
|
|
202
|
+
items: deepTransButtonMenus(item.children)
|
|
203
|
+
},
|
|
166
204
|
placement: "bottomRight"
|
|
167
205
|
}, (item === null || item === void 0 ? void 0 : item.dropdownConfig) || dropdownConfig || {}), /*#__PURE__*/_react.default.createElement(_button.default, {
|
|
168
206
|
type: "primary"
|
|
169
|
-
},
|
|
207
|
+
}, item.exName || item.name || item.label, " ", /*#__PURE__*/_react.default.createElement(_index2.default, {
|
|
170
208
|
name: "down"
|
|
171
209
|
})));
|
|
172
210
|
}
|
|
173
|
-
|
|
174
211
|
return /*#__PURE__*/_react.default.createElement(_button.default, Object.assign({
|
|
175
212
|
type: type || 'primary',
|
|
176
213
|
danger: danger,
|
|
@@ -183,99 +220,51 @@ var ButtonGroup = function ButtonGroup(props) {
|
|
|
183
220
|
icon: icon
|
|
184
221
|
}),
|
|
185
222
|
disabled: (0, _filterPermission.btnIsDisabled)(disabled, rowParams)
|
|
186
|
-
}), exName || name);
|
|
223
|
+
}), exName || name || others.label);
|
|
187
224
|
};
|
|
188
|
-
|
|
189
|
-
|
|
225
|
+
// 递归转换原来的数组结构
|
|
226
|
+
var deepTransTextMenus = function deepTransTextMenus(groupArray) {
|
|
227
|
+
if (!Array.isArray(groupArray)) {
|
|
228
|
+
return [];
|
|
229
|
+
}
|
|
230
|
+
return groupArray.map(function (vItem, i) {
|
|
231
|
+
var code = vItem.code,
|
|
232
|
+
fn = vItem.fn,
|
|
233
|
+
exName = vItem.exName,
|
|
234
|
+
name = vItem.name,
|
|
235
|
+
children = vItem.children,
|
|
236
|
+
icon = vItem.icon,
|
|
237
|
+
confirmText = vItem.confirmText,
|
|
238
|
+
confirmConfig = vItem.confirmConfig,
|
|
239
|
+
others = (0, _tslib.__rest)(vItem, ["code", "fn", "exName", "name", "children", "icon", "confirmText", "confirmConfig"]);
|
|
190
240
|
return {
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
// @ts-ignore
|
|
204
|
-
disabled={btnIsDisabled(gItem.disabled, rowParams)}>
|
|
205
|
-
{gItem.render ? gItem.render(...Object.keys(rowParams).map((pItem) => rowParams[pItem])) : (gItem.exName || gItem.name)}
|
|
206
|
-
</a>,
|
|
207
|
-
key: gIndex + (gItem.exName || gItem.name),
|
|
208
|
-
children: gItem.children ? (gItem.children || []).map((child: any, childIndex: number) => {
|
|
209
|
-
return {
|
|
210
|
-
label: <a onClick={child.fn ? () => child.fn(...Object.keys(rowParams).map((pItem) => rowParams[pItem])) : null}>
|
|
211
|
-
{child.render ? child.render(...Object.keys(rowParams).map((pItem) => rowParams[pItem])) : (child.exName || child.name)}
|
|
212
|
-
</a>,
|
|
213
|
-
key: childIndex
|
|
241
|
+
danger: others.danger,
|
|
242
|
+
disabled: (0, _filterPermission.btnIsDisabled)(others.disabled, rowParams),
|
|
243
|
+
key: code ? code + i : i,
|
|
244
|
+
// icon: <IconNode icon={icon}/>, // 不显示图标
|
|
245
|
+
label: /*#__PURE__*/_react.default.createElement("a", {
|
|
246
|
+
onClick: function onClick() {
|
|
247
|
+
// 配置二次确认
|
|
248
|
+
if (vItem.hasOwnProperty('confirmText') || vItem.hasOwnProperty('confirmConfig')) {
|
|
249
|
+
fn ? (setPopVisibleIndex(rowParams.rowIndex), setPopRow(vItem)) : null;
|
|
250
|
+
} else {
|
|
251
|
+
fn && fn(vItem);
|
|
252
|
+
}
|
|
214
253
|
}
|
|
215
|
-
})
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
var textMenu = function textMenu(group) {
|
|
223
|
-
return /*#__PURE__*/_react.default.createElement(_menu.default, {
|
|
224
|
-
className: "spec-button-text-dropdown"
|
|
225
|
-
}, group.map(function (gItem, gIndex) {
|
|
226
|
-
if (gItem.children) {
|
|
227
|
-
return /*#__PURE__*/_react.default.createElement(_menu.default.SubMenu, {
|
|
228
|
-
title: gItem.exName || gItem.name,
|
|
229
|
-
key: gItem
|
|
230
|
-
}, gItem.children.map(function (child, childIndex) {
|
|
231
|
-
return /*#__PURE__*/_react.default.createElement(_menu.default.Item, {
|
|
232
|
-
key: childIndex
|
|
233
|
-
}, /*#__PURE__*/_react.default.createElement("a", {
|
|
234
|
-
onClick: child.fn ? function () {
|
|
235
|
-
return child.fn.apply(child, _toConsumableArray(Object.keys(rowParams).map(function (pItem) {
|
|
236
|
-
return rowParams[pItem];
|
|
237
|
-
})));
|
|
238
|
-
} : null
|
|
239
|
-
}, child.render ? child.render.apply(child, _toConsumableArray(Object.keys(rowParams).map(function (pItem) {
|
|
240
|
-
return rowParams[pItem];
|
|
241
|
-
}))) : child.exName || child.name));
|
|
242
|
-
}));
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
return /*#__PURE__*/_react.default.createElement(_menu.default.Item, {
|
|
246
|
-
key: gIndex,
|
|
247
|
-
disabled: (0, _filterPermission.btnIsDisabled)(gItem.disabled, rowParams)
|
|
248
|
-
}, gItem.hasOwnProperty('confirmText') || gItem.hasOwnProperty('confirmConfig') ?
|
|
249
|
-
/*#__PURE__*/
|
|
250
|
-
// @ts-ignore
|
|
251
|
-
_react.default.createElement("a", {
|
|
252
|
-
disabled: (0, _filterPermission.btnIsDisabled)(gItem.disabled, rowParams),
|
|
253
|
-
onClick: gItem.fn ? function () {
|
|
254
|
-
setPopVisibleIndex(rowParams.rowIndex);
|
|
255
|
-
setPopRow(gItem);
|
|
256
|
-
} : null
|
|
257
|
-
}, gItem.render ? gItem.render.apply(gItem, _toConsumableArray(Object.keys(rowParams).map(function (pItem) {
|
|
258
|
-
return rowParams[pItem];
|
|
259
|
-
}))) : gItem.exName || gItem.name) : /*#__PURE__*/_react.default.createElement("a", {
|
|
260
|
-
className: "spec-button-group-text",
|
|
261
|
-
onClick: gItem.fn ? function () {
|
|
262
|
-
return gItem.fn.apply(gItem, _toConsumableArray(Object.keys(rowParams).map(function (pItem) {
|
|
263
|
-
return rowParams[pItem];
|
|
264
|
-
})));
|
|
265
|
-
} : null,
|
|
266
|
-
// @ts-ignore
|
|
267
|
-
disabled: (0, _filterPermission.btnIsDisabled)(gItem.disabled, rowParams)
|
|
268
|
-
}, gItem.render ? gItem.render.apply(gItem, _toConsumableArray(Object.keys(rowParams).map(function (pItem) {
|
|
269
|
-
return rowParams[pItem];
|
|
270
|
-
}))) : gItem.exName || gItem.name));
|
|
271
|
-
}));
|
|
272
|
-
}; // 渲染文本形式 列表(用于表格)
|
|
273
|
-
|
|
274
|
-
|
|
254
|
+
}, renderCustomLabel(vItem)),
|
|
255
|
+
title: vItem.exName || vItem.name,
|
|
256
|
+
children: children && children.length > 0 ? deepTransTextMenus(children) : undefined
|
|
257
|
+
};
|
|
258
|
+
});
|
|
259
|
+
};
|
|
260
|
+
// 渲染文本形式 列表(用于表格)
|
|
275
261
|
var RenderTextList = function RenderTextList(item) {
|
|
276
262
|
if (Array.isArray(item.children) && item.children.length > 0) {
|
|
263
|
+
// overlay={textMenu(item.children)}
|
|
277
264
|
return /*#__PURE__*/_react.default.createElement(_dropdown.default, Object.assign({
|
|
278
|
-
|
|
265
|
+
menu: {
|
|
266
|
+
items: deepTransTextMenus(item.children)
|
|
267
|
+
},
|
|
279
268
|
placement: "bottomRight"
|
|
280
269
|
}, (item === null || item === void 0 ? void 0 : item.dropdownConfig) || dropdownConfig || {}), /*#__PURE__*/_react.default.createElement("a", {
|
|
281
270
|
className: "spec-button-group-text"
|
|
@@ -285,7 +274,6 @@ var ButtonGroup = function ButtonGroup(props) {
|
|
|
285
274
|
name: "down"
|
|
286
275
|
})));
|
|
287
276
|
}
|
|
288
|
-
|
|
289
277
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, item.hasOwnProperty('confirmText') || item.hasOwnProperty('confirmConfig') ? /*#__PURE__*/_react.default.createElement(_popconfirm.default, Object.assign({
|
|
290
278
|
placement: "topRight",
|
|
291
279
|
icon: /*#__PURE__*/_react.default.createElement(_icons.QuestionCircleOutlined, null)
|
|
@@ -296,7 +284,6 @@ var ButtonGroup = function ButtonGroup(props) {
|
|
|
296
284
|
onCancel: function onCancel() {
|
|
297
285
|
if (item.hasOwnProperty('confirmConfig') && item.confirmConfig.onCancel) {
|
|
298
286
|
var _item$confirmConfig;
|
|
299
|
-
|
|
300
287
|
(_item$confirmConfig = item.confirmConfig).onCancel.apply(_item$confirmConfig, _toConsumableArray(Object.keys(rowParams).map(function (pItem) {
|
|
301
288
|
return rowParams[pItem];
|
|
302
289
|
})));
|
|
@@ -305,7 +292,6 @@ var ButtonGroup = function ButtonGroup(props) {
|
|
|
305
292
|
onConfirm: function onConfirm() {
|
|
306
293
|
if (item.hasOwnProperty('confirmConfig') && item.confirmConfig.onConfirm) {
|
|
307
294
|
var _item$confirmConfig2;
|
|
308
|
-
|
|
309
295
|
(_item$confirmConfig2 = item.confirmConfig).onConfirm.apply(_item$confirmConfig2, _toConsumableArray(Object.keys(rowParams).map(function (pItem) {
|
|
310
296
|
return rowParams[pItem];
|
|
311
297
|
})));
|
|
@@ -321,9 +307,7 @@ var ButtonGroup = function ButtonGroup(props) {
|
|
|
321
307
|
title: item.exName || item.name,
|
|
322
308
|
// @ts-ignore
|
|
323
309
|
disabled: (0, _filterPermission.btnIsDisabled)(item.disabled, rowParams)
|
|
324
|
-
}, item
|
|
325
|
-
return rowParams[pItem];
|
|
326
|
-
}))) : item.exName || item.name)) : /*#__PURE__*/_react.default.createElement("a", {
|
|
310
|
+
}, renderCustomLabel(item))) : /*#__PURE__*/_react.default.createElement("a", {
|
|
327
311
|
className: "spec-button-group-text",
|
|
328
312
|
title: item.exName || item.name,
|
|
329
313
|
key: item.index,
|
|
@@ -334,12 +318,9 @@ var ButtonGroup = function ButtonGroup(props) {
|
|
|
334
318
|
return rowParams[pItem];
|
|
335
319
|
})));
|
|
336
320
|
} : null
|
|
337
|
-
},
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
}; // 渲染展示的按钮列表
|
|
341
|
-
|
|
342
|
-
|
|
321
|
+
}, renderCustomLabel(item)));
|
|
322
|
+
};
|
|
323
|
+
// 渲染展示的按钮列表
|
|
343
324
|
var renderDisplayButton = function renderDisplayButton(item, index) {
|
|
344
325
|
/*渲染自定义*/
|
|
345
326
|
if (item.render) {
|
|
@@ -348,8 +329,6 @@ var ButtonGroup = function ButtonGroup(props) {
|
|
|
348
329
|
}))) : item.render);
|
|
349
330
|
}
|
|
350
331
|
/*渲染按钮形式*/
|
|
351
|
-
|
|
352
|
-
|
|
353
332
|
if (type === 'button') {
|
|
354
333
|
return /*#__PURE__*/_react.default.createElement(RenderButtonList, Object.assign({
|
|
355
334
|
key: index
|
|
@@ -358,36 +337,34 @@ var ButtonGroup = function ButtonGroup(props) {
|
|
|
358
337
|
}));
|
|
359
338
|
}
|
|
360
339
|
/*渲染文本形式*/
|
|
361
|
-
|
|
362
|
-
|
|
363
340
|
return /*#__PURE__*/_react.default.createElement(RenderTextList, Object.assign({
|
|
364
341
|
key: index
|
|
365
342
|
}, item));
|
|
366
343
|
};
|
|
367
|
-
|
|
368
344
|
if (min < 2) min = 2;
|
|
369
|
-
|
|
370
345
|
if (resetList.length === 0) {
|
|
371
346
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, type !== 'button' ? '-' : null);
|
|
372
347
|
}
|
|
373
|
-
|
|
348
|
+
// 数量超出时渲染
|
|
374
349
|
if (resetList.length > min) {
|
|
375
|
-
var forGroup = resetList.slice(0, min - 1);
|
|
376
|
-
var forDrop = resetList.slice(min - 1);
|
|
350
|
+
var forGroup = resetList.slice(0, min - 1); // 平铺组合内
|
|
351
|
+
var forDrop = resetList.slice(min - 1); // 下拉组合内
|
|
377
352
|
return /*#__PURE__*/_react.default.createElement("span", {
|
|
378
353
|
className: "spec-button-group"
|
|
379
354
|
}, forGroup.map(function (item, index) {
|
|
380
355
|
return index < min - 1 ? renderDisplayButton(item, index) : null;
|
|
381
356
|
}), type === 'button' ? /*#__PURE__*/_react.default.createElement(_dropdown.default, Object.assign({
|
|
382
|
-
|
|
357
|
+
menu: {
|
|
358
|
+
items: deepTransButtonMenus(forDrop)
|
|
359
|
+
},
|
|
383
360
|
placement: "bottomRight"
|
|
384
361
|
}, dropdownConfig), /*#__PURE__*/_react.default.createElement(_button.default, {
|
|
385
362
|
type: "primary"
|
|
386
|
-
}, "
|
|
363
|
+
}, moreText, " ", /*#__PURE__*/_react.default.createElement(_index2.default, {
|
|
387
364
|
name: "down"
|
|
388
365
|
}))) : /*#__PURE__*/_react.default.createElement(_popconfirm.default, Object.assign({
|
|
389
366
|
placement: "topRight",
|
|
390
|
-
|
|
367
|
+
open: popVisibleIndex === rowParams.rowIndex,
|
|
391
368
|
icon: /*#__PURE__*/_react.default.createElement(_icons.QuestionCircleOutlined, null),
|
|
392
369
|
trigger: "click"
|
|
393
370
|
}, popRow.hasOwnProperty('confirmConfig') ? popRow.confirmConfig : {}, {
|
|
@@ -395,22 +372,20 @@ var ButtonGroup = function ButtonGroup(props) {
|
|
|
395
372
|
extraRow: rowParams
|
|
396
373
|
})),
|
|
397
374
|
onCancel: function onCancel() {
|
|
398
|
-
setPopVisibleIndex(-1);
|
|
399
|
-
|
|
375
|
+
setPopVisibleIndex(-1);
|
|
376
|
+
// 优先调用其 confirmConfig 配置的 onCancel 事件
|
|
400
377
|
if (popRow.hasOwnProperty('confirmConfig') && popRow.confirmConfig.onCancel) {
|
|
401
378
|
var _popRow$confirmConfig;
|
|
402
|
-
|
|
403
379
|
(_popRow$confirmConfig = popRow.confirmConfig).onCancel.apply(_popRow$confirmConfig, _toConsumableArray(Object.keys(rowParams).map(function (pItem) {
|
|
404
380
|
return rowParams[pItem];
|
|
405
381
|
})));
|
|
406
382
|
}
|
|
407
383
|
},
|
|
408
384
|
onConfirm: function onConfirm() {
|
|
409
|
-
setPopVisibleIndex(-1);
|
|
410
|
-
|
|
385
|
+
setPopVisibleIndex(-1);
|
|
386
|
+
// 优先调用其 confirmConfig 配置的 onConfirm 事件
|
|
411
387
|
if (popRow.hasOwnProperty('confirmConfig') && popRow.confirmConfig.onConfirm) {
|
|
412
388
|
var _popRow$confirmConfig2;
|
|
413
|
-
|
|
414
389
|
(_popRow$confirmConfig2 = popRow.confirmConfig).onConfirm.apply(_popRow$confirmConfig2, _toConsumableArray(Object.keys(rowParams).map(function (pItem) {
|
|
415
390
|
return rowParams[pItem];
|
|
416
391
|
})));
|
|
@@ -421,19 +396,20 @@ var ButtonGroup = function ButtonGroup(props) {
|
|
|
421
396
|
}
|
|
422
397
|
}
|
|
423
398
|
}), /*#__PURE__*/_react.default.createElement(_dropdown.default, Object.assign({
|
|
424
|
-
|
|
399
|
+
menu: {
|
|
400
|
+
items: deepTransTextMenus(forDrop)
|
|
401
|
+
},
|
|
425
402
|
placement: "bottomRight"
|
|
426
403
|
}, dropdownConfig), /*#__PURE__*/_react.default.createElement("a", {
|
|
427
404
|
className: "spec-button-group-text"
|
|
428
|
-
}, "
|
|
405
|
+
}, moreText, " ", /*#__PURE__*/_react.default.createElement(_icons.DownOutlined, null)))));
|
|
429
406
|
}
|
|
430
|
-
|
|
407
|
+
// 数量不超出时渲染
|
|
431
408
|
return /*#__PURE__*/_react.default.createElement("span", {
|
|
432
409
|
className: "spec-button-group"
|
|
433
410
|
}, resetList.map(function (item, index) {
|
|
434
411
|
return renderDisplayButton(item, index);
|
|
435
412
|
}));
|
|
436
413
|
};
|
|
437
|
-
|
|
438
414
|
var _default = ButtonGroup;
|
|
439
415
|
exports.default = _default;
|