@deepinnet-components/pc 0.0.19 → 0.0.21
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.
|
@@ -44,7 +44,7 @@ function loopKeys() {
|
|
|
44
44
|
if (index >= 2) return;
|
|
45
45
|
list.forEach(function (item) {
|
|
46
46
|
var _item$children;
|
|
47
|
-
arr.push(item.
|
|
47
|
+
arr.push(item.key);
|
|
48
48
|
if ((_item$children = item.children) !== null && _item$children !== void 0 && _item$children.length) {
|
|
49
49
|
loopKeys(item.children, arr, index + 1);
|
|
50
50
|
}
|
|
@@ -56,20 +56,23 @@ function loopList() {
|
|
|
56
56
|
if (index >= 2) return;
|
|
57
57
|
list.forEach(function (item) {
|
|
58
58
|
var _item$children2, _item$children3, _item$members;
|
|
59
|
+
item.key = item.id;
|
|
59
60
|
var listChildren = [];
|
|
60
61
|
if ((_item$children2 = item.children) !== null && _item$children2 !== void 0 && _item$children2.length) {
|
|
61
62
|
loopList(item.children, index + 1);
|
|
62
63
|
}
|
|
63
64
|
(_item$children3 = item.children) === null || _item$children3 === void 0 || _item$children3.forEach(function (cItem) {
|
|
64
65
|
listChildren.push(_objectSpread(_objectSpread({}, cItem), {}, {
|
|
65
|
-
showType: 1
|
|
66
|
+
showType: 1,
|
|
67
|
+
key: "org_".concat(cItem.id)
|
|
66
68
|
}));
|
|
67
69
|
});
|
|
68
70
|
(_item$members = item.members) === null || _item$members === void 0 || _item$members.forEach(function (cItem) {
|
|
69
71
|
listChildren.push(_objectSpread(_objectSpread({}, cItem), {}, {
|
|
70
72
|
showType: 2,
|
|
71
73
|
path: item.path,
|
|
72
|
-
departmentId: item.id
|
|
74
|
+
departmentId: item.id,
|
|
75
|
+
key: "member_".concat(cItem.id)
|
|
73
76
|
}));
|
|
74
77
|
});
|
|
75
78
|
item.listChildren = listChildren;
|
|
@@ -451,7 +454,7 @@ var OrgList = function OrgList() {
|
|
|
451
454
|
actionRef: tableRef,
|
|
452
455
|
columns: columns,
|
|
453
456
|
dataSource: orgList,
|
|
454
|
-
rowKey: "
|
|
457
|
+
rowKey: "key",
|
|
455
458
|
scroll: {
|
|
456
459
|
x: 1200
|
|
457
460
|
},
|
|
@@ -462,10 +465,10 @@ var OrgList = function OrgList() {
|
|
|
462
465
|
expandedRowKeys: expandedRowKeys,
|
|
463
466
|
onExpand: function onExpand(flag, row) {
|
|
464
467
|
if (flag) {
|
|
465
|
-
setExpandedRowKeys([].concat(_toConsumableArray(expandedRowKeys), [row.
|
|
468
|
+
setExpandedRowKeys([].concat(_toConsumableArray(expandedRowKeys), [row.key]));
|
|
466
469
|
} else {
|
|
467
470
|
setExpandedRowKeys(_toConsumableArray(expandedRowKeys).filter(function (item) {
|
|
468
|
-
return item !== row.
|
|
471
|
+
return item !== row.key;
|
|
469
472
|
}));
|
|
470
473
|
}
|
|
471
474
|
},
|