fan-standard-comp 3.1.2 → 3.1.4
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/package.json +1 -1
- package/dist/f26952c118ab6cdcd23dc0028ee98c11.svg +0 -173
- package/dist/fan-standard-comp.umd.js +0 -597
- package/dist/fonts/iconfont.eot +0 -0
- package/dist/fonts/iconfont.ttf +0 -0
- package/dist/fonts/iconfont.woff +0 -0
- package/es/ButtonGroup/ButtonList.d.ts +0 -2
- package/es/ButtonGroup/ButtonList.js +0 -37
- package/es/ButtonGroup/ButtonMenu.d.ts +0 -2
- package/es/ButtonGroup/ButtonMenu.js +0 -38
- package/es/ButtonGroup/PopConfirmTitle.d.ts +0 -9
- package/es/ButtonGroup/PopConfirmTitle.js +0 -37
- package/es/ButtonGroup/index.d.ts +0 -30
- package/es/ButtonGroup/index.js +0 -374
- package/es/ButtonGroup/style/index.less +0 -36
- package/es/DragContent/DragBar.js +0 -21
- package/es/DragContent/index.d.ts +0 -14
- package/es/DragContent/index.js +0 -173
- package/es/DragContent/index.less +0 -44
- package/es/FormComp/ChunkUploader/api.js +0 -76
- package/es/FormComp/ChunkUploader/index.js +0 -391
- package/es/FormComp/ChunkUploader/lib.js +0 -96
- package/es/FormComp/ChunkUploader/style/style.less +0 -3
- package/es/FormComp/ChunkUploader/upload-queue.class.js +0 -167
- package/es/FormComp/ChunkUploader/worker.js +0 -23
- package/es/FormComp/EditButton/index.d.ts +0 -26
- package/es/FormComp/EditButton/index.js +0 -140
- package/es/FormComp/FieldComponent/ReUpload.d.ts +0 -3
- package/es/FormComp/FieldComponent/ReUpload.js +0 -131
- package/es/FormComp/FieldComponent/RefactorTreeSelect.js +0 -245
- package/es/FormComp/FieldComponent/TitleNode.d.ts +0 -6
- package/es/FormComp/FieldComponent/TitleNode.js +0 -9
- package/es/FormComp/FieldComponent/index.d.ts +0 -38
- package/es/FormComp/FieldComponent/index.js +0 -413
- package/es/FormComp/FieldComponent/setReadonlyValues.js +0 -236
- package/es/FormComp/FieldComponent/style/index.less +0 -116
- package/es/FormComp/RenderItemGroup/index.d.ts +0 -37
- package/es/FormComp/RenderItemGroup/index.js +0 -234
- package/es/FormComp/Uploader/index.d.ts +0 -19
- package/es/FormComp/Uploader/index.js +0 -275
- package/es/FormComp/Uploader/style/index.less +0 -14
- package/es/FormComp/Uploader/util.d.ts +0 -8
- package/es/FormComp/Uploader/util.js +0 -38
- package/es/FormComp/VarTemplate/index.js +0 -293
- package/es/FormComp/index.d.ts +0 -1
- package/es/FormComp/index.js +0 -1
- package/es/NavLeafScroll/index.js +0 -379
- package/es/NavLeafScroll/style/index.less +0 -119
- package/es/RefactorTree/data.d.ts +0 -7
- package/es/RefactorTree/index.d.ts +0 -40
- package/es/RefactorTree/index.js +0 -167
- package/es/RefactorTree/indexTreeNode.d.ts +0 -39
- package/es/RefactorTree/indexTreeNode.js +0 -237
- package/es/RefactorTree/style/index.d.ts +0 -1
- package/es/RefactorTree/style/index.js +0 -1
- package/es/RefactorTree/style/index.less +0 -22
- package/es/RefactorTree/util.d.ts +0 -42
- package/es/RefactorTree/util.js +0 -187
- package/es/SpecIcon/fonts/demo.css +0 -539
- package/es/SpecIcon/fonts/demo_index.html +0 -1315
- package/es/SpecIcon/fonts/iconfont.css +0 -211
- package/es/SpecIcon/fonts/iconfont.eot +0 -0
- package/es/SpecIcon/fonts/iconfont.js +0 -41
- package/es/SpecIcon/fonts/iconfont.json +0 -352
- package/es/SpecIcon/fonts/iconfont.svg +0 -173
- package/es/SpecIcon/fonts/iconfont.ttf +0 -0
- package/es/SpecIcon/fonts/iconfont.woff +0 -0
- package/es/SpecIcon/fonts/iconfont.woff2 +0 -0
- package/es/SpecIcon/index.d.ts +0 -17
- package/es/SpecIcon/index.js +0 -77
- package/es/SpecIcon/style/iconfont.less +0 -213
- package/es/SpecIcon/style/index.less +0 -98
- package/es/SplitterLayout/Pane.d.ts +0 -13
- package/es/SplitterLayout/Pane.js +0 -36
- package/es/SplitterLayout/index.js +0 -375
- package/es/SplitterLayout/index.less +0 -58
- package/es/StandardContent/SplitterLayout/Pane.js +0 -50
- package/es/StandardContent/SplitterLayout/index.js +0 -374
- package/es/StandardContent/SplitterLayout/index.less +0 -58
- package/es/StandardContent/SubfieldContent.d.ts +0 -17
- package/es/StandardContent/SubfieldContent.js +0 -41
- package/es/StandardContent/WrapperContent.d.ts +0 -13
- package/es/StandardContent/WrapperContent.js +0 -29
- package/es/StandardContent/data.d.ts +0 -101
- package/es/StandardContent/style/index.less +0 -80
- package/es/StandardDragModal/index.d.ts +0 -11
- package/es/StandardDragModal/index.js +0 -30
- package/es/StandardFilter/index.d.ts +0 -35
- package/es/StandardFilter/index.js +0 -253
- package/es/StandardFilter/style/index.less +0 -62
- package/es/StandardForm/ActionList.js +0 -44
- package/es/StandardForm/StepForm.d.ts +0 -19
- package/es/StandardForm/StepForm.js +0 -267
- package/es/StandardForm/TabForm.d.ts +0 -19
- package/es/StandardForm/TabForm.js +0 -122
- package/es/StandardForm/index.d.ts +0 -32
- package/es/StandardForm/index.js +0 -170
- package/es/StandardForm/style/index.less +0 -58
- package/es/StandardModal/UpdateFormRef.js +0 -18
- package/es/StandardModal/index.d.ts +0 -44
- package/es/StandardModal/index.js +0 -495
- package/es/StandardModal/style/index.less +0 -50
- package/es/StandardPanel/index.d.ts +0 -28
- package/es/StandardPanel/index.js +0 -134
- package/es/StandardPanel/style/index.less +0 -135
- package/es/StandardTable/index.d.ts +0 -22
- package/es/StandardTable/index.js +0 -126
- package/es/StandardTable/style/index.d.ts +0 -1
- package/es/StandardTable/style/index.js +0 -1
- package/es/StandardTable/style/index.less +0 -206
- package/es/components/IconNode/index.d.ts +0 -16
- package/es/components/IconNode/index.js +0 -28
- package/es/components/index.d.ts +0 -2
- package/es/components/index.js +0 -2
- package/es/data/func.code.js +0 -112
- package/es/data/general.config.js +0 -172
- package/es/data/index.js +0 -3
- package/es/index.d.ts +0 -24
- package/es/index.js +0 -31
- package/es/styles/index.less +0 -0
- package/es/theme/spec-variable.less +0 -48
- package/es/utils/ValueFormat.js +0 -50
- package/es/utils/filterPermission.js +0 -111
- package/es/utils/getParentNodes.js +0 -215
- package/es/utils/index.js +0 -3
- package/lib/ButtonGroup/ButtonList.d.ts +0 -2
- package/lib/ButtonGroup/ButtonList.js +0 -55
- package/lib/ButtonGroup/ButtonMenu.d.ts +0 -2
- package/lib/ButtonGroup/ButtonMenu.js +0 -51
- package/lib/ButtonGroup/PopConfirmTitle.d.ts +0 -9
- package/lib/ButtonGroup/PopConfirmTitle.js +0 -48
- package/lib/ButtonGroup/index.d.ts +0 -30
- package/lib/ButtonGroup/index.js +0 -405
- package/lib/ButtonGroup/style/index.less +0 -36
- package/lib/DragContent/DragBar.js +0 -33
- package/lib/DragContent/index.d.ts +0 -14
- package/lib/DragContent/index.js +0 -191
- package/lib/DragContent/index.less +0 -44
- package/lib/FormComp/ChunkUploader/api.js +0 -89
- package/lib/FormComp/ChunkUploader/index.js +0 -410
- package/lib/FormComp/ChunkUploader/lib.js +0 -113
- package/lib/FormComp/ChunkUploader/style/style.less +0 -3
- package/lib/FormComp/ChunkUploader/upload-queue.class.js +0 -174
- package/lib/FormComp/ChunkUploader/worker.js +0 -28
- package/lib/FormComp/EditButton/index.d.ts +0 -26
- package/lib/FormComp/EditButton/index.js +0 -159
- package/lib/FormComp/FieldComponent/ReUpload.d.ts +0 -3
- package/lib/FormComp/FieldComponent/ReUpload.js +0 -151
- package/lib/FormComp/FieldComponent/RefactorTreeSelect.js +0 -268
- package/lib/FormComp/FieldComponent/TitleNode.d.ts +0 -6
- package/lib/FormComp/FieldComponent/TitleNode.js +0 -19
- package/lib/FormComp/FieldComponent/index.d.ts +0 -38
- package/lib/FormComp/FieldComponent/index.js +0 -457
- package/lib/FormComp/FieldComponent/setReadonlyValues.js +0 -263
- package/lib/FormComp/FieldComponent/style/index.less +0 -116
- package/lib/FormComp/RenderItemGroup/index.d.ts +0 -37
- package/lib/FormComp/RenderItemGroup/index.js +0 -255
- package/lib/FormComp/Uploader/index.d.ts +0 -19
- package/lib/FormComp/Uploader/index.js +0 -301
- package/lib/FormComp/Uploader/style/index.less +0 -14
- package/lib/FormComp/Uploader/util.d.ts +0 -8
- package/lib/FormComp/Uploader/util.js +0 -47
- package/lib/FormComp/VarTemplate/index.js +0 -308
- package/lib/FormComp/index.d.ts +0 -1
- package/lib/FormComp/index.js +0 -15
- package/lib/NavLeafScroll/index.js +0 -397
- package/lib/NavLeafScroll/style/index.less +0 -119
- package/lib/RefactorTree/data.d.ts +0 -7
- package/lib/RefactorTree/index.d.ts +0 -40
- package/lib/RefactorTree/index.js +0 -190
- package/lib/RefactorTree/indexTreeNode.d.ts +0 -39
- package/lib/RefactorTree/indexTreeNode.js +0 -260
- package/lib/RefactorTree/style/index.d.ts +0 -1
- package/lib/RefactorTree/style/index.js +0 -3
- package/lib/RefactorTree/style/index.less +0 -22
- package/lib/RefactorTree/util.d.ts +0 -42
- package/lib/RefactorTree/util.js +0 -195
- package/lib/SpecIcon/fonts/demo.css +0 -539
- package/lib/SpecIcon/fonts/demo_index.html +0 -1315
- package/lib/SpecIcon/fonts/iconfont.css +0 -211
- package/lib/SpecIcon/fonts/iconfont.eot +0 -0
- package/lib/SpecIcon/fonts/iconfont.js +0 -43
- package/lib/SpecIcon/fonts/iconfont.json +0 -352
- package/lib/SpecIcon/fonts/iconfont.svg +0 -173
- package/lib/SpecIcon/fonts/iconfont.ttf +0 -0
- package/lib/SpecIcon/fonts/iconfont.woff +0 -0
- package/lib/SpecIcon/fonts/iconfont.woff2 +0 -0
- package/lib/SpecIcon/index.d.ts +0 -17
- package/lib/SpecIcon/index.js +0 -90
- package/lib/SpecIcon/style/iconfont.less +0 -213
- package/lib/SpecIcon/style/index.less +0 -98
- package/lib/SplitterLayout/Pane.d.ts +0 -13
- package/lib/SplitterLayout/Pane.js +0 -48
- package/lib/SplitterLayout/index.js +0 -386
- package/lib/SplitterLayout/index.less +0 -58
- package/lib/StandardContent/SplitterLayout/Pane.js +0 -62
- package/lib/StandardContent/SplitterLayout/index.js +0 -387
- package/lib/StandardContent/SplitterLayout/index.less +0 -58
- package/lib/StandardContent/SubfieldContent.d.ts +0 -17
- package/lib/StandardContent/SubfieldContent.js +0 -56
- package/lib/StandardContent/WrapperContent.d.ts +0 -13
- package/lib/StandardContent/WrapperContent.js +0 -43
- package/lib/StandardContent/data.d.ts +0 -101
- package/lib/StandardContent/style/index.less +0 -80
- package/lib/StandardDragModal/index.d.ts +0 -11
- package/lib/StandardDragModal/index.js +0 -43
- package/lib/StandardFilter/index.d.ts +0 -35
- package/lib/StandardFilter/index.js +0 -272
- package/lib/StandardFilter/style/index.less +0 -62
- package/lib/StandardForm/ActionList.js +0 -57
- package/lib/StandardForm/StepForm.d.ts +0 -19
- package/lib/StandardForm/StepForm.js +0 -295
- package/lib/StandardForm/TabForm.d.ts +0 -19
- package/lib/StandardForm/TabForm.js +0 -148
- package/lib/StandardForm/index.d.ts +0 -32
- package/lib/StandardForm/index.js +0 -197
- package/lib/StandardForm/style/index.less +0 -58
- package/lib/StandardModal/UpdateFormRef.js +0 -32
- package/lib/StandardModal/index.d.ts +0 -44
- package/lib/StandardModal/index.js +0 -525
- package/lib/StandardModal/style/index.less +0 -50
- package/lib/StandardPanel/index.d.ts +0 -28
- package/lib/StandardPanel/index.js +0 -155
- package/lib/StandardPanel/style/index.less +0 -135
- package/lib/StandardTable/index.d.ts +0 -22
- package/lib/StandardTable/index.js +0 -143
- package/lib/StandardTable/style/index.d.ts +0 -1
- package/lib/StandardTable/style/index.js +0 -3
- package/lib/StandardTable/style/index.less +0 -206
- package/lib/components/IconNode/index.d.ts +0 -16
- package/lib/components/IconNode/index.js +0 -39
- package/lib/components/index.d.ts +0 -2
- package/lib/components/index.js +0 -15
- package/lib/data/func.code.js +0 -119
- package/lib/data/general.config.js +0 -179
- package/lib/data/index.js +0 -23
- package/lib/index.d.ts +0 -24
- package/lib/index.js +0 -236
- package/lib/styles/index.less +0 -0
- package/lib/theme/spec-variable.less +0 -48
- package/lib/utils/ValueFormat.js +0 -58
- package/lib/utils/filterPermission.js +0 -127
- package/lib/utils/getParentNodes.js +0 -226
- package/lib/utils/index.js +0 -35
|
@@ -1,190 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports.default = void 0;
|
|
9
|
-
|
|
10
|
-
require("antd/es/tree/style");
|
|
11
|
-
|
|
12
|
-
var _tree = _interopRequireDefault(require("antd/es/tree"));
|
|
13
|
-
|
|
14
|
-
require("antd/es/empty/style");
|
|
15
|
-
|
|
16
|
-
var _empty = _interopRequireDefault(require("antd/es/empty"));
|
|
17
|
-
|
|
18
|
-
require("antd/es/popconfirm/style");
|
|
19
|
-
|
|
20
|
-
var _popconfirm = _interopRequireDefault(require("antd/es/popconfirm"));
|
|
21
|
-
|
|
22
|
-
var _tslib = require("tslib");
|
|
23
|
-
|
|
24
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
25
|
-
|
|
26
|
-
var _index = _interopRequireDefault(require("../SpecIcon/index"));
|
|
27
|
-
|
|
28
|
-
var _util = require("./util");
|
|
29
|
-
|
|
30
|
-
require("./style/index.less");
|
|
31
|
-
|
|
32
|
-
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
|
|
33
|
-
|
|
34
|
-
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; }
|
|
35
|
-
|
|
36
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
37
|
-
|
|
38
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
39
|
-
|
|
40
|
-
var RefactorTree = function RefactorTree(props) {
|
|
41
|
-
var treeData = props.treeData,
|
|
42
|
-
rootName = props.rootName,
|
|
43
|
-
rootKey = props.rootKey,
|
|
44
|
-
emptyDescription = props.emptyDescription,
|
|
45
|
-
_props$optionName = props.optionName,
|
|
46
|
-
optionName = _props$optionName === void 0 ? {
|
|
47
|
-
value: 'value',
|
|
48
|
-
title: 'title',
|
|
49
|
-
children: 'children',
|
|
50
|
-
disabled: 'disabled'
|
|
51
|
-
} : _props$optionName,
|
|
52
|
-
defaultSelectedKeys = props.defaultSelectedKeys,
|
|
53
|
-
nodeExtra = props.nodeExtra,
|
|
54
|
-
_props$selectable = props.selectable,
|
|
55
|
-
selectable = _props$selectable === void 0 ? true : _props$selectable,
|
|
56
|
-
nodeControl = props.nodeControl,
|
|
57
|
-
limitKey = props.limitKey,
|
|
58
|
-
checkedKeys = props.checkedKeys,
|
|
59
|
-
checkStrictly = props.checkStrictly,
|
|
60
|
-
onSelect = props.onSelect,
|
|
61
|
-
onCheck = props.onCheck,
|
|
62
|
-
titleRender = props.titleRender,
|
|
63
|
-
disabledFields = props.disabledFields,
|
|
64
|
-
otherProps = (0, _tslib.__rest)(props, ["treeData", "rootName", "rootKey", "emptyDescription", "optionName", "defaultSelectedKeys", "nodeExtra", "selectable", "nodeControl", "limitKey", "checkedKeys", "checkStrictly", "onSelect", "onCheck", "titleRender", "disabledFields"]); // const { title, value, children, disabled } = { value: 'value', title: 'title', children: 'children', disabled: 'disabled', ...optionName }
|
|
65
|
-
// 重新组合指定数据源字段
|
|
66
|
-
|
|
67
|
-
var transTreeData = (0, _react.useMemo)(function () {
|
|
68
|
-
var _ref;
|
|
69
|
-
|
|
70
|
-
var afterTransData = (0, _util.transDataParam)(treeData, optionName); // 通过转换后的数据
|
|
71
|
-
|
|
72
|
-
var resultData; // 如果有配置根节点,则添加 一个根节点数据
|
|
73
|
-
|
|
74
|
-
resultData = rootName ? [(_ref = {}, _defineProperty(_ref, optionName.title || 'title', rootName), _defineProperty(_ref, optionName.key || 'key', rootKey || '0'), _defineProperty(_ref, 'children', afterTransData), _ref)] : afterTransData; // 有配置limitKey指定限制同级节点时,添加判断节点选择限制(在父子节点不相关联条件下使用checkStrictly=true)
|
|
75
|
-
|
|
76
|
-
if (checkStrictly && limitKey && checkedKeys) {
|
|
77
|
-
if (Array.isArray(checkedKeys) && checkedKeys.length > 0 || checkedKeys && Array.isArray(checkedKeys.checked) && checkedKeys.checked.length > 0) {
|
|
78
|
-
resultData = (0, _util.resetDataWithLimit)(Array.isArray(checkedKeys) ? checkedKeys : checkedKeys.checked, resultData, optionName, limitKey);
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
if (disabledFields && Array.isArray(disabledFields)) {
|
|
83
|
-
resultData = (0, _util.resetDataWithDisabled)(resultData, optionName, disabledFields);
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
return resultData;
|
|
87
|
-
}, [treeData, optionName, checkStrictly, limitKey, checkedKeys, disabledFields]); // console.log('重置后的数据', transTreeData)
|
|
88
|
-
|
|
89
|
-
var handleToSelectTreeNode = function handleToSelectTreeNode(key, e) {
|
|
90
|
-
var currentData = e.node;
|
|
91
|
-
var multiSelectedData = [];
|
|
92
|
-
e.selectedNodes.map(function (item) {
|
|
93
|
-
return multiSelectedData.push(item);
|
|
94
|
-
}); // 多选条件下,当前选中所有节点数据
|
|
95
|
-
|
|
96
|
-
onSelect && onSelect(key, {
|
|
97
|
-
currentData: currentData,
|
|
98
|
-
multiData: multiSelectedData
|
|
99
|
-
}, e);
|
|
100
|
-
};
|
|
101
|
-
|
|
102
|
-
var handleToCheckTreeNode = function handleToCheckTreeNode(keys, e) {
|
|
103
|
-
var currentData = e.node;
|
|
104
|
-
var multiCheckedData = [];
|
|
105
|
-
e.checkedNodes.map(function (item) {
|
|
106
|
-
return multiCheckedData.push(item);
|
|
107
|
-
}); // 多选条件下,当前选中所有节点数据
|
|
108
|
-
|
|
109
|
-
onCheck && onCheck(keys, {
|
|
110
|
-
currentData: currentData,
|
|
111
|
-
multiData: multiCheckedData
|
|
112
|
-
}, e);
|
|
113
|
-
};
|
|
114
|
-
|
|
115
|
-
var handleNodeControl = function handleNodeControl(e, type, nodeData) {
|
|
116
|
-
e.stopPropagation();
|
|
117
|
-
var onEdit = nodeControl.onEdit,
|
|
118
|
-
onDelete = nodeControl.onDelete;
|
|
119
|
-
|
|
120
|
-
if (type === 'edit') {
|
|
121
|
-
onEdit && onEdit(nodeData);
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
if (type === 'delete') {
|
|
125
|
-
onDelete && onDelete(nodeData);
|
|
126
|
-
}
|
|
127
|
-
};
|
|
128
|
-
|
|
129
|
-
var renderNodeTitle = function renderNodeTitle(item) {
|
|
130
|
-
if (titleRender) return titleRender(item);
|
|
131
|
-
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, item[optionName.title || 'title'], nodeControl ? /*#__PURE__*/_react.default.createElement("span", {
|
|
132
|
-
className: "treeControl"
|
|
133
|
-
}, /*#__PURE__*/_react.default.createElement("a", {
|
|
134
|
-
onClick: function onClick(e) {
|
|
135
|
-
handleNodeControl(e, 'edit', item);
|
|
136
|
-
}
|
|
137
|
-
}, /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
138
|
-
name: 'edit'
|
|
139
|
-
})), /*#__PURE__*/_react.default.createElement(_popconfirm.default, {
|
|
140
|
-
placement: 'top',
|
|
141
|
-
title: "\u786E\u5B9A\u8981\u5220\u9664\uFF1A".concat(item[optionName.title || 'title'], "\u5417\uFF1F"),
|
|
142
|
-
icon: /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
143
|
-
name: "question"
|
|
144
|
-
}),
|
|
145
|
-
onConfirm: function onConfirm(e) {
|
|
146
|
-
handleNodeControl(e, 'delete', item);
|
|
147
|
-
}
|
|
148
|
-
}, /*#__PURE__*/_react.default.createElement("a", {
|
|
149
|
-
onClick: function onClick(e) {
|
|
150
|
-
return e.stopPropagation();
|
|
151
|
-
}
|
|
152
|
-
}, /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
153
|
-
name: 'delete'
|
|
154
|
-
})))) : null, nodeExtra && nodeExtra(item));
|
|
155
|
-
};
|
|
156
|
-
|
|
157
|
-
if (transTreeData.length == 0) {
|
|
158
|
-
return /*#__PURE__*/_react.default.createElement(_empty.default, {
|
|
159
|
-
image: _empty.default.PRESENTED_IMAGE_SIMPLE,
|
|
160
|
-
description: emptyDescription
|
|
161
|
-
});
|
|
162
|
-
} else {
|
|
163
|
-
var defExpand = [];
|
|
164
|
-
|
|
165
|
-
if (defaultSelectedKeys && defaultSelectedKeys.length > 0) {
|
|
166
|
-
defExpand = defaultSelectedKeys;
|
|
167
|
-
} else {
|
|
168
|
-
defExpand = rootKey ? [rootKey] : ['0'];
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
return /*#__PURE__*/_react.default.createElement(_tree.default, Object.assign({}, otherProps, {
|
|
172
|
-
onSelect: function onSelect(keys, e) {
|
|
173
|
-
return handleToSelectTreeNode(keys, e);
|
|
174
|
-
},
|
|
175
|
-
onCheck: function onCheck(keys, e) {
|
|
176
|
-
return handleToCheckTreeNode(keys, e);
|
|
177
|
-
},
|
|
178
|
-
defaultExpandedKeys: defExpand,
|
|
179
|
-
defaultSelectedKeys: defaultSelectedKeys,
|
|
180
|
-
selectable: selectable,
|
|
181
|
-
checkedKeys: checkedKeys,
|
|
182
|
-
checkStrictly: checkStrictly,
|
|
183
|
-
treeData: transTreeData,
|
|
184
|
-
titleRender: renderNodeTitle
|
|
185
|
-
}));
|
|
186
|
-
}
|
|
187
|
-
};
|
|
188
|
-
|
|
189
|
-
var _default = RefactorTree;
|
|
190
|
-
exports.default = _default;
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import './style/index.less';
|
|
3
|
-
interface selectDataProps {
|
|
4
|
-
currentData?: object;
|
|
5
|
-
multiData?: object[];
|
|
6
|
-
}
|
|
7
|
-
interface nodeItemResetProps {
|
|
8
|
-
icon?: any;
|
|
9
|
-
disabled?: boolean;
|
|
10
|
-
}
|
|
11
|
-
interface optionNameProps {
|
|
12
|
-
value?: string;
|
|
13
|
-
title?: string;
|
|
14
|
-
children?: string;
|
|
15
|
-
disabled?: string;
|
|
16
|
-
}
|
|
17
|
-
interface RefactorTreeProps {
|
|
18
|
-
treeData: any[];
|
|
19
|
-
rootName?: string;
|
|
20
|
-
rootKey?: string;
|
|
21
|
-
rootIcon?: React.ReactNode;
|
|
22
|
-
emptyDescription?: string;
|
|
23
|
-
optionName?: optionNameProps;
|
|
24
|
-
defaultSelectedKeys?: string[];
|
|
25
|
-
nodeItemReset?: (data?: object) => nodeItemResetProps;
|
|
26
|
-
onSelect?: (selectedKeys: string[], selectData: selectDataProps, e: any) => void;
|
|
27
|
-
onCheck?: (checkedKeys: string[] | {
|
|
28
|
-
checked: string[];
|
|
29
|
-
halfChecked: string[];
|
|
30
|
-
}, selectData: selectDataProps, e: any) => void;
|
|
31
|
-
nodeExtra?: string | React.ReactNode;
|
|
32
|
-
selectable?: boolean;
|
|
33
|
-
nodeControl?: any;
|
|
34
|
-
checkStrictly?: boolean;
|
|
35
|
-
limitKey?: string;
|
|
36
|
-
checkedKeys?: any;
|
|
37
|
-
}
|
|
38
|
-
declare const RefactorTree: (props: RefactorTreeProps) => JSX.Element;
|
|
39
|
-
export default RefactorTree;
|
|
@@ -1,260 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports.default = void 0;
|
|
9
|
-
|
|
10
|
-
require("antd/es/empty/style");
|
|
11
|
-
|
|
12
|
-
var _empty = _interopRequireDefault(require("antd/es/empty"));
|
|
13
|
-
|
|
14
|
-
require("antd/es/popconfirm/style");
|
|
15
|
-
|
|
16
|
-
var _popconfirm = _interopRequireDefault(require("antd/es/popconfirm"));
|
|
17
|
-
|
|
18
|
-
require("antd/es/tree/style");
|
|
19
|
-
|
|
20
|
-
var _tree = _interopRequireDefault(require("antd/es/tree"));
|
|
21
|
-
|
|
22
|
-
var _tslib = require("tslib");
|
|
23
|
-
|
|
24
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
25
|
-
|
|
26
|
-
var _index = _interopRequireDefault(require("../SpecIcon/index"));
|
|
27
|
-
|
|
28
|
-
require("./style/index.less");
|
|
29
|
-
|
|
30
|
-
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
|
|
31
|
-
|
|
32
|
-
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; }
|
|
33
|
-
|
|
34
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
35
|
-
|
|
36
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
37
|
-
|
|
38
|
-
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."); }
|
|
39
|
-
|
|
40
|
-
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); }
|
|
41
|
-
|
|
42
|
-
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; }
|
|
43
|
-
|
|
44
|
-
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; }
|
|
45
|
-
|
|
46
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
47
|
-
|
|
48
|
-
var TreeNode = _tree.default.TreeNode;
|
|
49
|
-
|
|
50
|
-
var RefactorTree = function RefactorTree(props) {
|
|
51
|
-
var treeData = props.treeData,
|
|
52
|
-
rootName = props.rootName,
|
|
53
|
-
rootKey = props.rootKey,
|
|
54
|
-
rootIcon = props.rootIcon,
|
|
55
|
-
emptyDescription = props.emptyDescription,
|
|
56
|
-
_props$optionName = props.optionName,
|
|
57
|
-
optionName = _props$optionName === void 0 ? {
|
|
58
|
-
value: 'value',
|
|
59
|
-
title: 'title',
|
|
60
|
-
children: 'children',
|
|
61
|
-
disabled: 'disabled'
|
|
62
|
-
} : _props$optionName,
|
|
63
|
-
defaultSelectedKeys = props.defaultSelectedKeys,
|
|
64
|
-
nodeItemReset = props.nodeItemReset,
|
|
65
|
-
nodeExtra = props.nodeExtra,
|
|
66
|
-
_props$selectable = props.selectable,
|
|
67
|
-
selectable = _props$selectable === void 0 ? true : _props$selectable,
|
|
68
|
-
nodeControl = props.nodeControl,
|
|
69
|
-
limitKey = props.limitKey,
|
|
70
|
-
checkedKeys = props.checkedKeys,
|
|
71
|
-
checkStrictly = props.checkStrictly,
|
|
72
|
-
onSelect = props.onSelect,
|
|
73
|
-
onCheck = props.onCheck,
|
|
74
|
-
otherProps = (0, _tslib.__rest)(props, ["treeData", "rootName", "rootKey", "rootIcon", "emptyDescription", "optionName", "defaultSelectedKeys", "nodeItemReset", "nodeExtra", "selectable", "nodeControl", "limitKey", "checkedKeys", "checkStrictly", "onSelect", "onCheck"]); // 重新组合指定数据源字段 (limitKey:用于限制只能选择指定同一层级的数据)
|
|
75
|
-
// const { title, value, children, disabled } = { value: 'value', title: 'title', children: 'children', disabled: 'disabled', ...optionName }
|
|
76
|
-
|
|
77
|
-
var _useState = (0, _react.useState)([]),
|
|
78
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
79
|
-
dataList = _useState2[0],
|
|
80
|
-
setDataList = _useState2[1]; // 限制节点选中条件下更新列表数据
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
var resetDataWithLimit = function resetDataWithLimit(hasKeys, list, resultList) {
|
|
84
|
-
// 利用ID匹配对应选中的完整节点数据
|
|
85
|
-
var filterCheckedNode = function filterCheckedNode(ids, preList, matchList) {
|
|
86
|
-
if (Array.isArray(preList) && preList.length > 0) {
|
|
87
|
-
preList.forEach(function (item, i) {
|
|
88
|
-
if (ids.includes(item[optionName.value])) {
|
|
89
|
-
matchList.push(Object.assign({}, item));
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
filterCheckedNode(ids, item[optionName.children || 'children'], matchList);
|
|
93
|
-
});
|
|
94
|
-
}
|
|
95
|
-
}; // 筛选同一层级可选择,其他层级数据不可选择(限制按指定字段名的层级数据)
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
var filterResetSameLevel = function filterResetSameLevel(preList, resData, matchData) {
|
|
99
|
-
if (Array.isArray(preList) && preList.length > 0) {
|
|
100
|
-
preList.forEach(function (item, i) {
|
|
101
|
-
resData[i] = Object.assign({}, item);
|
|
102
|
-
resData[i].isLimit = item[limitKey] !== matchData; // [limitKey];
|
|
103
|
-
|
|
104
|
-
var newDeepArr = [];
|
|
105
|
-
filterResetSameLevel(item[optionName.children || 'children'], newDeepArr, matchData);
|
|
106
|
-
resData[i][optionName.children || 'children'] = newDeepArr;
|
|
107
|
-
});
|
|
108
|
-
}
|
|
109
|
-
};
|
|
110
|
-
|
|
111
|
-
var matchItems = [];
|
|
112
|
-
filterCheckedNode(hasKeys, list, matchItems); // 先筛选出来选中节点的数据,取其中的 level 层级的值(数据必须保证同级类型值一致)
|
|
113
|
-
|
|
114
|
-
if (matchItems.length > 0) {
|
|
115
|
-
filterResetSameLevel(list, resultList, matchItems[0][limitKey]);
|
|
116
|
-
}
|
|
117
|
-
};
|
|
118
|
-
|
|
119
|
-
(0, _react.useEffect)(function () {
|
|
120
|
-
// 有配置limitKey指定限制同级节点时,添加判断节点选择限制(在父子节点不相关联条件下使用checkStrictly=true)
|
|
121
|
-
if (checkStrictly && limitKey && checkedKeys) {
|
|
122
|
-
if (Array.isArray(checkedKeys) && checkedKeys.length > 0 || checkedKeys && Array.isArray(checkedKeys.checked) && checkedKeys.checked.length > 0) {
|
|
123
|
-
var resetList = [];
|
|
124
|
-
resetDataWithLimit(Array.isArray(checkedKeys) ? checkedKeys : checkedKeys.checked, treeData, resetList);
|
|
125
|
-
setDataList(resetList);
|
|
126
|
-
} else {
|
|
127
|
-
setDataList(treeData || []);
|
|
128
|
-
}
|
|
129
|
-
} else {
|
|
130
|
-
setDataList(treeData || []); // 默认状态直接赋值传进来的数据
|
|
131
|
-
}
|
|
132
|
-
}, [treeData, checkedKeys]);
|
|
133
|
-
|
|
134
|
-
var handleToSelectTreeNode = function handleToSelectTreeNode(key, e) {
|
|
135
|
-
var currentData = e.node.dataRef;
|
|
136
|
-
var multiSelectedData = [];
|
|
137
|
-
e.selectedNodes.map(function (item) {
|
|
138
|
-
return multiSelectedData.push(item.dataRef);
|
|
139
|
-
}); // 多选条件下,当前选中所有节点数据
|
|
140
|
-
|
|
141
|
-
onSelect && onSelect(key, {
|
|
142
|
-
currentData: currentData,
|
|
143
|
-
multiData: multiSelectedData
|
|
144
|
-
}, e);
|
|
145
|
-
};
|
|
146
|
-
|
|
147
|
-
var handleToCheckTreeNode = function handleToCheckTreeNode(keys, e) {
|
|
148
|
-
var currentData = e.node.dataRef;
|
|
149
|
-
var multiCheckedData = [];
|
|
150
|
-
e.checkedNodes.map(function (item) {
|
|
151
|
-
return multiCheckedData.push(item.dataRef);
|
|
152
|
-
}); // 多选条件下,当前选中所有节点数据
|
|
153
|
-
|
|
154
|
-
onCheck && onCheck(keys, {
|
|
155
|
-
currentData: currentData,
|
|
156
|
-
multiData: multiCheckedData
|
|
157
|
-
}, e);
|
|
158
|
-
};
|
|
159
|
-
|
|
160
|
-
var handleNodeControl = function handleNodeControl(e, type, nodeData) {
|
|
161
|
-
e.stopPropagation();
|
|
162
|
-
var onEdit = nodeControl.onEdit,
|
|
163
|
-
onDelete = nodeControl.onDelete;
|
|
164
|
-
|
|
165
|
-
if (type === 'edit') {
|
|
166
|
-
onEdit && onEdit(nodeData);
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
if (type === 'delete') {
|
|
170
|
-
onDelete && onDelete(nodeData);
|
|
171
|
-
}
|
|
172
|
-
}; // const <Icon type={selected ? 'frown' : 'frown-o'} />
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
var renderNodeTitle = function renderNodeTitle(item) {
|
|
176
|
-
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, nodeItemReset && nodeItemReset(item).icon || (item.icon ? /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
177
|
-
name: item.icon
|
|
178
|
-
}) : null), " ", item[optionName.title || 'title'], nodeControl ? /*#__PURE__*/_react.default.createElement("span", {
|
|
179
|
-
className: "treeControl"
|
|
180
|
-
}, /*#__PURE__*/_react.default.createElement("a", {
|
|
181
|
-
onClick: function onClick(e) {
|
|
182
|
-
handleNodeControl(e, 'edit', item);
|
|
183
|
-
}
|
|
184
|
-
}, /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
185
|
-
name: 'edit'
|
|
186
|
-
})), /*#__PURE__*/_react.default.createElement(_popconfirm.default, {
|
|
187
|
-
placement: 'top',
|
|
188
|
-
title: "\u786E\u5B9A\u8981\u5220\u9664\uFF1A".concat(item[optionName.title || 'title'], "\u5417\uFF1F"),
|
|
189
|
-
icon: /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
190
|
-
name: "question"
|
|
191
|
-
}),
|
|
192
|
-
onConfirm: function onConfirm(e) {
|
|
193
|
-
handleNodeControl(e, 'delete', item);
|
|
194
|
-
}
|
|
195
|
-
}, /*#__PURE__*/_react.default.createElement("a", {
|
|
196
|
-
onClick: function onClick(e) {
|
|
197
|
-
return e.stopPropagation();
|
|
198
|
-
}
|
|
199
|
-
}, /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
200
|
-
name: 'delete'
|
|
201
|
-
})))) : null, nodeExtra && nodeExtra);
|
|
202
|
-
};
|
|
203
|
-
|
|
204
|
-
var renderTreeNodes = function renderTreeNodes(data) {
|
|
205
|
-
return data.map(function (item) {
|
|
206
|
-
if (item[optionName.children || 'children']) {
|
|
207
|
-
return /*#__PURE__*/_react.default.createElement(TreeNode, Object.assign({}, item, {
|
|
208
|
-
title: renderNodeTitle(item),
|
|
209
|
-
key: item[optionName.value || 'value'],
|
|
210
|
-
className: selectable ? '' : "notPointer",
|
|
211
|
-
disabled: item.isLimit || nodeItemReset && nodeItemReset(item).disabled || item[optionName.disabled || 'disabled'],
|
|
212
|
-
dataRef: item
|
|
213
|
-
}), renderTreeNodes(item[optionName.children || 'children']));
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
return /*#__PURE__*/_react.default.createElement(TreeNode, Object.assign({}, item, {
|
|
217
|
-
title: renderNodeTitle(item),
|
|
218
|
-
key: item[optionName.value || 'value'],
|
|
219
|
-
className: selectable ? '' : "notPointer",
|
|
220
|
-
disabled: item.isLimit || nodeItemReset && nodeItemReset(item).disabled || item[optionName.disabled || 'disabled'],
|
|
221
|
-
dataRef: item
|
|
222
|
-
}));
|
|
223
|
-
});
|
|
224
|
-
};
|
|
225
|
-
|
|
226
|
-
if (dataList.length == 0 && !rootName) return /*#__PURE__*/_react.default.createElement(_empty.default, {
|
|
227
|
-
image: _empty.default.PRESENTED_IMAGE_SIMPLE,
|
|
228
|
-
description: emptyDescription
|
|
229
|
-
});
|
|
230
|
-
var defExpand = [];
|
|
231
|
-
|
|
232
|
-
if (defaultSelectedKeys && defaultSelectedKeys.length > 0) {
|
|
233
|
-
defExpand = defaultSelectedKeys;
|
|
234
|
-
} else {
|
|
235
|
-
defExpand = rootKey ? [rootKey] : ['0'];
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
return /*#__PURE__*/_react.default.createElement(_tree.default, // switcherIcon={<Icon type="down" />}
|
|
239
|
-
Object.assign({}, otherProps, {
|
|
240
|
-
onSelect: function onSelect(keys, e) {
|
|
241
|
-
return handleToSelectTreeNode(keys, e);
|
|
242
|
-
},
|
|
243
|
-
onCheck: function onCheck(keys, e) {
|
|
244
|
-
return handleToCheckTreeNode(keys, e);
|
|
245
|
-
},
|
|
246
|
-
defaultExpandedKeys: defExpand,
|
|
247
|
-
defaultSelectedKeys: defaultSelectedKeys,
|
|
248
|
-
selectable: selectable,
|
|
249
|
-
checkedKeys: checkedKeys,
|
|
250
|
-
checkStrictly: checkStrictly
|
|
251
|
-
}), rootName ? /*#__PURE__*/_react.default.createElement(TreeNode, {
|
|
252
|
-
title: rootName,
|
|
253
|
-
key: rootKey || '0',
|
|
254
|
-
className: selectable ? '' : "notPointer",
|
|
255
|
-
icon: rootIcon || null
|
|
256
|
-
}, renderTreeNodes(dataList)) : renderTreeNodes(dataList));
|
|
257
|
-
};
|
|
258
|
-
|
|
259
|
-
var _default = RefactorTree;
|
|
260
|
-
exports.default = _default;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import './index.less';
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
@root-entry-name: default;
|
|
2
|
-
@import (reference) '~antd/es/style/themes/index';
|
|
3
|
-
.treeControl a {
|
|
4
|
-
padding: 0 2px;
|
|
5
|
-
color: @text-color;
|
|
6
|
-
&:hover{
|
|
7
|
-
color: @primary-color;
|
|
8
|
-
}
|
|
9
|
-
&:first-child {
|
|
10
|
-
margin-left: 2px;
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
.spec-grid-left .ant-tree-node-selected {
|
|
14
|
-
.treeControl a {
|
|
15
|
-
color: #fff;
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
.notPointer {
|
|
19
|
-
.ant-tree-node-content-wrapper {
|
|
20
|
-
cursor: default !important;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
interface optionNameProps {
|
|
2
|
-
key?: string;
|
|
3
|
-
value?: string;
|
|
4
|
-
title?: string;
|
|
5
|
-
children?: string;
|
|
6
|
-
disabled?: string;
|
|
7
|
-
selectable?: string;
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* transDataParam 根据指定选项字段名重组数据
|
|
11
|
-
*
|
|
12
|
-
* @params {array} array 树数据集合
|
|
13
|
-
* @params {object} optionName 选项字段值
|
|
14
|
-
*
|
|
15
|
-
* */
|
|
16
|
-
export declare function transDataParam(array?: any[], optionName?: optionNameProps): any[];
|
|
17
|
-
/**
|
|
18
|
-
* 根据限制字段limitKey进行重组数据
|
|
19
|
-
*
|
|
20
|
-
* @params {array} hasKeys 已选择的数据
|
|
21
|
-
* @params {array} list 树数据集合
|
|
22
|
-
* @params {object} optionName 选项字段值
|
|
23
|
-
* @params {string} limitKey 指定限制字段名
|
|
24
|
-
*
|
|
25
|
-
* @Return {array} 返回结果数据
|
|
26
|
-
*
|
|
27
|
-
* */
|
|
28
|
-
export declare function resetDataWithLimit(hasKeys: any[], list: any[], optionName?: optionNameProps, limitKey?: string): any[];
|
|
29
|
-
/**
|
|
30
|
-
* 根据指定禁用字段 disabledFields 进行重组数据
|
|
31
|
-
*
|
|
32
|
-
* @params {array} list 树数据集合
|
|
33
|
-
* @params {object} optionName 选项字段值
|
|
34
|
-
* @params {string} disabledFields 指定限制字段名
|
|
35
|
-
* @value {string} key:指定禁用的字段名
|
|
36
|
-
* @value {staring}value:指定禁用的字段值,多个用 , 隔开
|
|
37
|
-
*
|
|
38
|
-
* @Return {array} 返回结果数据
|
|
39
|
-
*
|
|
40
|
-
* */
|
|
41
|
-
export declare function resetDataWithDisabled(list?: any[], optionName?: any, disabledFields?: any[]): any[];
|
|
42
|
-
export {};
|