fan-standard-comp 3.1.9 → 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 -10
- 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.d.ts +2 -0
- package/es/ButtonGroup/index.js +223 -193
- 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 +37 -75
- 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/FieldComponent/style/index.less +6 -0
- 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.d.ts +1 -0
- package/es/StandardFilter/index.js +32 -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 +115 -159
- package/es/StandardPanel/index.js +19 -35
- package/es/StandardTable/index.js +20 -30
- 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.d.ts +2 -0
- package/lib/ButtonGroup/index.js +226 -216
- 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 +39 -90
- 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/FieldComponent/style/index.less +6 -0
- 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.d.ts +1 -0
- package/lib/StandardFilter/index.js +30 -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 +117 -184
- package/lib/StandardPanel/index.js +22 -48
- package/lib/StandardTable/index.js +20 -39
- 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 +6 -5
|
@@ -20,42 +20,34 @@ var getParentNodes = function getParentNodes(list, nodeKey) {
|
|
|
20
20
|
// const childrenParams = ['menuItems', 'menuFuncItems', 'items']
|
|
21
21
|
var matchNode = [];
|
|
22
22
|
var parentKeys = []; // 存储查找到的节点的父节点数据
|
|
23
|
-
|
|
24
23
|
var nodeParent = []; // 存储查找到的节点的父节点数据
|
|
25
24
|
// 移除上一次累加的数据
|
|
26
|
-
|
|
27
25
|
var removePrevIndex = function removePrevIndex(array, item) {
|
|
28
26
|
for (var i = 0; i < array.length; i += 1) {
|
|
29
27
|
if (array[i][params.keyParam] === item[params.keyParam]) {
|
|
30
28
|
return i;
|
|
31
29
|
}
|
|
32
30
|
}
|
|
33
|
-
|
|
34
31
|
return null;
|
|
35
32
|
};
|
|
36
|
-
|
|
37
33
|
var deepFind = function deepFind(array, nodeId) {
|
|
38
34
|
for (var i = 0; i < array.length; i += 1) {
|
|
39
35
|
var node = array[i];
|
|
40
|
-
|
|
41
36
|
if (node[params.keyParam] === nodeId) {
|
|
42
37
|
matchNode.splice(0, 1, node); // 查找到则赋值,且跳出循环
|
|
43
|
-
|
|
44
38
|
break;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
|
|
39
|
+
}
|
|
40
|
+
// 如果是单个
|
|
48
41
|
if (node[params.childrenParam] && node[params.childrenParam].length > 0) {
|
|
49
42
|
deepFind(node[params.childrenParam] || node[params.childrenParam], nodeId);
|
|
50
43
|
nodeParent.push(node); // 将当前节点数据存储到父节点数据中
|
|
51
|
-
|
|
52
44
|
if (matchNode.length > 0) {
|
|
53
45
|
break; // 在子节点查找到了,需要跳出
|
|
54
46
|
} else {
|
|
55
47
|
nodeParent.splice(removePrevIndex(nodeParent, node), 1); // 如果在子节点没有查找到,则将原来添加的父节点数据移除
|
|
56
48
|
}
|
|
57
|
-
}
|
|
58
|
-
|
|
49
|
+
}
|
|
50
|
+
// 其他条件
|
|
59
51
|
/* else if (node.menuFuncItems && node.menuFuncItems.length > 0) {
|
|
60
52
|
deepFind(node.menuFuncItems, nodeId);
|
|
61
53
|
nodeParent.push(node); // 将当前节点数据存储到父节点数据中
|
|
@@ -83,33 +75,27 @@ var getParentNodes = function getParentNodes(list, nodeKey) {
|
|
|
83
75
|
nodeParent.splice(removePrevIndex(nodeParent, node), 1); // 如果在子节点没有查找到,则将原来添加的父节点数据移除
|
|
84
76
|
}
|
|
85
77
|
}*/
|
|
86
|
-
|
|
87
78
|
}
|
|
88
79
|
|
|
89
80
|
return matchNode; // 返回查找到的节点数据(格式为数组)
|
|
90
|
-
};
|
|
91
|
-
|
|
81
|
+
};
|
|
92
82
|
|
|
83
|
+
// 查找单个节点
|
|
93
84
|
var findMatchItem = function findMatchItem(arrList, key) {
|
|
94
85
|
var matchItem;
|
|
95
|
-
|
|
96
86
|
for (var i = 0; i < arrList.length; i += 1) {
|
|
97
87
|
var node = arrList[i];
|
|
98
|
-
|
|
99
88
|
if (node[params.keyParam] === key) {
|
|
100
89
|
matchItem = node;
|
|
101
90
|
break;
|
|
102
91
|
}
|
|
103
|
-
|
|
104
92
|
if (node[params.childrenParam]) {
|
|
105
93
|
matchItem = findMatchItem(node[params.childrenParam], key);
|
|
106
94
|
}
|
|
107
95
|
}
|
|
108
|
-
|
|
109
96
|
return matchItem;
|
|
110
|
-
};
|
|
111
|
-
|
|
112
|
-
|
|
97
|
+
};
|
|
98
|
+
// nodeKey 为数组时返回当前数据(TODO。目前仅返回一级,多级情况未判断,且 nodeParent 值也未调整)
|
|
113
99
|
if (Array.isArray(nodeKey)) {
|
|
114
100
|
// const {showCheckedStrategy} = extraProps;
|
|
115
101
|
// TODO 需要判断 showCheckedStrategy 值为 SHOW_PARENT、 SHOW_CHILD 、SHOW_ALL不同情况展示
|
|
@@ -120,29 +106,30 @@ var getParentNodes = function getParentNodes(list, nodeKey) {
|
|
|
120
106
|
} else {
|
|
121
107
|
deepFind(list, nodeKey);
|
|
122
108
|
}
|
|
123
|
-
|
|
124
109
|
nodeParent.forEach(function (par) {
|
|
125
110
|
return parentKeys.push(par[params.keyParam]);
|
|
126
111
|
}); // 将所有父节点的关键值(keyParam指定字段名)的数据集合在数组内
|
|
127
|
-
|
|
128
112
|
return {
|
|
129
113
|
nodeParent: nodeParent,
|
|
130
114
|
parentKeys: parentKeys,
|
|
131
115
|
matchNode: matchNode
|
|
132
116
|
}; // 最终查找到的父节点数组 // nodeParent.concat(result || []);
|
|
133
117
|
};
|
|
118
|
+
|
|
134
119
|
/**
|
|
135
|
-
* @description
|
|
120
|
+
* @description 递归查找树的所有节点及id
|
|
136
121
|
* @params {Array} childNode 当前需要过滤查看的数据集合、
|
|
137
122
|
* @params {Object} params 指定当前数据中,筛选对应子集合字段名及匹配标识值字段名
|
|
138
|
-
*
|
|
139
|
-
*
|
|
123
|
+
* @value { String } childrenParam:指当前子集合数据字段名(字符串表示单个,数组表示当前多个子集合字段名)
|
|
124
|
+
* @value { String } keyParam: 指当前匹配标识值字段名)
|
|
140
125
|
*
|
|
141
126
|
* @result {Array} childKeys 所有子项的id
|
|
142
|
-
* @result {Array} nodeChildren
|
|
127
|
+
* @result {Array} nodeChildren 所有节点数据对象集合
|
|
128
|
+
*
|
|
129
|
+
* @usage:
|
|
130
|
+
* getChildrenNodes(childNode, params)
|
|
143
131
|
* */
|
|
144
132
|
|
|
145
|
-
|
|
146
133
|
var getChildrenNodes = function getChildrenNodes(childNode) {
|
|
147
134
|
var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {
|
|
148
135
|
childrenParam: 'children',
|
|
@@ -150,7 +137,6 @@ var getChildrenNodes = function getChildrenNodes(childNode) {
|
|
|
150
137
|
};
|
|
151
138
|
var childKeys = [];
|
|
152
139
|
var nodeChildren = []; // 存储:authId, types
|
|
153
|
-
|
|
154
140
|
var deepFindChild = function deepFindChild(cList) {
|
|
155
141
|
Array.isArray(cList) && cList.forEach(function (item) {
|
|
156
142
|
childKeys.push(item[params.keyParam]);
|
|
@@ -158,49 +144,44 @@ var getChildrenNodes = function getChildrenNodes(childNode) {
|
|
|
158
144
|
if (item[params.childrenParam]) deepFindChild(item[params.childrenParam]);
|
|
159
145
|
});
|
|
160
146
|
};
|
|
161
|
-
|
|
162
147
|
deepFindChild(childNode);
|
|
163
148
|
return {
|
|
164
149
|
childKeys: childKeys,
|
|
165
150
|
nodeChildren: nodeChildren
|
|
166
151
|
};
|
|
167
|
-
};
|
|
168
|
-
|
|
152
|
+
};
|
|
169
153
|
|
|
154
|
+
// 查找节点路径
|
|
170
155
|
var getNodePaths = function getNodePaths(list, nodeKey) {
|
|
171
156
|
var params = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {
|
|
172
157
|
childrenParam: 'children',
|
|
173
158
|
keyParam: 'value'
|
|
174
159
|
};
|
|
175
160
|
var extraProps = arguments.length > 3 ? arguments[3] : undefined;
|
|
176
|
-
|
|
177
161
|
// 获取指定节点的路径数组
|
|
178
162
|
var getPathByKey = function getPathByKey(value, arr) {
|
|
179
163
|
var findNodePath = function findNodePath(node, value, nodePathArray) {
|
|
180
164
|
// 这里可以自定义push的内容,而不是整个node,而且这里node也包含了children
|
|
181
|
-
nodePathArray.push(node);
|
|
182
|
-
|
|
165
|
+
nodePathArray.push(node);
|
|
166
|
+
// 找到符合条件的节点,通过throw终止掉递归
|
|
183
167
|
if (node[params.keyParam] === value) {
|
|
184
168
|
// 也可以直接使用return;结束循环
|
|
185
169
|
throw "over!";
|
|
186
170
|
}
|
|
187
|
-
|
|
188
171
|
if (node[params.childrenParam] && node[params.childrenParam].length > 0) {
|
|
189
172
|
for (var i = 0; i < node[params.childrenParam].length; i++) {
|
|
190
173
|
findNodePath(node[params.childrenParam][i], value, nodePathArray);
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
|
|
174
|
+
}
|
|
175
|
+
// 当前节点的子节点遍历完依旧没找到,则删除路径中的该节点
|
|
194
176
|
nodePathArray.pop();
|
|
195
177
|
} else {
|
|
196
178
|
// 找到叶子节点时,删除路径当中的该叶子节点
|
|
197
179
|
nodePathArray.pop();
|
|
198
180
|
}
|
|
199
|
-
};
|
|
200
|
-
|
|
181
|
+
};
|
|
201
182
|
|
|
183
|
+
// 用于存储节点唯一标识值路径数组
|
|
202
184
|
var nodePathArray = [];
|
|
203
|
-
|
|
204
185
|
try {
|
|
205
186
|
for (var i = 0; i < arr.length; i++) {
|
|
206
187
|
findNodePath(arr[i], value, nodePathArray);
|
|
@@ -209,17 +190,13 @@ var getNodePaths = function getNodePaths(list, nodeKey) {
|
|
|
209
190
|
return nodePathArray;
|
|
210
191
|
}
|
|
211
192
|
};
|
|
212
|
-
|
|
213
193
|
var pathNode = [];
|
|
214
|
-
|
|
215
194
|
if (Array.isArray(nodeKey)) {
|
|
216
195
|
nodeKey.map(function (key) {
|
|
217
196
|
var pathItems = getPathByKey(key, list);
|
|
218
197
|
if (pathItems) pathNode.push(pathItems);
|
|
219
198
|
});
|
|
220
199
|
}
|
|
221
|
-
|
|
222
200
|
return pathNode;
|
|
223
201
|
};
|
|
224
|
-
|
|
225
202
|
export { getParentNodes, getChildrenNodes, getNodePaths };
|
package/es/utils/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import UtilValueFormat from './ValueFormat';
|
|
2
2
|
import { getParentNodes, getChildrenNodes, getNodePaths } from './getParentNodes';
|
|
3
|
-
export { UtilValueFormat, getParentNodes, getChildrenNodes, getNodePaths };
|
|
3
|
+
export { UtilValueFormat, getParentNodes, getChildrenNodes, getNodePaths };
|
|
4
|
+
export * from './dictSelectUtil';
|
|
@@ -4,28 +4,18 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
require("antd/es/button/style");
|
|
9
|
-
|
|
10
8
|
var _button = _interopRequireDefault(require("antd/es/button"));
|
|
11
|
-
|
|
12
9
|
require("antd/es/dropdown/style");
|
|
13
|
-
|
|
14
10
|
var _dropdown = _interopRequireDefault(require("antd/es/dropdown"));
|
|
15
|
-
|
|
16
11
|
var _react = _interopRequireDefault(require("react"));
|
|
17
|
-
|
|
18
12
|
var _SpecIcon = _interopRequireDefault(require("@/SpecIcon"));
|
|
19
|
-
|
|
20
13
|
var _ButtonMenu = _interopRequireDefault(require("./ButtonMenu"));
|
|
21
|
-
|
|
22
14
|
var _IconNode = _interopRequireDefault(require("@/components/IconNode"));
|
|
23
|
-
|
|
24
15
|
var _filterPermission = require("@/utils/filterPermission");
|
|
25
|
-
|
|
26
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
27
|
-
|
|
28
17
|
// 渲染按钮形式 (用于筛选)
|
|
18
|
+
|
|
29
19
|
var RenderButtonList = function RenderButtonList(item) {
|
|
30
20
|
if (Array.isArray(item.children) && item.children.length > 0) {
|
|
31
21
|
return /*#__PURE__*/_react.default.createElement(_dropdown.default, {
|
|
@@ -37,7 +27,6 @@ var RenderButtonList = function RenderButtonList(item) {
|
|
|
37
27
|
name: "down"
|
|
38
28
|
})));
|
|
39
29
|
}
|
|
40
|
-
|
|
41
30
|
return /*#__PURE__*/_react.default.createElement(_button.default, {
|
|
42
31
|
type: item.type ? item.type : 'primary',
|
|
43
32
|
danger: item.danger,
|
|
@@ -50,6 +39,5 @@ var RenderButtonList = function RenderButtonList(item) {
|
|
|
50
39
|
} : null
|
|
51
40
|
}, item.exName || item.name);
|
|
52
41
|
};
|
|
53
|
-
|
|
54
42
|
var _default = RenderButtonList;
|
|
55
43
|
exports.default = _default;
|
|
@@ -4,18 +4,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
require("antd/es/menu/style");
|
|
9
|
-
|
|
10
8
|
var _menu = _interopRequireDefault(require("antd/es/menu"));
|
|
11
|
-
|
|
12
9
|
var _react = _interopRequireDefault(require("react"));
|
|
13
|
-
|
|
14
10
|
var _IconNode = _interopRequireDefault(require("@/components/IconNode"));
|
|
15
|
-
|
|
16
11
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
-
|
|
18
12
|
// 渲染按钮多层级形式 (用于筛选)
|
|
13
|
+
|
|
19
14
|
var RenderButtonList = function RenderButtonList(group) {
|
|
20
15
|
return /*#__PURE__*/_react.default.createElement(_menu.default, null, group.map(function (item, index) {
|
|
21
16
|
if (item.children) {
|
|
@@ -34,7 +29,6 @@ var RenderButtonList = function RenderButtonList(group) {
|
|
|
34
29
|
}), " ", child.exName || child.name));
|
|
35
30
|
}));
|
|
36
31
|
}
|
|
37
|
-
|
|
38
32
|
return /*#__PURE__*/_react.default.createElement(_menu.default.Item, {
|
|
39
33
|
key: index
|
|
40
34
|
}, /*#__PURE__*/_react.default.createElement("a", {
|
|
@@ -46,6 +40,5 @@ var RenderButtonList = function RenderButtonList(group) {
|
|
|
46
40
|
}), " ", item.exName || item.name));
|
|
47
41
|
}));
|
|
48
42
|
};
|
|
49
|
-
|
|
50
43
|
var _default = RenderButtonList;
|
|
51
44
|
exports.default = _default;
|
|
@@ -4,29 +4,19 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
8
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
-
|
|
12
9
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
13
|
-
|
|
14
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."); }
|
|
15
|
-
|
|
16
11
|
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); }
|
|
17
|
-
|
|
18
|
-
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); }
|
|
19
|
-
|
|
12
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
20
13
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
21
|
-
|
|
22
14
|
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; }
|
|
23
|
-
|
|
24
15
|
// 气泡确认框标题配置
|
|
25
16
|
var PopConfirmTitle = function PopConfirmTitle(propsData) {
|
|
26
17
|
var confirmConfig = propsData.confirmConfig,
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
18
|
+
confirmText = propsData.confirmText,
|
|
19
|
+
extraRow = propsData.extraRow;
|
|
30
20
|
if (propsData.hasOwnProperty('confirmConfig') && confirmConfig.title) {
|
|
31
21
|
var title = confirmConfig.title;
|
|
32
22
|
if (!title) return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, null);
|
|
@@ -34,15 +24,12 @@ var PopConfirmTitle = function PopConfirmTitle(propsData) {
|
|
|
34
24
|
return extraRow[pItem];
|
|
35
25
|
}))) : title;
|
|
36
26
|
}
|
|
37
|
-
|
|
38
27
|
if (confirmText) {
|
|
39
28
|
return typeof confirmText === "function" ? confirmText.apply(void 0, _toConsumableArray(Object.keys(extraRow).map(function (pItem) {
|
|
40
29
|
return extraRow[pItem];
|
|
41
30
|
}))) : confirmText;
|
|
42
31
|
}
|
|
43
|
-
|
|
44
32
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, null);
|
|
45
33
|
};
|
|
46
|
-
|
|
47
34
|
var _default = PopConfirmTitle;
|
|
48
35
|
exports.default = _default;
|
|
@@ -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;
|