tools-min-ns 1.8.0 → 1.8.1

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/README.md CHANGED
@@ -5,6 +5,10 @@ cnpm i tools-min-ns --save
5
5
  ```
6
6
 
7
7
  # updates
8
+ ## v1.8.1
9
+
10
+ > TreeUtil 修复getItemPathByTree
11
+
8
12
  ## v1.8.0
9
13
 
10
14
  > TreeUtil 新增getItemPathByTree
@@ -207,12 +207,12 @@ var TreeUtil;
207
207
  });
208
208
  var list = getListByTree(tree, children);
209
209
  var getList = function getList(importOid) {
210
- forEachTree(tree, function (info) {
210
+ forEachTree(tree, function (info, _parent) {
211
211
  if (String(info[value]) === String(importOid)) {
212
212
  if (parent in info && info[parent] && list.some(function (e) {
213
213
  return String(e[value]) === String(info[parent]);
214
214
  })) {
215
- idList.unshift(info);
215
+ idList.unshift(_parent);
216
216
  getList(info === null || info === void 0 ? void 0 : info[parent]);
217
217
  }
218
218
  }
@@ -217,12 +217,12 @@ var TreeUtil;
217
217
  });
218
218
  var list = getListByTree(tree, children);
219
219
  var getList = function getList(importOid) {
220
- forEachTree(tree, function (info) {
220
+ forEachTree(tree, function (info, _parent) {
221
221
  if (String(info[value]) === String(importOid)) {
222
222
  if (parent in info && info[parent] && list.some(function (e) {
223
223
  return String(e[value]) === String(info[parent]);
224
224
  })) {
225
- idList.unshift(info);
225
+ idList.unshift(_parent);
226
226
  getList(info === null || info === void 0 ? void 0 : info[parent]);
227
227
  }
228
228
  }
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "tools-min-ns",
3
3
  "description": "工具包适用于前端以及node",
4
- "version": "1.8.0",
4
+ "version": "1.8.1",
5
5
  "main": "lib/index.js",
6
6
  "license": "MIT",
7
7
  "author": "nanshen",
8
8
  "module": "esm/index.js",
9
9
  "repository": {
10
10
  "type": "git",
11
- "url": "https://github.com"
11
+ "url": "https://registry.npmjs.org/"
12
12
  },
13
13
  "files": [
14
14
  "esm",