@deepinnet-components/pc 0.0.18 → 0.0.20

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.
@@ -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: "id",
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.id]));
468
+ setExpandedRowKeys([].concat(_toConsumableArray(expandedRowKeys), [row.key]));
466
469
  } else {
467
470
  setExpandedRowKeys(_toConsumableArray(expandedRowKeys).filter(function (item) {
468
- return item !== row.id;
471
+ return item !== row.key;
469
472
  }));
470
473
  }
471
474
  },
@@ -82,7 +82,7 @@ var schema = {
82
82
  value: 4,
83
83
  label: '全局数据'
84
84
  }, {
85
- value: 5,
85
+ value: 3,
86
86
  label: '组织数据(全局)'
87
87
  }, {
88
88
  value: 2,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deepinnet-components/pc",
3
- "version": "0.0.18",
3
+ "version": "0.0.20",
4
4
  "description": "A react library developed with dumi",
5
5
  "license": "MIT",
6
6
  "module": "dist/index.js",