@chaoswise/ui 2.3.5 → 2.3.7
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/lib/CWMessage/index.js +7 -6
- package/lib/CWRangePicker/index.js +2 -3
- package/lib/CWTree/index.js +66 -20
- package/lib/ErrorBoundary/index.js +4 -0
- package/lib/QuickTransfer/index.js +31 -21
- package/lib/QuickTransfer/index.less +340 -302
- package/lib/QuickTransfer/utils.js +66 -3
- package/package.json +2 -2
package/lib/CWMessage/index.js
CHANGED
|
@@ -240,11 +240,12 @@ function Message(props) {
|
|
|
240
240
|
});
|
|
241
241
|
socket.on("push", /*#__PURE__*/function () {
|
|
242
242
|
var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(data) {
|
|
243
|
-
var _JSON$parse,
|
|
243
|
+
var _JSON$parse, count, message, _ref6, _ref6$total, total, noticeMessage, userMessageId, type, _ref7, enable, mode, _ref7$time, time;
|
|
244
244
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
245
245
|
while (1) switch (_context3.prev = _context3.next) {
|
|
246
246
|
case 0:
|
|
247
|
-
_JSON$parse = JSON.parse(data),
|
|
247
|
+
_JSON$parse = JSON.parse(data), count = _JSON$parse.count, message = _JSON$parse.message;
|
|
248
|
+
_ref6 = count || {}, _ref6$total = _ref6.total, total = _ref6$total === void 0 ? 0 : _ref6$total;
|
|
248
249
|
setMessageTotal(total);
|
|
249
250
|
onSocketChange(JSON.parse(data));
|
|
250
251
|
if (message) {
|
|
@@ -252,14 +253,14 @@ function Message(props) {
|
|
|
252
253
|
if (noticeMessage) {
|
|
253
254
|
userMessageId = noticeMessage.id, type = noticeMessage.type;
|
|
254
255
|
if (userMessageId) {
|
|
255
|
-
|
|
256
|
+
_ref7 = messageOptionRef.current[type] || {}, enable = _ref7.enable, mode = _ref7.mode, _ref7$time = _ref7.time, time = _ref7$time === void 0 ? 5 : _ref7$time;
|
|
256
257
|
if (enable) {
|
|
257
258
|
openNotification(time, userMessageId);
|
|
258
259
|
}
|
|
259
260
|
}
|
|
260
261
|
}
|
|
261
262
|
}
|
|
262
|
-
case
|
|
263
|
+
case 5:
|
|
263
264
|
case "end":
|
|
264
265
|
return _context3.stop();
|
|
265
266
|
}
|
|
@@ -303,7 +304,7 @@ function Message(props) {
|
|
|
303
304
|
};
|
|
304
305
|
}();
|
|
305
306
|
var getMessageQuerySettings = /*#__PURE__*/function () {
|
|
306
|
-
var
|
|
307
|
+
var _ref9 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
|
|
307
308
|
var resRequestApi, res, data;
|
|
308
309
|
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
|
309
310
|
while (1) switch (_context6.prev = _context6.next) {
|
|
@@ -324,7 +325,7 @@ function Message(props) {
|
|
|
324
325
|
}, _callee6);
|
|
325
326
|
}));
|
|
326
327
|
return function getMessageQuerySettings() {
|
|
327
|
-
return
|
|
328
|
+
return _ref9.apply(this, arguments);
|
|
328
329
|
};
|
|
329
330
|
}();
|
|
330
331
|
return /*#__PURE__*/React.createElement("div", {
|
|
@@ -264,9 +264,8 @@ var CWRangePicker = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
264
264
|
var _values = [];
|
|
265
265
|
if (values) {
|
|
266
266
|
_values = computedRecentlyValue(values);
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
}
|
|
267
|
+
} else {
|
|
268
|
+
_values = getChangeUnitDate(captureUnit[0], captureUnit[1]);
|
|
270
269
|
}
|
|
271
270
|
var newValue = _objectSpread(_objectSpread({}, recordDateValue), {}, {
|
|
272
271
|
timeDomain: recordUnit,
|
package/lib/CWTree/index.js
CHANGED
|
@@ -9,7 +9,7 @@ import _ConfigProvider from "@chaoswise/ui/lib/ConfigProvider";
|
|
|
9
9
|
import _Menu from "@chaoswise/ui/lib/Menu";
|
|
10
10
|
import "antd/es/tree/style";
|
|
11
11
|
import _Tree from "antd/es/tree";
|
|
12
|
-
var _excluded = ["children", "treeData", "menuData", "extendType", "onClickMenu", "menuStyle", "menuRender", "extraFooter", "tooltipPlacement", "searchValue", "multiple", "selectedKeys", "defaultSelectedKeys", "onSelect", "searchHighlight", "draggable", "isDrawer", "searchHighlightStyle", "className"],
|
|
12
|
+
var _excluded = ["children", "treeData", "menuData", "extendType", "onClickMenu", "menuStyle", "menuRender", "extraFooter", "tooltipPlacement", "searchValue", "multiple", "selectedKeys", "defaultSelectedKeys", "onSelect", "searchHighlight", "draggable", "isDrawer", "searchHighlightStyle", "className", "caseSensitive", "onExpand"],
|
|
13
13
|
_excluded2 = ["icon", "title", "key", "children"];
|
|
14
14
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
15
15
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
@@ -33,9 +33,11 @@ import classnames from "classnames";
|
|
|
33
33
|
import DragSvg from "./assets/Drag";
|
|
34
34
|
import { getLocale } from "./locale";
|
|
35
35
|
import "./index.less";
|
|
36
|
+
import { createTitle } from "../QuickTransfer/utils";
|
|
36
37
|
var TreeNode = _Tree.TreeNode,
|
|
37
38
|
DirectoryTree = _Tree.DirectoryTree;
|
|
38
39
|
var SubMenu = _Menu.SubMenu;
|
|
40
|
+
|
|
39
41
|
/**
|
|
40
42
|
* 基于antd Tree封 支持自定义功能菜单内容、主要适用于左侧导航树(符合UIUE规范)
|
|
41
43
|
*/
|
|
@@ -68,15 +70,23 @@ function CWTree(_ref) {
|
|
|
68
70
|
color: "#F5222D"
|
|
69
71
|
} : _ref$searchHighlightS,
|
|
70
72
|
className = _ref.className,
|
|
73
|
+
_ref$caseSensitive = _ref.caseSensitive,
|
|
74
|
+
caseSensitive = _ref$caseSensitive === void 0 ? false : _ref$caseSensitive,
|
|
75
|
+
_ref$onExpand = _ref.onExpand,
|
|
76
|
+
onExpand = _ref$onExpand === void 0 ? function () {} : _ref$onExpand,
|
|
71
77
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
72
78
|
var _useState = useState(""),
|
|
73
79
|
_useState2 = _slicedToArray(_useState, 2),
|
|
74
80
|
_showExtend = _useState2[0],
|
|
75
81
|
setShowExtend = _useState2[1];
|
|
76
|
-
var _useState3 = useState(
|
|
82
|
+
var _useState3 = useState([]),
|
|
77
83
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
78
|
-
|
|
79
|
-
|
|
84
|
+
expandedKeys = _useState4[0],
|
|
85
|
+
setExpandedKeys = _useState4[1];
|
|
86
|
+
var _useState5 = useState(defaultSelectedKeys),
|
|
87
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
88
|
+
selfSelectedKeys = _useState6[0],
|
|
89
|
+
setSelfSelectedKeys = _useState6[1];
|
|
80
90
|
var _ConfigProvider$useLo = _ConfigProvider.useLocale(),
|
|
81
91
|
_ConfigProvider$useLo2 = _ConfigProvider$useLo.locale,
|
|
82
92
|
locale = _ConfigProvider$useLo2 === void 0 ? "zh" : _ConfigProvider$useLo2;
|
|
@@ -112,7 +122,7 @@ function CWTree(_ref) {
|
|
|
112
122
|
return treeData.map(function (item) {
|
|
113
123
|
var index = 0;
|
|
114
124
|
if (typeof item.title === "string") {
|
|
115
|
-
index = item.title.indexOf(searchValue);
|
|
125
|
+
index = caseSensitive ? item.title.indexOf(searchValue) : item.title.toLowerCase().indexOf(searchValue.toLowerCase());
|
|
116
126
|
}
|
|
117
127
|
if (item.children && item.children.length > 0) {
|
|
118
128
|
var _children = loop(item.children);
|
|
@@ -134,7 +144,7 @@ function CWTree(_ref) {
|
|
|
134
144
|
return item.key === i.key;
|
|
135
145
|
});
|
|
136
146
|
}) : addRootTreeData;
|
|
137
|
-
}, [searchHighlight, treeData, searchValue, rest.checkable]);
|
|
147
|
+
}, [searchHighlight, treeData, searchValue, rest.checkable, caseSensitive]);
|
|
138
148
|
function buildMenu(array) {
|
|
139
149
|
// 递归构建菜单解构
|
|
140
150
|
return array.map(function (item) {
|
|
@@ -234,24 +244,26 @@ function CWTree(_ref) {
|
|
|
234
244
|
}
|
|
235
245
|
function creatTreeNode(data) {
|
|
236
246
|
// 创建树结构
|
|
237
|
-
return data.map(function () {
|
|
238
|
-
var
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
props = _objectWithoutProperties(_ref3, _excluded2);
|
|
247
|
+
return data.map(function (_props) {
|
|
248
|
+
var icon = _props.icon,
|
|
249
|
+
title = _props.title,
|
|
250
|
+
key = _props.key,
|
|
251
|
+
children = _props.children,
|
|
252
|
+
props = _objectWithoutProperties(_props, _excluded2);
|
|
244
253
|
var _title = title;
|
|
245
254
|
if (searchHighlight && typeof title === "string") {
|
|
246
|
-
var
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
255
|
+
var _createTitle = createTitle(caseSensitive, searchValue, title),
|
|
256
|
+
index = _createTitle.index,
|
|
257
|
+
beforeTitle = _createTitle.beforeTitle,
|
|
258
|
+
afterTitle = _createTitle.afterTitle,
|
|
259
|
+
searchStr = _createTitle.searchStr;
|
|
260
|
+
_title = index > -1 ? /*#__PURE__*/React.createElement("span", null, beforeTitle, /*#__PURE__*/React.createElement("span", {
|
|
250
261
|
style: searchHighlightStyle
|
|
251
|
-
},
|
|
262
|
+
}, searchStr), afterTitle) : /*#__PURE__*/React.createElement("span", null, title);
|
|
252
263
|
}
|
|
253
264
|
return /*#__PURE__*/React.createElement(TreeNode, _extends({
|
|
254
265
|
className: "cw-tree-treenode",
|
|
266
|
+
record: _props,
|
|
255
267
|
icon: icon ? icon : null,
|
|
256
268
|
title: menuData(_title, key, props) || menuRender ? creatTitle(icon, _title, key, children, props) : /*#__PURE__*/React.createElement("span", {
|
|
257
269
|
className: "cw-tree-treenode-content"
|
|
@@ -266,6 +278,39 @@ function CWTree(_ref) {
|
|
|
266
278
|
}, props), children && creatTreeNode(children));
|
|
267
279
|
});
|
|
268
280
|
}
|
|
281
|
+
var _onExpand = function _onExpand(keys, e) {
|
|
282
|
+
setExpandedKeys(keys);
|
|
283
|
+
onExpand(keys, e);
|
|
284
|
+
};
|
|
285
|
+
useEffect(function () {
|
|
286
|
+
if (searchValue) {
|
|
287
|
+
var _expandedKeys = [];
|
|
288
|
+
// 遍历树获取所有父节点key
|
|
289
|
+
var loop = function loop(treeData) {
|
|
290
|
+
treeData.forEach(function (item) {
|
|
291
|
+
if (item.children && item.children.length > 0) {
|
|
292
|
+
_expandedKeys.push(item.key);
|
|
293
|
+
loop(item.children);
|
|
294
|
+
}
|
|
295
|
+
});
|
|
296
|
+
};
|
|
297
|
+
loop(_treeData);
|
|
298
|
+
setExpandedKeys(_expandedKeys);
|
|
299
|
+
}
|
|
300
|
+
}, [searchValue, _treeData]);
|
|
301
|
+
|
|
302
|
+
// 有搜索内容默认展开搜索节点
|
|
303
|
+
var expandedConfig = useMemo(function () {
|
|
304
|
+
// 获取全部父节点key
|
|
305
|
+
if (searchValue) {
|
|
306
|
+
return {
|
|
307
|
+
expandedKeys: expandedKeys
|
|
308
|
+
// autoExpandParent: true,
|
|
309
|
+
};
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
return {};
|
|
313
|
+
}, [searchValue, expandedKeys]);
|
|
269
314
|
return /*#__PURE__*/React.createElement("div", {
|
|
270
315
|
className: "cw-tree-outer-wrapper"
|
|
271
316
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -292,8 +337,9 @@ function CWTree(_ref) {
|
|
|
292
337
|
onMouseLeave: function onMouseLeave(e) {
|
|
293
338
|
return hideExtend(e);
|
|
294
339
|
},
|
|
295
|
-
draggable: draggable
|
|
296
|
-
|
|
340
|
+
draggable: draggable,
|
|
341
|
+
onExpand: _onExpand
|
|
342
|
+
}, expandedConfig, rest), children ? children : creatTreeNode(_treeData))))), /*#__PURE__*/React.createElement("div", {
|
|
297
343
|
className: "cw-tree-footer"
|
|
298
344
|
}, extraFooter));
|
|
299
345
|
}
|
|
@@ -44,6 +44,10 @@ var ErrorBoundary = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
44
44
|
localStorage.setItem('ChunkLoadError', '');
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
|
+
// 热更新导致mobx报错,reload页面
|
|
48
|
+
if (error.message.includes('The set of provided stores has changed')) {
|
|
49
|
+
window.location.reload();
|
|
50
|
+
}
|
|
47
51
|
});
|
|
48
52
|
_this.state = {
|
|
49
53
|
hasError: false
|
|
@@ -5,6 +5,8 @@ import "@chaoswise/ui/lib/CWTree/index.less";
|
|
|
5
5
|
import _CWTree from "@chaoswise/ui/lib/CWTree";
|
|
6
6
|
import "@chaoswise/ui/lib/CWTable/index.less";
|
|
7
7
|
import _CWTable from "@chaoswise/ui/lib/CWTable";
|
|
8
|
+
import "@chaoswise/ui/lib/TooltipText/index.less";
|
|
9
|
+
import _TooltipText from "@chaoswise/ui/lib/TooltipText";
|
|
8
10
|
import "@chaoswise/ui/lib/Checkbox/index.less";
|
|
9
11
|
import _Checkbox from "@chaoswise/ui/lib/Checkbox";
|
|
10
12
|
import _ConfigProvider from "@chaoswise/ui/lib/ConfigProvider";
|
|
@@ -35,7 +37,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
35
37
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
36
38
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
37
39
|
import React, { useState, useEffect, Fragment, forwardRef, useMemo } from "react";
|
|
38
|
-
import { filterTreeByName, filterTreeByNameTable, filterObj, getNotSelectKeys, getKeysAndTitle, getBottomKey, renderLeafNodetree, renderRelationNode } from "./utils";
|
|
40
|
+
import { filterTreeByName, filterTree, filterTreeByNameTable, filterObj, getNotSelectKeys, getKeysAndTitle, getBottomKey, renderLeafNodetree, renderRelationNode, createTitle } from "./utils";
|
|
39
41
|
import classnames from "classnames";
|
|
40
42
|
import CheckList from "./CheckList";
|
|
41
43
|
import PropTypes from "prop-types";
|
|
@@ -94,7 +96,9 @@ var QuickTransfer = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
94
96
|
_props$showBorder = props.showBorder,
|
|
95
97
|
showBorder = _props$showBorder === void 0 ? false : _props$showBorder,
|
|
96
98
|
_props$searchOption = props.searchOption,
|
|
97
|
-
searchOption = _props$searchOption === void 0 ? {} : _props$searchOption
|
|
99
|
+
searchOption = _props$searchOption === void 0 ? {} : _props$searchOption,
|
|
100
|
+
_props$caseSensitive = props.caseSensitive,
|
|
101
|
+
caseSensitive = _props$caseSensitive === void 0 ? false : _props$caseSensitive;
|
|
98
102
|
var _searchOption$leftSea = searchOption.leftSearchOption,
|
|
99
103
|
_searchOption$leftSea2 = _searchOption$leftSea === void 0 ? {} : _searchOption$leftSea,
|
|
100
104
|
_searchOption$leftSea3 = _searchOption$leftSea2.onChange,
|
|
@@ -302,7 +306,7 @@ var QuickTransfer = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
302
306
|
});
|
|
303
307
|
}
|
|
304
308
|
if (type === "tree") {
|
|
305
|
-
newCheckedValue =
|
|
309
|
+
newCheckedValue = filterTree(checkValue, searchValue);
|
|
306
310
|
}
|
|
307
311
|
if (type === "table") {
|
|
308
312
|
newCheckedValue = filterTreeByNameTable(checkValue, searchValue, renderColumns ? renderColumns : newRenderColumns);
|
|
@@ -341,7 +345,7 @@ var QuickTransfer = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
341
345
|
setListCheckedStyle(listCheckedKeys_, newData);
|
|
342
346
|
}
|
|
343
347
|
if (type === "tree") {
|
|
344
|
-
newData =
|
|
348
|
+
newData = filterTree(dataSource, searchValue);
|
|
345
349
|
setData(newData);
|
|
346
350
|
}
|
|
347
351
|
if (type === "table") {
|
|
@@ -449,15 +453,9 @@ var QuickTransfer = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
449
453
|
var renderTreeData = function renderTreeData(data) {
|
|
450
454
|
return data.map(function (item) {
|
|
451
455
|
if (item.children) {
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
});
|
|
456
|
-
} else {
|
|
457
|
-
return _objectSpread(_objectSpread({}, item), {}, {
|
|
458
|
-
children: renderTreeData(item.children)
|
|
459
|
-
});
|
|
460
|
-
}
|
|
456
|
+
return _objectSpread(_objectSpread({}, item), {}, {
|
|
457
|
+
children: renderTreeData(item.children)
|
|
458
|
+
});
|
|
461
459
|
} else {
|
|
462
460
|
return item;
|
|
463
461
|
}
|
|
@@ -646,10 +644,11 @@ var QuickTransfer = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
646
644
|
onChange: onCheckAllChange,
|
|
647
645
|
checked: checkAll
|
|
648
646
|
}, allSelectedTextRender ? allSelectedTextRender(listCheckedKeys, data) : allSelectedText), data.map(function (value) {
|
|
649
|
-
var
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
647
|
+
var _createTitle = createTitle(caseSensitive, saveSearchValueLeft, value.title),
|
|
648
|
+
index = _createTitle.index,
|
|
649
|
+
beforeTitle = _createTitle.beforeTitle,
|
|
650
|
+
afterTitle = _createTitle.afterTitle,
|
|
651
|
+
searchStr = _createTitle.searchStr;
|
|
653
652
|
return /*#__PURE__*/React.createElement(_Checkbox, {
|
|
654
653
|
key: value.key,
|
|
655
654
|
checked: listCheckedKeys.includes(value.key),
|
|
@@ -657,11 +656,14 @@ var QuickTransfer = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
657
656
|
return onChangeChecked(e, value);
|
|
658
657
|
},
|
|
659
658
|
disabled: value.disabled
|
|
660
|
-
},
|
|
659
|
+
}, /*#__PURE__*/React.createElement(_TooltipText, {
|
|
660
|
+
title: value.title,
|
|
661
|
+
placement: 'topLeft'
|
|
662
|
+
}, /*#__PURE__*/React.createElement("span", null, index > -1 ? /*#__PURE__*/React.createElement(React.Fragment, null, beforeTitle, /*#__PURE__*/React.createElement("span", {
|
|
661
663
|
style: {
|
|
662
664
|
color: "#F5222D"
|
|
663
665
|
}
|
|
664
|
-
},
|
|
666
|
+
}, searchStr), afterTitle) : value.title)));
|
|
665
667
|
}));
|
|
666
668
|
}
|
|
667
669
|
if (type === "table") {
|
|
@@ -685,7 +687,8 @@ var QuickTransfer = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
685
687
|
selectable: false,
|
|
686
688
|
defaultExpandAll: defaultExpandAll,
|
|
687
689
|
searchValue: saveSearchValueLeft,
|
|
688
|
-
searchHighlight: true
|
|
690
|
+
searchHighlight: true,
|
|
691
|
+
caseSensitive: caseSensitive
|
|
689
692
|
}, treeRest));
|
|
690
693
|
}
|
|
691
694
|
};
|
|
@@ -903,6 +906,13 @@ QuickTransfer.propTypes = {
|
|
|
903
906
|
* allSelectedTextRender(listCheckedKeys,data)
|
|
904
907
|
* }
|
|
905
908
|
*/
|
|
906
|
-
leftContentOption: PropTypes.object
|
|
909
|
+
leftContentOption: PropTypes.object,
|
|
910
|
+
/**
|
|
911
|
+
* 是否区分大小写
|
|
912
|
+
* leftContentOption = {
|
|
913
|
+
* allSelectedTextRender(listCheckedKeys,data)
|
|
914
|
+
* }
|
|
915
|
+
*/
|
|
916
|
+
caseSensitive: PropTypes.bool
|
|
907
917
|
};
|
|
908
918
|
export default QuickTransfer;
|
|
@@ -3,362 +3,400 @@
|
|
|
3
3
|
@table-padding-horizontal-md: 12px; // ui规范
|
|
4
4
|
|
|
5
5
|
.cw-transfer-main {
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
display: flex;
|
|
7
|
+
background: @component-background;
|
|
8
|
+
height: 100%;
|
|
9
|
+
|
|
10
|
+
&.cw-transfer-main-has-border {
|
|
11
|
+
border: @border-width-base @border-style-base @border-color-split;
|
|
12
|
+
border-radius: @border-radius-base;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.cw-transfer-left {
|
|
16
|
+
width: 50%;
|
|
8
17
|
height: 100%;
|
|
18
|
+
display: flex;
|
|
19
|
+
flex-direction: column;
|
|
9
20
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
21
|
+
.cw-transfer-left-content {
|
|
22
|
+
width: 100%;
|
|
23
|
+
flex: 1;
|
|
24
|
+
display: flex;
|
|
25
|
+
flex-direction: column;
|
|
26
|
+
overflow: hidden;
|
|
14
27
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
display: flex;
|
|
19
|
-
flex-direction: column;
|
|
20
|
-
.cw-transfer-left-content {
|
|
21
|
-
width: 100%;
|
|
22
|
-
flex: 1;
|
|
23
|
-
display: flex;
|
|
24
|
-
flex-direction: column;
|
|
25
|
-
overflow: hidden;
|
|
28
|
+
.cw-transfer-left-top {
|
|
29
|
+
padding: 8px 16px 0;
|
|
30
|
+
}
|
|
26
31
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
// table
|
|
34
|
-
.cw-common-table {
|
|
35
|
-
border: none;
|
|
36
|
-
.cw-common-table-title-box {
|
|
37
|
-
border: none;
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
.cw-transfer-table {
|
|
41
|
-
padding: 0 16px;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
small {
|
|
45
|
-
display: none;
|
|
46
|
-
margin-left: 8px;
|
|
47
|
-
color: #faad14
|
|
48
|
-
}
|
|
32
|
+
.cw-transfer-left-main-wrapper {
|
|
33
|
+
flex: 1;
|
|
34
|
+
overflow: auto;
|
|
35
|
+
// table
|
|
36
|
+
.cw-common-table {
|
|
37
|
+
border: none;
|
|
49
38
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
39
|
+
.cw-common-table-title-box {
|
|
40
|
+
border: none;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.cw-transfer-table {
|
|
45
|
+
padding: 0 16px;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
small {
|
|
51
|
+
display: none;
|
|
52
|
+
margin-left: 8px;
|
|
53
|
+
color: #faad14
|
|
54
|
+
}
|
|
55
55
|
|
|
56
|
+
.@{ant-prefix}-tree-treenode-checkbox-checked {
|
|
57
|
+
small {
|
|
58
|
+
display: inline;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
56
61
|
|
|
57
|
-
.cw-transfer-left-content-checkbox {
|
|
58
|
-
display: flex;
|
|
59
|
-
flex-direction: column;
|
|
60
62
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
63
|
+
.cw-transfer-left-content-checkbox {
|
|
64
|
+
display: flex;
|
|
65
|
+
flex-direction: column;
|
|
64
66
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
}
|
|
67
|
+
.@{checkbox-prefix-cls}-wrapper + .@{checkbox-prefix-cls}-wrapper {
|
|
68
|
+
margin: 0;
|
|
69
|
+
}
|
|
69
70
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
71
|
+
.@{checkbox-prefix-cls}-wrapper {
|
|
72
|
+
flex: 1;
|
|
73
|
+
padding: 8px 16px;
|
|
74
|
+
display: flex;
|
|
75
|
+
width: 100%;
|
|
76
|
+
align-items: center;
|
|
74
77
|
}
|
|
78
|
+
|
|
79
|
+
.@{checkbox-prefix-cls}-wrapper span:nth-of-type(2) {
|
|
80
|
+
width: 100%;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.@{checkbox-prefix-cls}-wrapper:hover {
|
|
84
|
+
background: @item-hover-bg; // 符合UI规范
|
|
85
|
+
}
|
|
86
|
+
}
|
|
75
87
|
}
|
|
76
|
-
|
|
77
|
-
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.cw-transfer-footer {
|
|
91
|
+
height: 40px;
|
|
92
|
+
display: flex;
|
|
93
|
+
align-items: center;
|
|
94
|
+
// border-top: 1px solid #e8e8e8;
|
|
95
|
+
padding: 8px 16px;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.cw-transfer-division {
|
|
99
|
+
width: @border-width-base;
|
|
100
|
+
background-color: @background-color-base;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.cw-transfer-right {
|
|
104
|
+
width: 50%;
|
|
105
|
+
height: 100%;
|
|
106
|
+
display: flex;
|
|
107
|
+
flex-direction: column;
|
|
108
|
+
|
|
109
|
+
.cw-transfer-right-content {
|
|
110
|
+
// border: 1px solid #e8e8e8;
|
|
111
|
+
display: flex;
|
|
112
|
+
flex: 1;
|
|
113
|
+
width: 100%;
|
|
114
|
+
overflow: hidden;
|
|
115
|
+
flex-direction: column;
|
|
116
|
+
|
|
117
|
+
.cw-transfer-right-header {
|
|
78
118
|
display: flex;
|
|
119
|
+
text-align: center;
|
|
79
120
|
align-items: center;
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
width: @border-width-base;
|
|
85
|
-
background-color: @background-color-base;
|
|
86
|
-
}
|
|
121
|
+
padding: 12px 16px; // 符合UI规范
|
|
122
|
+
&.cw-transfer-right-header-has-search {
|
|
123
|
+
padding: 8px 16px; // 符合UI规范
|
|
124
|
+
}
|
|
87
125
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
126
|
+
.cw-transfer-right-header-top {
|
|
127
|
+
display: flex;
|
|
128
|
+
justify-content: space-between;
|
|
129
|
+
width: 100%;
|
|
130
|
+
line-height: 20px;
|
|
131
|
+
cursor: pointer;
|
|
132
|
+
|
|
133
|
+
.cw-transfer-right-header-clear {
|
|
134
|
+
color: @primary-color;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.cw-transfer-right-main-wrapper {
|
|
141
|
+
flex: 1;
|
|
142
|
+
overflow: auto;
|
|
143
|
+
|
|
144
|
+
.cw-transfer-right-content-main {
|
|
145
|
+
line-height: 20px; // 符合UI规范
|
|
146
|
+
padding: 8px 16px;
|
|
147
|
+
display: flex;
|
|
148
|
+
justify-content: space-between;
|
|
149
|
+
align-items: center;
|
|
150
|
+
position: relative;
|
|
151
|
+
|
|
152
|
+
&.drop-over-downward {
|
|
153
|
+
border-bottom: 1px dashed @primary-color;
|
|
154
|
+
padding-bottom: 7px;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
&.drop-over-upward {
|
|
158
|
+
border-top: 1px dashed @primary-color;
|
|
159
|
+
padding-top: 7px;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.cw-transfer-right-content-drag {
|
|
163
|
+
color: @text-color;
|
|
164
|
+
position: absolute;
|
|
165
|
+
left: 8px;
|
|
166
|
+
display: block;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
&:hover {
|
|
170
|
+
background-color: @item-hover-bg; // 符合UI规范
|
|
171
|
+
|
|
172
|
+
.cw-transfer-right-content-drag {
|
|
173
|
+
color: @primary-color;
|
|
174
|
+
display: block;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.cw-transfer-right-content-item {
|
|
95
179
|
display: flex;
|
|
96
|
-
|
|
180
|
+
align-items: center;
|
|
97
181
|
width: 100%;
|
|
98
|
-
overflow: hidden;
|
|
99
|
-
flex-direction: column;
|
|
100
|
-
|
|
101
|
-
.cw-transfer-right-header {
|
|
102
|
-
display: flex;
|
|
103
|
-
text-align: center;
|
|
104
|
-
align-items: center;
|
|
105
|
-
padding: 12px 16px; // 符合UI规范
|
|
106
|
-
&.cw-transfer-right-header-has-search{
|
|
107
|
-
padding: 8px 16px; // 符合UI规范
|
|
108
|
-
}
|
|
109
|
-
.cw-transfer-right-header-top {
|
|
110
|
-
display: flex;
|
|
111
|
-
justify-content: space-between;
|
|
112
|
-
width: 100%;
|
|
113
|
-
line-height: 20px;
|
|
114
|
-
cursor: pointer;
|
|
115
|
-
|
|
116
|
-
.cw-transfer-right-header-clear {
|
|
117
|
-
color: @primary-color;
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
182
|
|
|
183
|
+
.cw-transfer-right-content-item-drag-wrapper {
|
|
184
|
+
display: flex;
|
|
185
|
+
justify-content: center;
|
|
186
|
+
align-items: center;
|
|
187
|
+
width: 14px;
|
|
188
|
+
height: 14px;
|
|
189
|
+
margin-right: 8px;
|
|
121
190
|
}
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
.cw-transfer-right-content-main {
|
|
126
|
-
line-height: 20px; // 符合UI规范
|
|
127
|
-
padding: 8px 16px;
|
|
128
|
-
display: flex;
|
|
129
|
-
justify-content: space-between;
|
|
130
|
-
align-items: center;
|
|
131
|
-
position: relative;
|
|
132
|
-
&.drop-over-downward{
|
|
133
|
-
border-bottom: 1px dashed @primary-color;
|
|
134
|
-
padding-bottom: 7px;
|
|
135
|
-
}
|
|
136
|
-
&.drop-over-upward{
|
|
137
|
-
border-top: 1px dashed @primary-color;
|
|
138
|
-
padding-top: 7px;
|
|
139
|
-
}
|
|
140
|
-
.cw-transfer-right-content-drag {
|
|
141
|
-
color: @text-color;
|
|
142
|
-
position: absolute;
|
|
143
|
-
left: 8px;
|
|
144
|
-
display: block;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
&:hover {
|
|
148
|
-
background-color: @item-hover-bg; // 符合UI规范
|
|
149
|
-
|
|
150
|
-
.cw-transfer-right-content-drag {
|
|
151
|
-
color: @primary-color;
|
|
152
|
-
display: block;
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
.cw-transfer-right-content-item{
|
|
156
|
-
display: flex;
|
|
157
|
-
align-items: center;
|
|
158
|
-
width: 100%;
|
|
159
|
-
.cw-transfer-right-content-item-drag-wrapper{
|
|
160
|
-
display: flex;
|
|
161
|
-
justify-content: center;
|
|
162
|
-
align-items: center;
|
|
163
|
-
width: 14px;
|
|
164
|
-
height: 14px;
|
|
165
|
-
margin-right: 8px;
|
|
166
|
-
}
|
|
167
|
-
.cw-transfer-right-content-item-text-wrapper{
|
|
168
|
-
flex: 1;
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
.cw-transfer-right-content-del {
|
|
174
|
-
cursor: pointer;
|
|
175
|
-
// font-size: 14px;
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
.cw-transfer-right-content-del:hover {
|
|
179
|
-
color: @primary-5;
|
|
180
|
-
}
|
|
191
|
+
|
|
192
|
+
.cw-transfer-right-content-item-text-wrapper {
|
|
193
|
+
flex: 1;
|
|
181
194
|
}
|
|
195
|
+
}
|
|
182
196
|
}
|
|
197
|
+
|
|
198
|
+
.cw-transfer-right-content-del {
|
|
199
|
+
cursor: pointer;
|
|
200
|
+
// font-size: 14px;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
.cw-transfer-right-content-del:hover {
|
|
204
|
+
color: @primary-5;
|
|
205
|
+
}
|
|
206
|
+
}
|
|
183
207
|
}
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
.cw-transfer-search {
|
|
211
|
+
display: flex;
|
|
212
|
+
text-align: center;
|
|
213
|
+
align-items: center;
|
|
214
|
+
padding: 8px 16px; // 符合UI规范
|
|
215
|
+
}
|
|
190
216
|
}
|
|
191
217
|
|
|
192
218
|
.cw-transfer-left-main-wrapper {
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
line-height: 36px;
|
|
201
|
-
.@{ant-prefix}-tree-node-content-wrapper {
|
|
202
|
-
.@{ant-prefix}-tree-title {
|
|
203
|
-
height: 36px;
|
|
204
|
-
line-height: 36px;
|
|
205
|
-
.cw-tree-treenode-title {
|
|
206
|
-
height: 36px;
|
|
207
|
-
line-height: 36px;
|
|
208
|
-
}
|
|
209
|
-
// 使用ant变量
|
|
210
|
-
.cw-tree-treenode-extend {
|
|
211
|
-
.cw-tree-treenode-extend-dropdown {
|
|
212
|
-
height: 36px;
|
|
213
|
-
line-height: 36px;
|
|
214
|
-
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
}
|
|
219
|
+
.cw-tree-location-box {
|
|
220
|
+
.cw-tree-box {
|
|
221
|
+
.cw-tree {
|
|
222
|
+
.@{ant-prefix}-tree li .@{ant-prefix}-tree-node-content-wrapper {
|
|
223
|
+
height: 36px !important;
|
|
224
|
+
line-height: 36px !important;
|
|
225
|
+
}
|
|
220
226
|
|
|
227
|
+
line-height: 36px;
|
|
221
228
|
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
229
|
+
.@{ant-prefix}-tree-node-content-wrapper {
|
|
230
|
+
.@{ant-prefix}-tree-title {
|
|
231
|
+
height: 36px;
|
|
232
|
+
line-height: 36px;
|
|
233
|
+
|
|
234
|
+
.cw-tree-treenode-title {
|
|
235
|
+
height: 36px;
|
|
236
|
+
line-height: 36px;
|
|
226
237
|
}
|
|
227
238
|
|
|
228
|
-
|
|
229
|
-
.cw-tree
|
|
239
|
+
// 使用ant变量
|
|
240
|
+
.cw-tree-treenode-extend {
|
|
241
|
+
.cw-tree-treenode-extend-dropdown {
|
|
230
242
|
height: 36px;
|
|
231
243
|
line-height: 36px;
|
|
244
|
+
|
|
245
|
+
}
|
|
232
246
|
}
|
|
247
|
+
}
|
|
233
248
|
}
|
|
234
|
-
|
|
235
|
-
|
|
249
|
+
}
|
|
250
|
+
|
|
236
251
|
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
252
|
+
.@{ant-prefix}-tree.@{ant-prefix}-tree-directory > li span.@{ant-prefix}-tree-node-content-wrapper::before,
|
|
253
|
+
.@{ant-prefix}-tree.@{ant-prefix}-tree-directory .@{ant-prefix}-tree-child-tree > li span.@{ant-prefix}-tree-node-content-wrapper::before {
|
|
254
|
+
height: 36px;
|
|
255
|
+
line-height: 36px;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
.cw-tree.@{ant-prefix}-tree-directory > li span.@{ant-prefix}-tree-node-content-wrapper > span,
|
|
259
|
+
.cw-tree.@{ant-prefix}-tree-directory .@{ant-prefix}-tree-child-tree > li span.@{ant-prefix}-tree-node-content-wrapper > span {
|
|
260
|
+
height: 36px;
|
|
261
|
+
line-height: 36px;
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
.cw-tree-drag {
|
|
266
|
+
.cw-tree {
|
|
267
|
+
|
|
268
|
+
.@{ant-prefix}-tree li .@{ant-prefix}-tree-node-content-wrapper {
|
|
269
|
+
height: 36px !important;
|
|
270
|
+
line-height: 36px !important;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
line-height: 36px;
|
|
274
|
+
|
|
275
|
+
.@{ant-prefix}-tree-node-content-wrapper {
|
|
276
|
+
.@{ant-prefix}-tree-title {
|
|
277
|
+
height: 36px;
|
|
278
|
+
line-height: 36px;
|
|
279
|
+
|
|
280
|
+
.cw-tree-treenode-content {
|
|
281
|
+
.cw-tree-treenode-title {
|
|
282
|
+
height: 36px;
|
|
241
283
|
line-height: 36px;
|
|
242
|
-
|
|
243
|
-
.@{ant-prefix}-tree-title {
|
|
244
|
-
height: 36px;
|
|
245
|
-
line-height: 36px;
|
|
246
|
-
.cw-tree-treenode-content {
|
|
247
|
-
.cw-tree-treenode-title {
|
|
248
|
-
height: 36px;
|
|
249
|
-
line-height: 36px;
|
|
250
|
-
}
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
// 使用ant变量
|
|
254
|
-
.cw-tree-treenode-extend {
|
|
255
|
-
display: inline-flex;
|
|
256
|
-
background-color: transparent;
|
|
257
|
-
// background-color: @primary-1;
|
|
258
|
-
transition: all 0.3s;
|
|
259
|
-
|
|
260
|
-
.cw-tree-treenode-extend-dropdown-drag {
|
|
261
|
-
line-height: 36px;
|
|
262
|
-
}
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
.cw-tree-treenode-extend-show {
|
|
266
|
-
.cw-tree-treenode-extend-dropdown-drag {
|
|
267
|
-
height: 36px;
|
|
268
|
-
}
|
|
269
|
-
}
|
|
270
|
-
}
|
|
271
|
-
}
|
|
284
|
+
}
|
|
272
285
|
}
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
286
|
+
|
|
287
|
+
// 使用ant变量
|
|
288
|
+
.cw-tree-treenode-extend {
|
|
289
|
+
display: inline-flex;
|
|
290
|
+
background-color: transparent;
|
|
291
|
+
// background-color: @primary-1;
|
|
292
|
+
transition: all 0.3s;
|
|
293
|
+
|
|
294
|
+
.cw-tree-treenode-extend-dropdown-drag {
|
|
276
295
|
line-height: 36px;
|
|
296
|
+
}
|
|
277
297
|
}
|
|
278
298
|
|
|
279
|
-
.cw-tree
|
|
280
|
-
|
|
299
|
+
.cw-tree-treenode-extend-show {
|
|
300
|
+
.cw-tree-treenode-extend-dropdown-drag {
|
|
281
301
|
height: 36px;
|
|
282
|
-
|
|
302
|
+
}
|
|
283
303
|
}
|
|
304
|
+
}
|
|
284
305
|
}
|
|
306
|
+
}
|
|
285
307
|
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
308
|
+
.@{ant-prefix}-tree.@{ant-prefix}-tree-directory > li span.@{ant-prefix}-tree-node-content-wrapper::before,
|
|
309
|
+
.@{ant-prefix}-tree.@{ant-prefix}-tree-directory .@{ant-prefix}-tree-child-tree > li span.@{ant-prefix}-tree-node-content-wrapper::before {
|
|
310
|
+
height: 36px;
|
|
311
|
+
line-height: 36px;
|
|
312
|
+
}
|
|
291
313
|
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
314
|
+
.cw-tree.@{ant-prefix}-tree-directory > li span.@{ant-prefix}-tree-node-content-wrapper > span,
|
|
315
|
+
.cw-tree.@{ant-prefix}-tree-directory .@{ant-prefix}-tree-child-tree > li span.@{ant-prefix}-tree-node-content-wrapper > span {
|
|
316
|
+
height: 36px;
|
|
317
|
+
line-height: 36px;
|
|
318
|
+
}
|
|
319
|
+
}
|
|
297
320
|
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
.@{ant-prefix}-tree-directory>li span.@{ant-prefix}-tree-node-content-wrapper>span,
|
|
304
|
-
.cw-tree.@{ant-prefix}-tree-directory .@{ant-prefix}-tree-child-tree>li span.@{ant-prefix}-tree-node-content-wrapper>span {
|
|
305
|
-
height: 36px;
|
|
306
|
-
line-height: 36px;
|
|
307
|
-
}
|
|
321
|
+
.@{ant-prefix}-tree.@{ant-prefix}-tree-directory > li span.@{ant-prefix}-tree-switcher,
|
|
322
|
+
.@{ant-prefix}-tree.@{ant-prefix}-tree-directory .@{ant-prefix}-tree-child-tree > li span.@{ant-prefix}-tree-switcher {
|
|
323
|
+
height: 36px !important;
|
|
324
|
+
line-height: 36px !important;
|
|
325
|
+
}
|
|
308
326
|
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
.cw-tree-treenode {
|
|
314
|
-
.@{ant-prefix}-tree-checkbox {
|
|
315
|
-
transform: translateY(0); // 修复选择框与文字未对齐
|
|
316
|
-
}
|
|
317
|
-
}
|
|
327
|
+
.@{ant-prefix}-tree.@{ant-prefix}-tree-directory > li span.@{ant-prefix}-tree-node-content-wrapper::before,
|
|
328
|
+
.@{ant-prefix}-tree.@{ant-prefix}-tree-directory .@{ant-prefix}-tree-child-tree > li span.@{ant-prefix}-tree-node-content-wrapper::before {
|
|
329
|
+
height: 36px;
|
|
330
|
+
line-height: 36px;
|
|
318
331
|
}
|
|
319
332
|
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
333
|
+
.@{ant-prefix}-tree.@{ant-prefix}-tree-directory > li.@{ant-prefix}-tree-treenode-selected > span.@{ant-prefix}-tree-node-content-wrapper::before,
|
|
334
|
+
.@{ant-prefix}-tree.@{ant-prefix}-tree-directory .@{ant-prefix}-tree-child-tree > li.@{ant-prefix}-tree-treenode-selected > span.@{ant-prefix}-tree-node-content-wrapper::before {
|
|
335
|
+
height: 36px;
|
|
336
|
+
line-height: 36px;
|
|
324
337
|
}
|
|
325
338
|
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
339
|
+
.@{ant-prefix}-tree-directory > li span.@{ant-prefix}-tree-node-content-wrapper > span,
|
|
340
|
+
.cw-tree.@{ant-prefix}-tree-directory .@{ant-prefix}-tree-child-tree > li span.@{ant-prefix}-tree-node-content-wrapper > span {
|
|
341
|
+
height: 36px;
|
|
342
|
+
line-height: 36px;
|
|
329
343
|
}
|
|
330
344
|
|
|
331
|
-
.@{ant-prefix}-tree
|
|
332
|
-
|
|
345
|
+
.@{ant-prefix}-tree-node-content-wrapper > span {
|
|
346
|
+
height: 36px !important;
|
|
347
|
+
line-height: 36px !important;
|
|
333
348
|
}
|
|
334
349
|
|
|
350
|
+
.cw-tree-treenode {
|
|
351
|
+
.@{ant-prefix}-tree-checkbox {
|
|
352
|
+
transform: translateY(0); // 修复选择框与文字未对齐
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
}
|
|
335
356
|
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
357
|
+
.cw-tree-location-box .cw-tree-box .cw-tree.@{ant-prefix}-tree-directory > li.@{ant-prefix}-tree-treenode-selected > span.@{ant-prefix}-tree-node-content-wrapper::before,
|
|
358
|
+
.cw-tree-location-box .cw-tree-box .cw-tree.@{ant-prefix}-tree-directory .@{ant-prefix}-tree-child-tree > li.@{ant-prefix}-tree-treenode-selected > span.@{ant-prefix}-tree-node-content-wrapper::before {
|
|
359
|
+
height: 36px !important;
|
|
360
|
+
line-height: 36px !important;
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
.cw-tree-location-box .cw-tree-box .cw-tree .cw-tree-treenode .@{ant-prefix}-tree-node-content-wrapper {
|
|
364
|
+
height: 36px;
|
|
365
|
+
line-height: 36px;
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
.@{ant-prefix}-tree li.drag-over::before {
|
|
369
|
+
height: 36px;
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
|
|
373
|
+
.@{table-prefix-cls}-middle {
|
|
374
|
+
> .@{table-prefix-cls}-title,
|
|
375
|
+
> .@{table-prefix-cls}-content > .@{table-prefix-cls}-footer {
|
|
376
|
+
padding: 8px @table-padding-horizontal-md 7px;
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
> .@{table-prefix-cls}-content {
|
|
380
|
+
> .@{table-prefix-cls}-header > table,
|
|
381
|
+
> .@{table-prefix-cls}-body > table,
|
|
382
|
+
> .@{table-prefix-cls}-scroll > .@{table-prefix-cls}-header > table,
|
|
383
|
+
> .@{table-prefix-cls}-scroll > .@{table-prefix-cls}-body > table,
|
|
384
|
+
> .@{table-prefix-cls}-fixed-left > .@{table-prefix-cls}-header > table,
|
|
385
|
+
> .@{table-prefix-cls}-fixed-right > .@{table-prefix-cls}-header > table,
|
|
386
|
+
> .@{table-prefix-cls}-fixed-left
|
|
387
|
+
> .@{table-prefix-cls}-body-outer
|
|
388
|
+
> .@{table-prefix-cls}-body-inner
|
|
389
|
+
> table,
|
|
390
|
+
> .@{table-prefix-cls}-fixed-right
|
|
391
|
+
> .@{table-prefix-cls}-body-outer
|
|
392
|
+
> .@{table-prefix-cls}-body-inner
|
|
393
|
+
> table {
|
|
394
|
+
> .@{table-prefix-cls}-thead > tr > th,
|
|
395
|
+
> .@{table-prefix-cls}-tbody > tr > td {
|
|
396
|
+
padding: 8px @table-padding-horizontal-md 7px;
|
|
361
397
|
}
|
|
362
|
-
|
|
363
398
|
}
|
|
364
|
-
}
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
}
|
|
402
|
+
}
|
|
@@ -27,7 +27,7 @@ export var isShowByloopChidren = function isShowByloopChidren(list, searchInfo)
|
|
|
27
27
|
};
|
|
28
28
|
//搜索树
|
|
29
29
|
export var filterTreeByName = function filterTreeByName(organizationList, searchValue) {
|
|
30
|
-
if (searchValue
|
|
30
|
+
if (!searchValue) {
|
|
31
31
|
return organizationList;
|
|
32
32
|
}
|
|
33
33
|
//先过滤最顶层树
|
|
@@ -48,6 +48,67 @@ export var filterTreeByName = function filterTreeByName(organizationList, search
|
|
|
48
48
|
return item;
|
|
49
49
|
});
|
|
50
50
|
};
|
|
51
|
+
export var KMPMatch = function KMPMatch(str, pattern) {
|
|
52
|
+
var next = generateNextArr(pattern);
|
|
53
|
+
var i = 0; // str 指针
|
|
54
|
+
var j = 0; // pattern指针
|
|
55
|
+
while (i < str.length && j < pattern.length) {
|
|
56
|
+
if (str[i] === pattern[j] || j === -1) {
|
|
57
|
+
i++;
|
|
58
|
+
j++;
|
|
59
|
+
} else {
|
|
60
|
+
j = next[j]; // 右移
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
if (j === pattern.length) {
|
|
65
|
+
return i - j;
|
|
66
|
+
} else {
|
|
67
|
+
return -1;
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
export var createTitle = function createTitle(caseSensitive, searchValue, title) {
|
|
71
|
+
var index = caseSensitive ? KMPMatch(title, searchValue) : KMPMatch(title.toLowerCase(), searchValue.toLowerCase());
|
|
72
|
+
var beforeTitle = title.substr(0, index);
|
|
73
|
+
var searchStr = title.substr(index, searchValue.length);
|
|
74
|
+
var afterTitle = title.substr(index + searchValue.length);
|
|
75
|
+
return {
|
|
76
|
+
beforeTitle: beforeTitle,
|
|
77
|
+
afterTitle: afterTitle,
|
|
78
|
+
searchStr: searchStr,
|
|
79
|
+
index: index
|
|
80
|
+
};
|
|
81
|
+
};
|
|
82
|
+
function generateNextArr(pattern) {
|
|
83
|
+
var i = 0;
|
|
84
|
+
var j = -1;
|
|
85
|
+
var next = [];
|
|
86
|
+
next[0] = -1;
|
|
87
|
+
while (i < pattern.length) {
|
|
88
|
+
if (j === -1 || pattern[i] === pattern[j]) {
|
|
89
|
+
i++;
|
|
90
|
+
j++;
|
|
91
|
+
next[i] = j;
|
|
92
|
+
} else {
|
|
93
|
+
j = next[j];
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
return next;
|
|
97
|
+
}
|
|
98
|
+
export var filterTree = function filterTree(list, searchValue) {
|
|
99
|
+
return list.reduce(function (t, c) {
|
|
100
|
+
if (!searchValue) {
|
|
101
|
+
return t.concat(c);
|
|
102
|
+
} else {
|
|
103
|
+
var title = c.title,
|
|
104
|
+
children = c.children;
|
|
105
|
+
var res = children ? filterTree(children, searchValue) : undefined;
|
|
106
|
+
return KMPMatch(title.toLowerCase(), searchValue.toLowerCase()) > -1 || res && res.length > 0 ? t.concat(children ? _objectSpread(_objectSpread({}, c), {}, {
|
|
107
|
+
children: res
|
|
108
|
+
}) : c) : t;
|
|
109
|
+
}
|
|
110
|
+
}, []);
|
|
111
|
+
};
|
|
51
112
|
export var isShowByloopChidrenTable = function isShowByloopChidrenTable(list, searchInfo, searchColumns) {
|
|
52
113
|
var isTrue = false;
|
|
53
114
|
var _loop = function _loop() {
|
|
@@ -131,8 +192,9 @@ export var getKeysAndTitle = function getKeysAndTitle(arr) {
|
|
|
131
192
|
disabled = _ref2.disabled;
|
|
132
193
|
!disabled && keys.push({
|
|
133
194
|
key: item.key,
|
|
134
|
-
title: item.props.title
|
|
195
|
+
title: item.props.originTitle // 不能用item.props.title(节点形式)
|
|
135
196
|
});
|
|
197
|
+
|
|
136
198
|
if (item.props.children && item.props.children.length > 0) {
|
|
137
199
|
keys = keys.concat(getKeysAndTitle(item.props.children));
|
|
138
200
|
}
|
|
@@ -149,7 +211,8 @@ export var getBottomKey = function getBottomKey(arr) {
|
|
|
149
211
|
disabled = _ref3.disabled;
|
|
150
212
|
!disabled && keys.push({
|
|
151
213
|
key: item.key,
|
|
152
|
-
title: item.props.
|
|
214
|
+
title: item.props.originTitle,
|
|
215
|
+
// 不能用item.props.title(节点形式)
|
|
153
216
|
children: item.props.children
|
|
154
217
|
});
|
|
155
218
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chaoswise/ui",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.7",
|
|
4
4
|
"description": "公共UI库",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ui",
|
|
@@ -140,5 +140,5 @@
|
|
|
140
140
|
"access": "public"
|
|
141
141
|
},
|
|
142
142
|
"license": "MIT",
|
|
143
|
-
"gitHead": "
|
|
143
|
+
"gitHead": "a0fef817d7c147bd1f568fdddfccb2da6df5b784"
|
|
144
144
|
}
|