bk-magic-vue 2.5.9-beta.6 → 2.5.9-beta.7

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.
@@ -57646,17 +57646,23 @@
57646
57646
  },
57647
57647
  recursiveList: function recursiveList(arr, valueList, type) {
57648
57648
  var _this7 = this;
57649
+ var path = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [];
57649
57650
  arr.forEach(function (arrItem) {
57650
57651
  if (type === 'init') {
57651
57652
  _this7.$set(arrItem, 'isSelected', false);
57652
57653
  _this7.$set(arrItem, 'isIndeterminate', false);
57653
57654
  }
57655
+ var newPath = path.concat(arrItem.id);
57654
57656
  valueList.forEach(function (item) {
57655
57657
  if (isArray$1(item)) {
57656
- if (item[item.length - 1] === arrItem.id) {
57658
+ if (item.length === newPath.length && item.every(function (child, index) {
57659
+ return child === newPath[index];
57660
+ })) {
57657
57661
  arrItem.isSelected = true;
57658
57662
  }
57659
- if (!_this7.checkAnyLevel) {
57663
+ if (!_this7.checkAnyLevel && item.length > newPath.length && item.slice(0, newPath.length).every(function (child, index) {
57664
+ return child === newPath[index];
57665
+ })) {
57660
57666
  item.forEach(function (child) {
57661
57667
  if (child === arrItem.id) {
57662
57668
  arrItem.isIndeterminate = true;
@@ -57666,7 +57672,7 @@
57666
57672
  }
57667
57673
  });
57668
57674
  if (arrItem.children && arrItem.children.length) {
57669
- _this7.recursiveList(arrItem.children, valueList, type);
57675
+ _this7.recursiveList(arrItem.children, valueList, type, newPath);
57670
57676
  }
57671
57677
  });
57672
57678
  },