@chaoswise/ui 2.5.3 → 2.5.5
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/Affix/index.js +3 -0
- package/lib/CWMessage/MessageContent/TabList/index.js +3 -3
- package/lib/CWMessage/MessageContent/index.js +6 -6
- package/lib/CWMessage/index.js +72 -92
- package/lib/ErrorBoundary/history.js +51 -51
- package/lib/ErrorBoundary/index.js +3 -2
- package/lib/Table/util.js +1 -1
- package/package.json +2 -2
- package/lib/Col/Collapse.less +0 -129
- package/lib/FilterDropDown/drag.svg +0 -17
- package/lib/QuickTransfer/CheckList.js +0 -53
- package/lib/QuickTransfer/TopicList.js +0 -152
- package/lib/Select/TreeSelect.less +0 -10
- package/lib/Tree/TreeSelect.less +0 -10
|
@@ -13,7 +13,7 @@ function _asyncToGenerator(fn) { return function () { var self = this, args = ar
|
|
|
13
13
|
import React from "react";
|
|
14
14
|
import moment from "moment";
|
|
15
15
|
import { readInnerMessageApi } from "../../service";
|
|
16
|
-
import langConfig from
|
|
16
|
+
import langConfig from "../../locale";
|
|
17
17
|
import { formatMessage } from "../../../utils";
|
|
18
18
|
import "./index.less";
|
|
19
19
|
var TabList = function TabList(props) {
|
|
@@ -63,9 +63,9 @@ var TabList = function TabList(props) {
|
|
|
63
63
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
64
64
|
while (1) switch (_context.prev = _context.next) {
|
|
65
65
|
case 0:
|
|
66
|
-
resRequestApi = _readInnerMessageApi
|
|
66
|
+
resRequestApi = _readInnerMessageApi || readInnerMessageApi;
|
|
67
67
|
_context.next = 3;
|
|
68
|
-
return resRequestApi;
|
|
68
|
+
return resRequestApi(params, gatewayPrefix);
|
|
69
69
|
case 3:
|
|
70
70
|
res = _context.sent;
|
|
71
71
|
if (res.status == "success") {
|
|
@@ -89,9 +89,9 @@ var MessageContent = function MessageContent(props) {
|
|
|
89
89
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
90
90
|
while (1) switch (_context.prev = _context.next) {
|
|
91
91
|
case 0:
|
|
92
|
-
resRequestApi = _getMessageTypeApi
|
|
92
|
+
resRequestApi = _getMessageTypeApi || getMessageTypeApi;
|
|
93
93
|
_context.next = 3;
|
|
94
|
-
return resRequestApi;
|
|
94
|
+
return resRequestApi(gatewayPrefix);
|
|
95
95
|
case 3:
|
|
96
96
|
res = _context.sent;
|
|
97
97
|
if (res && res.status == "success") {
|
|
@@ -123,9 +123,9 @@ var MessageContent = function MessageContent(props) {
|
|
|
123
123
|
case 0:
|
|
124
124
|
setLoading(true);
|
|
125
125
|
conditionsRef.current = _objectSpread(_objectSpread({}, conditionsRef.current), params);
|
|
126
|
-
resRequestApi = _getMessageListApi
|
|
126
|
+
resRequestApi = _getMessageListApi || getMessageListApi;
|
|
127
127
|
_context2.next = 5;
|
|
128
|
-
return resRequestApi;
|
|
128
|
+
return resRequestApi(conditionsRef.current, gatewayPrefix);
|
|
129
129
|
case 5:
|
|
130
130
|
res = _context2.sent;
|
|
131
131
|
if (res && res.status == "success") {
|
|
@@ -151,9 +151,9 @@ var MessageContent = function MessageContent(props) {
|
|
|
151
151
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
152
152
|
while (1) switch (_context3.prev = _context3.next) {
|
|
153
153
|
case 0:
|
|
154
|
-
resRequestApi = _getMessageUnreadCountApi
|
|
154
|
+
resRequestApi = _getMessageUnreadCountApi || getMessageUnreadCountApi;
|
|
155
155
|
_context3.next = 3;
|
|
156
|
-
return resRequestApi;
|
|
156
|
+
return resRequestApi(gatewayPrefix);
|
|
157
157
|
case 3:
|
|
158
158
|
res = _context3.sent;
|
|
159
159
|
if (res && res.status == "success") {
|
package/lib/CWMessage/index.js
CHANGED
|
@@ -91,6 +91,8 @@ function Message(props) {
|
|
|
91
91
|
setTotal = _useState6[1];
|
|
92
92
|
// 保存消息配置
|
|
93
93
|
var messageOptionRef = useRef({});
|
|
94
|
+
// 获取socket信息
|
|
95
|
+
var socketConnectInfo = useRef();
|
|
94
96
|
// 分页配置初始化
|
|
95
97
|
var _useState7 = useState({
|
|
96
98
|
current: 1,
|
|
@@ -113,6 +115,11 @@ function Message(props) {
|
|
|
113
115
|
top: headerHeight,
|
|
114
116
|
maxCount: 1
|
|
115
117
|
});
|
|
118
|
+
return function () {
|
|
119
|
+
if (socketConnectInfo.current) {
|
|
120
|
+
socketConnectInfo.current.disconnect && socketConnectInfo.current.disconnect();
|
|
121
|
+
}
|
|
122
|
+
};
|
|
116
123
|
}, []);
|
|
117
124
|
useEffect(function () {
|
|
118
125
|
setPageInfo(function (pre) {
|
|
@@ -152,9 +159,9 @@ function Message(props) {
|
|
|
152
159
|
userMessageId: id,
|
|
153
160
|
clientType: "BROWSER"
|
|
154
161
|
};
|
|
155
|
-
resRequestApi = _getMessageDetailApi
|
|
162
|
+
resRequestApi = _getMessageDetailApi || getMessageDetailApi;
|
|
156
163
|
_context.next = 4;
|
|
157
|
-
return resRequestApi;
|
|
164
|
+
return resRequestApi(params, gatewayPrefix);
|
|
158
165
|
case 4:
|
|
159
166
|
res = _context.sent;
|
|
160
167
|
if (res && res.status == "success") {
|
|
@@ -190,24 +197,13 @@ function Message(props) {
|
|
|
190
197
|
}();
|
|
191
198
|
var readInnerMessage = /*#__PURE__*/function () {
|
|
192
199
|
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(params) {
|
|
193
|
-
var resRequestApi
|
|
200
|
+
var resRequestApi;
|
|
194
201
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
195
202
|
while (1) switch (_context2.prev = _context2.next) {
|
|
196
203
|
case 0:
|
|
197
|
-
resRequestApi = _readInnerMessageApi
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
case 3:
|
|
201
|
-
res = _context2.sent;
|
|
202
|
-
if (res.status == "success") {
|
|
203
|
-
// if (pageInfo.current > 1 && dataSource.length === 1) {
|
|
204
|
-
// let _params = { current: pageInfo.current - 1 };
|
|
205
|
-
// setPageInfo((pre) => ({ ...pre, current: pre.current - 1 }));
|
|
206
|
-
// conditionsRef.current = { ...conditionsRef.current, ..._params };
|
|
207
|
-
// }
|
|
208
|
-
// 已读消息
|
|
209
|
-
}
|
|
210
|
-
case 5:
|
|
204
|
+
resRequestApi = _readInnerMessageApi || readInnerMessageApi;
|
|
205
|
+
resRequestApi(params, gatewayPrefix);
|
|
206
|
+
case 2:
|
|
211
207
|
case "end":
|
|
212
208
|
return _context2.stop();
|
|
213
209
|
}
|
|
@@ -217,19 +213,47 @@ function Message(props) {
|
|
|
217
213
|
return _ref3.apply(this, arguments);
|
|
218
214
|
};
|
|
219
215
|
}();
|
|
216
|
+
var getSocketPostMessage = function getSocketPostMessage(data) {
|
|
217
|
+
var _JSON$parse = JSON.parse(data),
|
|
218
|
+
count = _JSON$parse.count,
|
|
219
|
+
message = _JSON$parse.message;
|
|
220
|
+
var _ref4 = count || {},
|
|
221
|
+
_ref4$total = _ref4.total,
|
|
222
|
+
total = _ref4$total === void 0 ? 0 : _ref4$total;
|
|
223
|
+
setMessageTotal(total);
|
|
224
|
+
onSocketChange(JSON.parse(data));
|
|
225
|
+
if (message) {
|
|
226
|
+
var noticeMessage = message.noticeMessage;
|
|
227
|
+
if (noticeMessage) {
|
|
228
|
+
var userMessageId = noticeMessage.id,
|
|
229
|
+
type = noticeMessage.type;
|
|
230
|
+
if (userMessageId) {
|
|
231
|
+
var _ref5 = messageOptionRef.current[type] || {},
|
|
232
|
+
enable = _ref5.enable,
|
|
233
|
+
mode = _ref5.mode,
|
|
234
|
+
_ref5$time = _ref5.time,
|
|
235
|
+
time = _ref5$time === void 0 ? 5 : _ref5$time;
|
|
236
|
+
if (enable) {
|
|
237
|
+
openNotification(time, userMessageId);
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
};
|
|
220
243
|
var connectSocket = /*#__PURE__*/function () {
|
|
221
|
-
var
|
|
244
|
+
var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
|
|
222
245
|
var resRequestApi, res, finalOrigin, socket;
|
|
223
|
-
return _regeneratorRuntime().wrap(function
|
|
224
|
-
while (1) switch (
|
|
246
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
247
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
225
248
|
case 0:
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
249
|
+
// 获取sessionId
|
|
250
|
+
resRequestApi = _getSessionId || getSessionId;
|
|
251
|
+
_context3.next = 3;
|
|
252
|
+
return resRequestApi(gatewayPrefix);
|
|
229
253
|
case 3:
|
|
230
|
-
res =
|
|
254
|
+
res = _context3.sent;
|
|
231
255
|
if (res && res.status == "success") {
|
|
232
|
-
finalOrigin = socketOrigin
|
|
256
|
+
finalOrigin = socketOrigin || "ws://".concat(window.location.host); // 连接到后端socket服务器
|
|
233
257
|
socket = io(finalOrigin, {
|
|
234
258
|
transports: ["websocket"],
|
|
235
259
|
path: "".concat(socketPathPrefix, "/message/socket.io"),
|
|
@@ -237,95 +261,51 @@ function Message(props) {
|
|
|
237
261
|
sessionId: res.data,
|
|
238
262
|
clientType: "BROWSER"
|
|
239
263
|
}
|
|
240
|
-
});
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
245
|
-
while (1) switch (_context3.prev = _context3.next) {
|
|
246
|
-
case 0:
|
|
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;
|
|
249
|
-
setMessageTotal(total);
|
|
250
|
-
onSocketChange(JSON.parse(data));
|
|
251
|
-
if (message) {
|
|
252
|
-
noticeMessage = message.noticeMessage;
|
|
253
|
-
if (noticeMessage) {
|
|
254
|
-
userMessageId = noticeMessage.id, type = noticeMessage.type;
|
|
255
|
-
if (userMessageId) {
|
|
256
|
-
_ref7 = messageOptionRef.current[type] || {}, enable = _ref7.enable, mode = _ref7.mode, _ref7$time = _ref7.time, time = _ref7$time === void 0 ? 5 : _ref7$time;
|
|
257
|
-
if (enable) {
|
|
258
|
-
openNotification(time, userMessageId);
|
|
259
|
-
}
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
}
|
|
263
|
-
case 5:
|
|
264
|
-
case "end":
|
|
265
|
-
return _context3.stop();
|
|
266
|
-
}
|
|
267
|
-
}, _callee3);
|
|
268
|
-
}));
|
|
269
|
-
return function (_x4) {
|
|
270
|
-
return _ref5.apply(this, arguments);
|
|
271
|
-
};
|
|
272
|
-
}());
|
|
264
|
+
}); // 记录socket连接信息,用于关闭socket连接
|
|
265
|
+
socketConnectInfo.current = socket;
|
|
266
|
+
// 监听从服务器传来的消息
|
|
267
|
+
socket.on("push", getSocketPostMessage);
|
|
273
268
|
// socket重连
|
|
274
|
-
socket.on("reconnect_attempt",
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
return resRequestApi;
|
|
281
|
-
case 2:
|
|
282
|
-
res = _context4.sent;
|
|
283
|
-
if (res && res.status == "success") {
|
|
284
|
-
socket.io.opts.query = {
|
|
285
|
-
sessionId: res.data,
|
|
286
|
-
clientType: "BROWSER"
|
|
287
|
-
};
|
|
288
|
-
}
|
|
289
|
-
case 4:
|
|
290
|
-
case "end":
|
|
291
|
-
return _context4.stop();
|
|
292
|
-
}
|
|
293
|
-
}, _callee4);
|
|
294
|
-
})));
|
|
269
|
+
socket.on("reconnect_attempt", function () {
|
|
270
|
+
socket.io.opts.query = {
|
|
271
|
+
sessionId: res.data,
|
|
272
|
+
clientType: "BROWSER"
|
|
273
|
+
};
|
|
274
|
+
});
|
|
295
275
|
}
|
|
296
276
|
case 5:
|
|
297
277
|
case "end":
|
|
298
|
-
return
|
|
278
|
+
return _context3.stop();
|
|
299
279
|
}
|
|
300
|
-
},
|
|
280
|
+
}, _callee3);
|
|
301
281
|
}));
|
|
302
282
|
return function connectSocket() {
|
|
303
|
-
return
|
|
283
|
+
return _ref6.apply(this, arguments);
|
|
304
284
|
};
|
|
305
285
|
}();
|
|
306
286
|
var getMessageQuerySettings = /*#__PURE__*/function () {
|
|
307
|
-
var
|
|
287
|
+
var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
|
|
308
288
|
var resRequestApi, res, data;
|
|
309
|
-
return _regeneratorRuntime().wrap(function
|
|
310
|
-
while (1) switch (
|
|
289
|
+
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
290
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
311
291
|
case 0:
|
|
312
|
-
resRequestApi = _getMessageQuerySettingsApi
|
|
313
|
-
|
|
314
|
-
return resRequestApi;
|
|
292
|
+
resRequestApi = _getMessageQuerySettingsApi || getMessageQuerySettingsApi;
|
|
293
|
+
_context4.next = 3;
|
|
294
|
+
return resRequestApi(gatewayPrefix);
|
|
315
295
|
case 3:
|
|
316
|
-
res =
|
|
296
|
+
res = _context4.sent;
|
|
317
297
|
if (res && res.status === "success") {
|
|
318
298
|
data = res.data;
|
|
319
299
|
messageOptionRef.current = data || {};
|
|
320
300
|
}
|
|
321
301
|
case 5:
|
|
322
302
|
case "end":
|
|
323
|
-
return
|
|
303
|
+
return _context4.stop();
|
|
324
304
|
}
|
|
325
|
-
},
|
|
305
|
+
}, _callee4);
|
|
326
306
|
}));
|
|
327
307
|
return function getMessageQuerySettings() {
|
|
328
|
-
return
|
|
308
|
+
return _ref7.apply(this, arguments);
|
|
329
309
|
};
|
|
330
310
|
}();
|
|
331
311
|
return /*#__PURE__*/React.createElement("div", {
|
|
@@ -5,28 +5,33 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
|
|
5
5
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
6
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
7
|
var Dep = /*#__PURE__*/function () {
|
|
8
|
-
|
|
9
|
-
function Dep(name) {
|
|
8
|
+
function Dep() {
|
|
10
9
|
_classCallCheck(this, Dep);
|
|
11
|
-
this.subs = [];
|
|
10
|
+
this.subs = []; // 存放所有订阅者
|
|
12
11
|
}
|
|
12
|
+
// 添加订阅者
|
|
13
13
|
_createClass(Dep, [{
|
|
14
|
-
key: "
|
|
15
|
-
value: function
|
|
16
|
-
this.subs.
|
|
14
|
+
key: "addSub",
|
|
15
|
+
value: function addSub(watch) {
|
|
16
|
+
if (watch && this.subs.indexOf(watch) < 0) {
|
|
17
|
+
this.subs.push(watch);
|
|
18
|
+
}
|
|
17
19
|
}
|
|
20
|
+
// 移除订阅者
|
|
21
|
+
}, {
|
|
22
|
+
key: "removeSub",
|
|
23
|
+
value: function removeSub(watch) {
|
|
24
|
+
var index = this.subs.indexOf(watch);
|
|
25
|
+
if (index > -1) {
|
|
26
|
+
this.subs.splice(index, 1);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
// 通知所有订阅者
|
|
18
30
|
}, {
|
|
19
31
|
key: "notify",
|
|
20
32
|
value: function notify() {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
if (typeof e.update === 'function') {
|
|
24
|
-
try {
|
|
25
|
-
e.update.apply(e); //触发订阅者更新函数
|
|
26
|
-
} catch (err) {
|
|
27
|
-
console.error(err);
|
|
28
|
-
}
|
|
29
|
-
}
|
|
33
|
+
this.subs.forEach(function (sub) {
|
|
34
|
+
return sub.update();
|
|
30
35
|
});
|
|
31
36
|
}
|
|
32
37
|
}]);
|
|
@@ -35,49 +40,44 @@ var Dep = /*#__PURE__*/function () {
|
|
|
35
40
|
var Watch = /*#__PURE__*/function () {
|
|
36
41
|
function Watch(name, fn) {
|
|
37
42
|
_classCallCheck(this, Watch);
|
|
38
|
-
this.name = name;
|
|
39
|
-
this.callBack = fn;
|
|
43
|
+
this.name = name;
|
|
44
|
+
this.callBack = fn;
|
|
40
45
|
}
|
|
41
46
|
_createClass(Watch, [{
|
|
42
|
-
key: "add",
|
|
43
|
-
value: function add(dep) {
|
|
44
|
-
//将订阅者放入dep订阅池
|
|
45
|
-
dep.subs.push(this);
|
|
46
|
-
}
|
|
47
|
-
}, {
|
|
48
47
|
key: "update",
|
|
49
48
|
value: function update() {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
49
|
+
if (typeof this.callBack === 'function') {
|
|
50
|
+
this.callBack(this.name);
|
|
51
|
+
}
|
|
53
52
|
}
|
|
54
53
|
}]);
|
|
55
54
|
return Watch;
|
|
56
55
|
}();
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
} else if (name === 'pushState') {
|
|
66
|
-
var method = history[name];
|
|
67
|
-
return function () {
|
|
68
|
-
method.apply(history, arguments);
|
|
69
|
-
historyDep.notify();
|
|
70
|
-
};
|
|
71
|
-
} else if (name === 'replaceState') {
|
|
72
|
-
var _method = history[name];
|
|
73
|
-
return function () {
|
|
74
|
-
_method.apply(history, arguments);
|
|
75
|
-
historyDep.notify();
|
|
76
|
-
};
|
|
56
|
+
var historyDep = new Dep(); // 单例订阅池
|
|
57
|
+
|
|
58
|
+
// 修改history方法
|
|
59
|
+
var modifyHistoryMethod = function modifyHistoryMethod(methodName) {
|
|
60
|
+
var original = history[methodName];
|
|
61
|
+
history[methodName] = function () {
|
|
62
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
63
|
+
args[_key] = arguments[_key];
|
|
77
64
|
}
|
|
65
|
+
var result = original.apply(this, args);
|
|
66
|
+
historyDep.notify(); // 通知变动
|
|
67
|
+
return result;
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
// 添加订阅者
|
|
72
|
+
window.addHistoryListener = function (name, fn) {
|
|
73
|
+
var watcher = new Watch(name, fn);
|
|
74
|
+
historyDep.addSub(watcher);
|
|
75
|
+
// 返回取消订阅的函数
|
|
76
|
+
return function removeHistoryListener() {
|
|
77
|
+
historyDep.removeSub(watcher);
|
|
78
78
|
};
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
// 修改pushState和replaceState以便通知订阅者
|
|
82
|
+
modifyHistoryMethod('pushState');
|
|
83
|
+
modifyHistoryMethod('replaceState');
|
|
@@ -56,7 +56,7 @@ var ErrorBoundary = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
56
56
|
_createClass(ErrorBoundary, [{
|
|
57
57
|
key: "componentDidMount",
|
|
58
58
|
value: function componentDidMount() {
|
|
59
|
-
window.addHistoryListener('history', this.historyChange);
|
|
59
|
+
this.removeListener = window.addHistoryListener('history', this.historyChange);
|
|
60
60
|
window.addEventListener('hashchange', this.historyChange);
|
|
61
61
|
this.timer = setTimeout(function () {
|
|
62
62
|
localStorage.setItem('ChunkLoadError', '');
|
|
@@ -65,8 +65,9 @@ var ErrorBoundary = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
65
65
|
}, {
|
|
66
66
|
key: "componentWillUnmount",
|
|
67
67
|
value: function componentWillUnmount() {
|
|
68
|
-
|
|
68
|
+
this.removeListener();
|
|
69
69
|
window.removeEventListener('hashchange', this.historyChange);
|
|
70
|
+
clearTimeout(this.timer);
|
|
70
71
|
}
|
|
71
72
|
}, {
|
|
72
73
|
key: "componentDidCatch",
|
package/lib/Table/util.js
CHANGED
|
@@ -10,6 +10,6 @@ export function adjustScrollbarHeight(element) {
|
|
|
10
10
|
var curPaddingBottom = getDomCssAttr(element, "padding-bottom");
|
|
11
11
|
var finalMargin = Math.abs(curMarginBottom) - Math.abs(curPaddingBottom);
|
|
12
12
|
if (scrollbarHeight > 0 && finalMargin !== scrollbarHeight) {
|
|
13
|
-
element.style.marginBottom = "-".concat(
|
|
13
|
+
element.style.marginBottom = "-".concat(scrollbarHeight + curPaddingBottom, "px");
|
|
14
14
|
}
|
|
15
15
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chaoswise/ui",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.5",
|
|
4
4
|
"description": "公共UI库",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ui",
|
|
@@ -147,5 +147,5 @@
|
|
|
147
147
|
"access": "public"
|
|
148
148
|
},
|
|
149
149
|
"license": "MIT",
|
|
150
|
-
"gitHead": "
|
|
150
|
+
"gitHead": "46b2853aff3fc06cda3a575fcf49dc688b547551"
|
|
151
151
|
}
|
package/lib/Col/Collapse.less
DELETED
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
@collapse-prefix-cls: ~'@{ant-prefix}-collapse';
|
|
2
|
-
|
|
3
|
-
.@{collapse-prefix-cls} {
|
|
4
|
-
|
|
5
|
-
background-color: @collapse-header-bg;
|
|
6
|
-
border: @border-width-base @border-style-base @border-color-base;
|
|
7
|
-
border-bottom: 0;
|
|
8
|
-
border-radius: @collapse-panel-border-radius;
|
|
9
|
-
|
|
10
|
-
& > &-item {
|
|
11
|
-
border-bottom: @border-width-base @border-style-base @border-color-base;
|
|
12
|
-
|
|
13
|
-
&:last-child {
|
|
14
|
-
&,
|
|
15
|
-
& > .@{collapse-prefix-cls}-header {
|
|
16
|
-
border-radius: 0 0 @collapse-panel-border-radius @collapse-panel-border-radius;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
> .@{collapse-prefix-cls}-header {
|
|
21
|
-
position: relative;
|
|
22
|
-
padding: @collapse-header-padding;
|
|
23
|
-
padding-left: @collapse-header-padding-extra;
|
|
24
|
-
color: @heading-color;
|
|
25
|
-
line-height: 22px;
|
|
26
|
-
cursor: pointer;
|
|
27
|
-
transition: all 0.3s;
|
|
28
|
-
|
|
29
|
-
.@{collapse-prefix-cls}-arrow {
|
|
30
|
-
|
|
31
|
-
position: absolute;
|
|
32
|
-
top: 50%;
|
|
33
|
-
left: @padding-md + 8px; // ui规范
|
|
34
|
-
display: inline-block;
|
|
35
|
-
font-size: @font-size-sm;
|
|
36
|
-
transform: translateY(-50%);
|
|
37
|
-
|
|
38
|
-
& svg {
|
|
39
|
-
transition: transform 0.24s;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
.@{collapse-prefix-cls}-extra {
|
|
44
|
-
float: right;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
&:focus {
|
|
48
|
-
outline: none;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
&.@{collapse-prefix-cls}-no-arrow {
|
|
53
|
-
> .@{collapse-prefix-cls}-header {
|
|
54
|
-
padding-left: 12px;
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
// Expand Icon right
|
|
60
|
-
&-icon-position-right {
|
|
61
|
-
& > .@{collapse-prefix-cls}-item {
|
|
62
|
-
> .@{collapse-prefix-cls}-header {
|
|
63
|
-
padding: @collapse-header-padding;
|
|
64
|
-
padding-right: @collapse-header-padding-extra;
|
|
65
|
-
|
|
66
|
-
.@{collapse-prefix-cls}-arrow {
|
|
67
|
-
right: @padding-md + 8px; // ui规范
|
|
68
|
-
left: auto;
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
&-anim-active {
|
|
75
|
-
transition: height 0.2s @ease-out;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
&-content {
|
|
79
|
-
overflow: hidden;
|
|
80
|
-
color: @text-color;
|
|
81
|
-
background-color: @collapse-content-bg;
|
|
82
|
-
border-top: @border-width-base @border-style-base @border-color-base;
|
|
83
|
-
|
|
84
|
-
& > &-box {
|
|
85
|
-
padding: @collapse-content-padding;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
&-inactive {
|
|
89
|
-
display: none;
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
&-item:last-child {
|
|
94
|
-
> .@{collapse-prefix-cls}-content {
|
|
95
|
-
border-radius: 0 0 @collapse-panel-border-radius @collapse-panel-border-radius;
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
&-borderless {
|
|
100
|
-
background-color: @collapse-header-bg;
|
|
101
|
-
border: 0;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
&-borderless > &-item {
|
|
105
|
-
border-bottom: @border-width-base @border-style-base @border-color-base;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
&-borderless > &-item:last-child,
|
|
109
|
-
&-borderless > &-item:last-child &-header {
|
|
110
|
-
border-radius: 0;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
&-borderless > &-item > &-content {
|
|
114
|
-
background-color: transparent;
|
|
115
|
-
border-top: 0;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
&-borderless > &-item > &-content > &-content-box {
|
|
119
|
-
padding-top: 4px;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
& &-item-disabled > &-header {
|
|
123
|
-
&,
|
|
124
|
-
& > .arrow {
|
|
125
|
-
color: @disabled-color;
|
|
126
|
-
cursor: not-allowed;
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<svg width="7px" height="12px" viewBox="0 0 7 12" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
3
|
-
<title>形状</title>
|
|
4
|
-
<g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" opacity="0.65">
|
|
5
|
-
<g id="4.2请求列表下钻-—快照请求列表页" transform="translate(-1368.000000, -705.000000)" fill="#000000" fill-rule="nonzero">
|
|
6
|
-
<g id="编组-11" transform="translate(232.000000, 554.000000)">
|
|
7
|
-
<g id="默认" transform="translate(857.000000, 10.000000)">
|
|
8
|
-
<g id="源列表" transform="translate(143.000000, 34.000000)">
|
|
9
|
-
<g id="拖拽备份-3" transform="translate(132.000000, 105.000000)">
|
|
10
|
-
<path d="M9.91111111,2 C9.37777778,2 8.97777778,2.4 8.97777778,2.93333333 C8.97777778,3.46666666 9.42222222,3.86666667 9.91111111,3.86666667 C10.4444444,3.86666667 10.8444444,3.46666667 10.8444444,2.93333333 C10.8888889,2.4 10.4444444,2 9.91111111,2 Z M9.91111111,6.71111111 C9.37777778,6.71111111 8.97777778,7.11111111 8.97777778,7.64444444 C8.97777778,8.17777777 9.42222222,8.57777778 9.91111111,8.57777778 C10.4444444,8.57777778 10.8444444,8.17777778 10.8444444,7.64444444 C10.8888889,7.11111111 10.4444444,6.71111111 9.91111111,6.71111111 Z M9.91111111,11.4222222 C9.37777778,11.4222222 8.97777778,11.8222222 8.97777778,12.3555556 C8.97777778,12.8888889 9.42222222,13.2888889 9.91111111,13.2888889 C10.4444444,13.2888889 10.8444444,12.8888889 10.8444444,12.3555556 C10.8888889,11.8222222 10.4444444,11.4222222 9.91111111,11.4222222 C9.42222222,11.4222222 9.91111111,11.4222222 9.91111111,11.4222222 Z M5.82222222,2 C5.33333333,2 4.88888889,2.4 4.88888889,2.93333333 C4.88888889,3.46666666 5.33333333,3.86666667 5.82222222,3.86666667 C6.35555555,3.86666667 6.75555555,3.46666667 6.75555556,2.93333333 C6.8,2.4 6.35555556,2 5.82222222,2 Z M5.82222222,6.71111111 C5.28888889,6.71111111 4.88888889,7.11111111 4.88888889,7.64444444 C4.88888889,8.17777777 5.33333333,8.57777778 5.82222222,8.57777778 C6.35555555,8.57777778 6.75555555,8.17777778 6.75555556,7.64444444 C6.8,7.11111111 6.35555556,6.71111111 5.82222222,6.71111111 Z M5.82222222,11.4222222 C5.28888889,11.4222222 4.88888889,11.8222222 4.88888889,12.3555556 C4.88888889,12.8888889 5.33333333,13.2888889 5.82222222,13.2888889 C6.35555555,13.2888889 6.75555555,12.8888889 6.75555556,12.3555556 C6.8,11.8222222 6.35555556,11.4222222 5.82222222,11.4222222 Z" id="形状"></path>
|
|
11
|
-
</g>
|
|
12
|
-
</g>
|
|
13
|
-
</g>
|
|
14
|
-
</g>
|
|
15
|
-
</g>
|
|
16
|
-
</g>
|
|
17
|
-
</svg>
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
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); }
|
|
2
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
3
|
-
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
4
|
-
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); }
|
|
5
|
-
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
6
|
-
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
7
|
-
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; }
|
|
8
|
-
import React, { Fragment } from 'react';
|
|
9
|
-
import TopicList from './TopicList';
|
|
10
|
-
import { DndProvider } from "react-dnd";
|
|
11
|
-
import { HTML5Backend } from "react-dnd-html5-backend";
|
|
12
|
-
var CheckList = function CheckList(props) {
|
|
13
|
-
var checkValue = props.checkValue,
|
|
14
|
-
handleDelete = props.handleDelete,
|
|
15
|
-
handlePreviewList = props.handlePreviewList,
|
|
16
|
-
type = props.type,
|
|
17
|
-
render = props.render,
|
|
18
|
-
renderColumns = props.renderColumns,
|
|
19
|
-
dragList = props.dragList,
|
|
20
|
-
useDndProvider = props.useDndProvider;
|
|
21
|
-
var moveList = function moveList(dragIndex, hoverIndex) {
|
|
22
|
-
var tmp = checkValue[dragIndex]; //临时储存文件
|
|
23
|
-
checkValue.splice(dragIndex, 1); //移除拖拽项
|
|
24
|
-
checkValue.splice(hoverIndex, 0, tmp); //插入放置项
|
|
25
|
-
handlePreviewList(_toConsumableArray(checkValue)); //更新修改后的列表
|
|
26
|
-
};
|
|
27
|
-
var isLockSort = type === "list" && checkValue.filter(function (item) {
|
|
28
|
-
return item.disabled;
|
|
29
|
-
}).length;
|
|
30
|
-
var renderList = function renderList(item, index) {
|
|
31
|
-
return /*#__PURE__*/React.createElement(TopicList, _extends({
|
|
32
|
-
labelValue: item,
|
|
33
|
-
type: type,
|
|
34
|
-
renderColumns: renderColumns,
|
|
35
|
-
label: item.key,
|
|
36
|
-
value: item.title && item.title,
|
|
37
|
-
index: index,
|
|
38
|
-
render: render,
|
|
39
|
-
key: item.key,
|
|
40
|
-
handleDelete: handleDelete,
|
|
41
|
-
moveList: moveList,
|
|
42
|
-
dragList: dragList,
|
|
43
|
-
useDndProvider: useDndProvider,
|
|
44
|
-
isLockSort: isLockSort
|
|
45
|
-
}, item));
|
|
46
|
-
};
|
|
47
|
-
return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(DndProvider, {
|
|
48
|
-
backend: HTML5Backend
|
|
49
|
-
}, checkValue.map(function (item, index) {
|
|
50
|
-
return renderList(item, index);
|
|
51
|
-
})));
|
|
52
|
-
};
|
|
53
|
-
export default CheckList;
|
|
@@ -1,152 +0,0 @@
|
|
|
1
|
-
import _Icon from "@chaoswise/ui/lib/Antd/Icon";
|
|
2
|
-
import "@chaoswise/ui/lib/Tooltip/index.less";
|
|
3
|
-
import _Tooltip from "@chaoswise/ui/lib/Tooltip";
|
|
4
|
-
import _ConfigProvider from "@chaoswise/ui/lib/ConfigProvider";
|
|
5
|
-
var _excluded = ["label", "value", "index", "handleDelete", "labelValue", "moveList", "type", "renderColumns", "render", "dragList", "disabled", "isLockSort"];
|
|
6
|
-
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); }
|
|
7
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
8
|
-
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."); }
|
|
9
|
-
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); }
|
|
10
|
-
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; }
|
|
11
|
-
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0) { ; } } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
12
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
13
|
-
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; }
|
|
14
|
-
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; }
|
|
15
|
-
import React, { Fragment, useRef } from "react";
|
|
16
|
-
import { useDrag, useDrop } from "react-dnd";
|
|
17
|
-
import classnames from "classnames";
|
|
18
|
-
import { getLocale } from "./locale";
|
|
19
|
-
import LockSvg from "./assets/LockSvg";
|
|
20
|
-
import DragSvg from "./assets/DragSvg";
|
|
21
|
-
var TopicList = function TopicList(_ref) {
|
|
22
|
-
var label = _ref.label,
|
|
23
|
-
value = _ref.value,
|
|
24
|
-
index = _ref.index,
|
|
25
|
-
handleDelete = _ref.handleDelete,
|
|
26
|
-
labelValue = _ref.labelValue,
|
|
27
|
-
moveList = _ref.moveList,
|
|
28
|
-
type = _ref.type,
|
|
29
|
-
renderColumns = _ref.renderColumns,
|
|
30
|
-
render = _ref.render,
|
|
31
|
-
dragList = _ref.dragList,
|
|
32
|
-
disabled = _ref.disabled,
|
|
33
|
-
isLockSort = _ref.isLockSort,
|
|
34
|
-
rest = _objectWithoutProperties(_ref, _excluded);
|
|
35
|
-
// 获取当前语言
|
|
36
|
-
var _ConfigProvider$useLo = _ConfigProvider.useLocale(),
|
|
37
|
-
_ConfigProvider$useLo2 = _ConfigProvider$useLo.locale,
|
|
38
|
-
locale = _ConfigProvider$useLo2 === void 0 ? "zh" : _ConfigProvider$useLo2;
|
|
39
|
-
var localeObj = getLocale(locale);
|
|
40
|
-
var dragRef = useRef(null);
|
|
41
|
-
var _useDrag = useDrag({
|
|
42
|
-
item: {
|
|
43
|
-
type: "child",
|
|
44
|
-
value: value,
|
|
45
|
-
index: index,
|
|
46
|
-
label: label,
|
|
47
|
-
labelValue: labelValue
|
|
48
|
-
}
|
|
49
|
-
}),
|
|
50
|
-
_useDrag2 = _slicedToArray(_useDrag, 2),
|
|
51
|
-
drag = _useDrag2[1];
|
|
52
|
-
var _useDrop = useDrop({
|
|
53
|
-
accept: "child",
|
|
54
|
-
hover: function hover(item, monitor) {
|
|
55
|
-
//拖拽目标的Index
|
|
56
|
-
var dragIndex = item.index;
|
|
57
|
-
//放置目标Index
|
|
58
|
-
var hoverIndex = index;
|
|
59
|
-
// 如果拖拽目标和放置目标相同的话,停止执行
|
|
60
|
-
if (dragIndex === hoverIndex) {
|
|
61
|
-
return;
|
|
62
|
-
}
|
|
63
|
-
//如果不做以下处理,则卡片移动到另一个卡片上就会进行交换,下方处理使得卡片能够在跨过中心线后进行交换.
|
|
64
|
-
//获取卡片的边框矩形
|
|
65
|
-
// const hoverBoundingRect = dragRef.current.getBoundingClientRect();
|
|
66
|
-
// //获取X轴中点
|
|
67
|
-
// const hoverMiddleY =
|
|
68
|
-
// (hoverBoundingRect.bottom - hoverBoundingRect.top) / 2;
|
|
69
|
-
// //获取拖拽目标偏移量
|
|
70
|
-
// const clientOffset = monitor.getClientOffset();
|
|
71
|
-
// const hoverClientY = clientOffset.y - hoverBoundingRect.top;
|
|
72
|
-
// 从上往下放置
|
|
73
|
-
// if (dragIndex < hoverIndex && hoverClientY < hoverMiddleY) {
|
|
74
|
-
// return;
|
|
75
|
-
// }
|
|
76
|
-
// // 从下往上放置
|
|
77
|
-
// if (dragIndex > hoverIndex && hoverClientY > hoverMiddleY) {
|
|
78
|
-
// return;
|
|
79
|
-
// }
|
|
80
|
-
moveList(dragIndex, hoverIndex); //调用方法完成交换
|
|
81
|
-
item.index = hoverIndex; //重新赋值index,否则会出现无限交换情况
|
|
82
|
-
},
|
|
83
|
-
collect: function collect(monitor) {
|
|
84
|
-
var _ref2 = monitor.getItem() || {},
|
|
85
|
-
dragIndex = _ref2.index;
|
|
86
|
-
if (dragIndex === index) {
|
|
87
|
-
return {};
|
|
88
|
-
}
|
|
89
|
-
return {
|
|
90
|
-
isOver: monitor.isOver(),
|
|
91
|
-
dropClassName: dragIndex < index ? "drop-over-downward" : "drop-over-upward"
|
|
92
|
-
};
|
|
93
|
-
}
|
|
94
|
-
// drop: (item) => {
|
|
95
|
-
// moveList(item.index, index);
|
|
96
|
-
// },
|
|
97
|
-
}),
|
|
98
|
-
_useDrop2 = _slicedToArray(_useDrop, 2),
|
|
99
|
-
_useDrop2$ = _useDrop2[0],
|
|
100
|
-
isOver = _useDrop2$.isOver,
|
|
101
|
-
dropClassName = _useDrop2$.dropClassName,
|
|
102
|
-
drop = _useDrop2[1];
|
|
103
|
-
var handleDeleted = function handleDeleted(labelValue) {
|
|
104
|
-
handleDelete(labelValue);
|
|
105
|
-
};
|
|
106
|
-
var renderTable = function renderTable(labelValue) {
|
|
107
|
-
return /*#__PURE__*/React.createElement("div", null, renderColumns.map(function (item, index) {
|
|
108
|
-
return /*#__PURE__*/React.createElement("span", {
|
|
109
|
-
style: {
|
|
110
|
-
marginRight: "8px"
|
|
111
|
-
},
|
|
112
|
-
key: index
|
|
113
|
-
}, render(labelValue[item]));
|
|
114
|
-
}));
|
|
115
|
-
};
|
|
116
|
-
var dragProps = dragList && !disabled ? {
|
|
117
|
-
ref: drag(drop(dragRef)),
|
|
118
|
-
style: {
|
|
119
|
-
cursor: "move"
|
|
120
|
-
}
|
|
121
|
-
} : {};
|
|
122
|
-
var listLockSortContent = /*#__PURE__*/React.createElement("div", {
|
|
123
|
-
className: "cw-transfer-right-content-item"
|
|
124
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
125
|
-
className: "cw-transfer-right-content-item-drag-wrapper"
|
|
126
|
-
}, disabled ? /*#__PURE__*/React.createElement(LockSvg, null) : /*#__PURE__*/React.createElement(_Tooltip, {
|
|
127
|
-
title: localeObj["dragAndDrop"]
|
|
128
|
-
}, /*#__PURE__*/React.createElement(DragSvg, null))), /*#__PURE__*/React.createElement("div", {
|
|
129
|
-
className: "cw-transfer-right-content-item-text-wrapper"
|
|
130
|
-
}, render(value)), !disabled && /*#__PURE__*/React.createElement(_Icon, {
|
|
131
|
-
type: "close",
|
|
132
|
-
className: "cw-transfer-right-content-del",
|
|
133
|
-
onClick: function onClick() {
|
|
134
|
-
return handleDeleted(labelValue);
|
|
135
|
-
}
|
|
136
|
-
}));
|
|
137
|
-
var renderItemContent = type == "list" && isLockSort ? listLockSortContent : /*#__PURE__*/React.createElement(Fragment, null, dragList && /*#__PURE__*/React.createElement(_Tooltip, {
|
|
138
|
-
title: localeObj["dragAndDrop"]
|
|
139
|
-
}, /*#__PURE__*/React.createElement(DragSvg, {
|
|
140
|
-
className: "cw-transfer-right-content-drag"
|
|
141
|
-
})), /*#__PURE__*/React.createElement("div", null, type === "table" ? renderTable(labelValue) : render(value)), /*#__PURE__*/React.createElement(_Icon, {
|
|
142
|
-
type: "close",
|
|
143
|
-
className: "cw-transfer-right-content-del",
|
|
144
|
-
onClick: function onClick() {
|
|
145
|
-
return handleDeleted(labelValue);
|
|
146
|
-
}
|
|
147
|
-
}));
|
|
148
|
-
return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("div", _extends({
|
|
149
|
-
className: classnames("cw-transfer-right-content-main")
|
|
150
|
-
}, dragProps), renderItemContent));
|
|
151
|
-
};
|
|
152
|
-
export default TopicList;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
@select-prefix-cls: ~'@{ant-prefix}-select';
|
|
2
|
-
@select-tree-prefix-cls: ~'@{ant-prefix}-select-tree';
|
|
3
|
-
|
|
4
|
-
.@{select-prefix-cls}-tree-dropdown {
|
|
5
|
-
.@{select-prefix-cls}-dropdown-search {
|
|
6
|
-
.@{select-prefix-cls}-search__field{
|
|
7
|
-
background: transparent;
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
}
|
package/lib/Tree/TreeSelect.less
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
@select-prefix-cls: ~'@{ant-prefix}-select';
|
|
2
|
-
@select-tree-prefix-cls: ~'@{ant-prefix}-select-tree';
|
|
3
|
-
|
|
4
|
-
.@{select-prefix-cls}-tree-dropdown {
|
|
5
|
-
.@{select-prefix-cls}-dropdown-search {
|
|
6
|
-
.@{select-prefix-cls}-search__field{
|
|
7
|
-
background: transparent;
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
}
|