bk-magic-vue 2.4.13-beta.1 → 2.4.13-beta.2

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.
@@ -11895,6 +11895,11 @@ th.bk-table-column-selection .cell, th.bk-table-column-expand .cell, td.bk-table
11895
11895
  background-color:#eef6fe;
11896
11896
  color:#3a84ff;
11897
11897
  }
11898
+ .bk-transfer .source-list .content li.is-disabled, .bk-transfer .target-list .content li.is-disabled{
11899
+ cursor:not-allowed;
11900
+ color:#c4c6cc;
11901
+ background-color:#fff;
11902
+ }
11898
11903
  .bk-transfer .source-list .content li .content-text, .bk-transfer .target-list .content li .content-text{
11899
11904
  -webkit-box-flex:1;
11900
11905
  -ms-flex:1;
@@ -45520,7 +45520,7 @@
45520
45520
  sortDataList: function sortDataList(list, key, sortList) {
45521
45521
  var arr = sortList;
45522
45522
  return list.sort(function (a, b) {
45523
- return arr.indexOf(a[key]) - arr.indexOf(b[key]) >= 0;
45523
+ return arr.indexOf(a[key]) - arr.indexOf(b[key]);
45524
45524
  });
45525
45525
  },
45526
45526
  removeFromDataList: function removeFromDataList(removeItem) {
@@ -45535,6 +45535,7 @@
45535
45535
  var displayDataList = this.displayDataList;
45536
45536
  var hasSelectedList = this.hasSelectedList;
45537
45537
  displayDataList.forEach(function (transferItem) {
45538
+ if (transferItem.disabled) return;
45538
45539
  hasSelectedList.push(transferItem);
45539
45540
  _this6.removeFromDataList(transferItem);
45540
45541
  });
@@ -45552,10 +45553,13 @@
45552
45553
  },
45553
45554
  allToLeft: function allToLeft() {
45554
45555
  this.rightHoverIndex = -1;
45555
- var hasSelectedList = this.hasSelectedList;
45556
+ var hasSelectedList = this.hasSelectedList.filter(function (i) {
45557
+ return !i.disabled;
45558
+ });
45556
45559
  var dataList = this.dataList;
45557
45560
  while (hasSelectedList.length) {
45558
45561
  var transferItem = hasSelectedList.shift();
45562
+ this.hasSelectedList.splice(this.hasSelectedList.indexOf(transferItem), 1);
45559
45563
  dataList.push(transferItem);
45560
45564
  if (this.sortList.length === this.sourceList.length) {
45561
45565
  this.dataList = _toConsumableArray(this.sortDataList(dataList, this.sortCode, this.sortList));
@@ -45570,7 +45574,8 @@
45570
45574
  this.$emit('change', this.dataList, this.hasSelectedList, list);
45571
45575
  }
45572
45576
  },
45573
- leftClick: function leftClick(index) {
45577
+ leftClick: function leftClick(index, item) {
45578
+ if (item.disabled) return;
45574
45579
  this.leftHoverIndex = -1;
45575
45580
  var transferItem = this.displayDataList[index];
45576
45581
  var hasSelectedList = this.hasSelectedList;
@@ -45588,7 +45593,8 @@
45588
45593
  this.$emit('change', this.dataList, this.hasSelectedList, list);
45589
45594
  }
45590
45595
  },
45591
- rightClick: function rightClick(index) {
45596
+ rightClick: function rightClick(index, item) {
45597
+ if (item.disabled) return;
45592
45598
  this.rightHoverIndex = -1;
45593
45599
  var transferItem = this.hasSelectedList.splice(index, 1)[0];
45594
45600
  var dataList = this.dataList;
@@ -45670,12 +45676,13 @@
45670
45676
  }, _vm._l(_vm.displayDataList, function (item, index) {
45671
45677
  return _c('li', {
45672
45678
  key: index,
45679
+ class: [item.disabled ? 'is-disabled' : ''],
45673
45680
  on: {
45674
45681
  "click": function click($event) {
45675
45682
  $event.stopPropagation();
45676
45683
  $event.preventDefault();
45677
45684
 
45678
- _vm.leftClick(index);
45685
+ _vm.leftClick(index, item);
45679
45686
  },
45680
45687
  "mouseover": function mouseover($event) {
45681
45688
  $event.stopPropagation();
@@ -45701,12 +45708,12 @@
45701
45708
  attrs: {
45702
45709
  "title": item[_vm.displayCode]
45703
45710
  }
45704
- }, [_vm._v(_vm._s(item[_vm.displayCode]))]), _c('span', {
45711
+ }, [_vm._v(_vm._s(item[_vm.displayCode]))]), !item.disabled ? _c('span', {
45705
45712
  staticClass: "icon-wrapper",
45706
45713
  class: [index === _vm.leftHoverIndex ? 'hover' : '']
45707
45714
  }, [_c('i', {
45708
45715
  staticClass: "bk-icon icon-arrows-right"
45709
- })])], null, item)], 2);
45716
+ })]) : _vm._e()], null, item)], 2);
45710
45717
  }), 0)] : [_vm.slot['left-empty-content'] ? _c('div', [_vm._t("left-empty-content")], 2) : _c('div', {
45711
45718
  staticClass: "empty"
45712
45719
  }, [_vm._v("\n " + _vm._s(_vm.emptyContent[0] ? _vm.emptyContent[0] : _vm.t('bk.transfer.emptyContent')) + "\n ")])]], 2), _c('div', {
@@ -45732,12 +45739,13 @@
45732
45739
  }, _vm._l(_vm.hasSelectedList, function (item, index) {
45733
45740
  return _c('li', {
45734
45741
  key: index,
45742
+ class: [item.disabled ? 'is-disabled' : ''],
45735
45743
  on: {
45736
45744
  "click": function click($event) {
45737
45745
  $event.stopPropagation();
45738
45746
  $event.preventDefault();
45739
45747
 
45740
- _vm.rightClick(index);
45748
+ _vm.rightClick(index, item);
45741
45749
  },
45742
45750
  "mouseover": function mouseover($event) {
45743
45751
  $event.stopPropagation();
@@ -45763,12 +45771,12 @@
45763
45771
  attrs: {
45764
45772
  "title": item[_vm.displayCode]
45765
45773
  }
45766
- }, [_vm._v(_vm._s(item[_vm.displayCode]))]), _c('span', {
45774
+ }, [_vm._v(_vm._s(item[_vm.displayCode]))]), !item.disabled ? _c('span', {
45767
45775
  staticClass: "icon-wrapper",
45768
45776
  class: [index === _vm.rightHoverIndex ? 'hover' : '']
45769
45777
  }, [_c('i', {
45770
45778
  staticClass: "bk-icon icon-close"
45771
- })])], null, item)], 2);
45779
+ })]) : _vm._e()], null, item)], 2);
45772
45780
  }), 0)] : [_vm.slot['right-empty-content'] ? _c('div', [_vm._t("right-empty-content")], 2) : _c('div', {
45773
45781
  staticClass: "empty"
45774
45782
  }, [_vm._v("\n " + _vm._s(_vm.emptyContent[1] ? _vm.emptyContent[1] : _vm.t('bk.transfer.emptySelected')) + "\n ")])]], 2)]);