antd-management-fast-framework 1.12.29 → 1.12.30
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.
|
@@ -1779,12 +1779,10 @@ function buildTreeSelect(_ref22) {
|
|
|
1779
1779
|
});
|
|
1780
1780
|
|
|
1781
1781
|
var listDataSource = (0, _tools.isArray)(listData) ? listData : [];
|
|
1782
|
-
var listDataAdjust =
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
return dataConvert(o);
|
|
1782
|
+
var listDataAdjust = !(0, _tools.isFunction)(dataConvert) ? listDataSource : (0, _tools.transformListData)({
|
|
1783
|
+
list: listDataSource,
|
|
1784
|
+
convert: dataConvert,
|
|
1785
|
+
recursiveKey: 'children'
|
|
1788
1786
|
});
|
|
1789
1787
|
adjustOtherProps.treeData = listDataAdjust;
|
|
1790
1788
|
|
package/es/utils/tools.d.ts
CHANGED
|
@@ -551,6 +551,22 @@ export function evil(fn: any): any;
|
|
|
551
551
|
* @returns
|
|
552
552
|
*/
|
|
553
553
|
export function searchFromList(itemKey: any, itemValue: any, sourceData: any): null;
|
|
554
|
+
/**
|
|
555
|
+
* 转换列表数据
|
|
556
|
+
*/
|
|
557
|
+
export function transformListData({ list, convert, recursiveKey, }: {
|
|
558
|
+
list?: any[] | undefined;
|
|
559
|
+
convert?: null | undefined;
|
|
560
|
+
recursiveKey?: string | undefined;
|
|
561
|
+
}): any[];
|
|
562
|
+
/**
|
|
563
|
+
* 转换数据
|
|
564
|
+
*/
|
|
565
|
+
export function transformData({ data, convert, recursiveKey, }: {
|
|
566
|
+
data: any;
|
|
567
|
+
convert?: null | undefined;
|
|
568
|
+
recursiveKey?: string | undefined;
|
|
569
|
+
}): any;
|
|
554
570
|
/**
|
|
555
571
|
* 构建描述文本
|
|
556
572
|
* @param {*} v
|
package/es/utils/tools.js
CHANGED
|
@@ -129,6 +129,8 @@ exports.toMoney = toMoney;
|
|
|
129
129
|
exports.toNumber = toNumber;
|
|
130
130
|
exports.toPercentage = toPercentage;
|
|
131
131
|
exports.toString = toString;
|
|
132
|
+
exports.transformData = transformData;
|
|
133
|
+
exports.transformListData = transformListData;
|
|
132
134
|
exports.trim = trim;
|
|
133
135
|
exports.trySendNearestLocalhostNotify = trySendNearestLocalhostNotify;
|
|
134
136
|
|
|
@@ -1583,6 +1585,61 @@ function searchFromList(itemKey, itemValue, sourceData) {
|
|
|
1583
1585
|
});
|
|
1584
1586
|
return result;
|
|
1585
1587
|
}
|
|
1588
|
+
/**
|
|
1589
|
+
* 转换列表数据
|
|
1590
|
+
*/
|
|
1591
|
+
|
|
1592
|
+
|
|
1593
|
+
function transformListData(_ref20) {
|
|
1594
|
+
var _ref20$list = _ref20.list,
|
|
1595
|
+
list = _ref20$list === void 0 ? [] : _ref20$list,
|
|
1596
|
+
_ref20$convert = _ref20.convert,
|
|
1597
|
+
convert = _ref20$convert === void 0 ? null : _ref20$convert,
|
|
1598
|
+
_ref20$recursiveKey = _ref20.recursiveKey,
|
|
1599
|
+
recursiveKey = _ref20$recursiveKey === void 0 ? 'children' : _ref20$recursiveKey;
|
|
1600
|
+
var listData = isArray(list) ? list : [list];
|
|
1601
|
+
var l = listData.map(function (one) {
|
|
1602
|
+
return transformData({
|
|
1603
|
+
data: one,
|
|
1604
|
+
convert: convert,
|
|
1605
|
+
target: recursiveKey
|
|
1606
|
+
});
|
|
1607
|
+
});
|
|
1608
|
+
return l;
|
|
1609
|
+
}
|
|
1610
|
+
/**
|
|
1611
|
+
* 转换数据
|
|
1612
|
+
*/
|
|
1613
|
+
|
|
1614
|
+
|
|
1615
|
+
function transformData(_ref21) {
|
|
1616
|
+
var data = _ref21.data,
|
|
1617
|
+
_ref21$convert = _ref21.convert,
|
|
1618
|
+
convert = _ref21$convert === void 0 ? null : _ref21$convert,
|
|
1619
|
+
_ref21$recursiveKey = _ref21.recursiveKey,
|
|
1620
|
+
recursiveKey = _ref21$recursiveKey === void 0 ? 'children' : _ref21$recursiveKey;
|
|
1621
|
+
|
|
1622
|
+
if (!isFunction(convert)) {
|
|
1623
|
+
return data;
|
|
1624
|
+
}
|
|
1625
|
+
|
|
1626
|
+
var d = convert(data);
|
|
1627
|
+
var children = data[recursiveKey];
|
|
1628
|
+
var listData = [];
|
|
1629
|
+
|
|
1630
|
+
if (isArray(children)) {
|
|
1631
|
+
listData = children.map(function (one) {
|
|
1632
|
+
return transformData({
|
|
1633
|
+
data: one,
|
|
1634
|
+
convert: convert,
|
|
1635
|
+
target: recursiveKey
|
|
1636
|
+
});
|
|
1637
|
+
});
|
|
1638
|
+
}
|
|
1639
|
+
|
|
1640
|
+
d[recursiveKey] = listData;
|
|
1641
|
+
return d;
|
|
1642
|
+
}
|
|
1586
1643
|
/**
|
|
1587
1644
|
* 构建描述文本
|
|
1588
1645
|
* @param {*} v
|
|
@@ -2128,8 +2185,8 @@ function removeNearestLocalhostNotifyCache() {
|
|
|
2128
2185
|
*/
|
|
2129
2186
|
|
|
2130
2187
|
|
|
2131
|
-
function trySendNearestLocalhostNotify(
|
|
2132
|
-
var text =
|
|
2188
|
+
function trySendNearestLocalhostNotify(_ref22) {
|
|
2189
|
+
var text = _ref22.text;
|
|
2133
2190
|
var needSend = false;
|
|
2134
2191
|
var nearestTime = 0;
|
|
2135
2192
|
|
|
@@ -2207,11 +2264,11 @@ function notifyInfo(text) {
|
|
|
2207
2264
|
*/
|
|
2208
2265
|
|
|
2209
2266
|
|
|
2210
|
-
function notify(
|
|
2211
|
-
var type =
|
|
2212
|
-
placementValue =
|
|
2213
|
-
messageValue =
|
|
2214
|
-
descriptionValue =
|
|
2267
|
+
function notify(_ref23) {
|
|
2268
|
+
var type = _ref23.type,
|
|
2269
|
+
placementValue = _ref23.placement,
|
|
2270
|
+
messageValue = _ref23.message,
|
|
2271
|
+
descriptionValue = _ref23.description;
|
|
2215
2272
|
|
|
2216
2273
|
var _placement$message$de = _objectSpread(_objectSpread({}, {
|
|
2217
2274
|
placement: 'bottomRight',
|
|
@@ -2285,10 +2342,10 @@ function notify(_ref21) {
|
|
|
2285
2342
|
}, 600);
|
|
2286
2343
|
}
|
|
2287
2344
|
|
|
2288
|
-
function checkFromConfig(
|
|
2289
|
-
var label =
|
|
2290
|
-
name =
|
|
2291
|
-
helper =
|
|
2345
|
+
function checkFromConfig(_ref24) {
|
|
2346
|
+
var label = _ref24.label,
|
|
2347
|
+
name = _ref24.name,
|
|
2348
|
+
helper = _ref24.helper;
|
|
2292
2349
|
var labelText = 'object';
|
|
2293
2350
|
var nameText = 'object';
|
|
2294
2351
|
var helperText = 'object';
|
|
@@ -2347,13 +2404,13 @@ var requestAnimFrame = requestAnimFrameCustom;
|
|
|
2347
2404
|
|
|
2348
2405
|
exports.requestAnimFrame = requestAnimFrame;
|
|
2349
2406
|
|
|
2350
|
-
function sortCollectionByKey(
|
|
2351
|
-
var operate =
|
|
2352
|
-
item =
|
|
2353
|
-
list =
|
|
2354
|
-
sortKey =
|
|
2355
|
-
|
|
2356
|
-
sortMin =
|
|
2407
|
+
function sortCollectionByKey(_ref25) {
|
|
2408
|
+
var operate = _ref25.operate,
|
|
2409
|
+
item = _ref25.item,
|
|
2410
|
+
list = _ref25.list,
|
|
2411
|
+
sortKey = _ref25.sortKey,
|
|
2412
|
+
_ref25$sortMin = _ref25.sortMin,
|
|
2413
|
+
sortMin = _ref25$sortMin === void 0 ? 0 : _ref25$sortMin;
|
|
2357
2414
|
|
|
2358
2415
|
if ((item || null) == null) {
|
|
2359
2416
|
return list;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "antd-management-fast-framework",
|
|
3
|
-
"version": "1.12.
|
|
3
|
+
"version": "1.12.30",
|
|
4
4
|
"description": "antd-management-fast-framework",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"antd-management-fast-framework"
|
|
@@ -170,5 +170,5 @@
|
|
|
170
170
|
"bugs": {
|
|
171
171
|
"url": "https://github.com/kityandhero/antd-management-fast-framework/issues"
|
|
172
172
|
},
|
|
173
|
-
"gitHead": "
|
|
173
|
+
"gitHead": "35c34d5acf1ddedd21ba0f777af0acf1181948c1"
|
|
174
174
|
}
|