bk-magic-vue 2.4.12-beta.4 → 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.
@@ -7953,7 +7953,6 @@ span.bk-date-picker-cells-cell-disabled.bk-date-picker-cells-cell-selected em{
7953
7953
  .tippy-backdrop+.tippy-content{
7954
7954
  -webkit-transition-property:opacity;
7955
7955
  transition-property:opacity;
7956
- will-change:opacity
7957
7956
  }
7958
7957
  .tippy-backdrop+.tippy-content[data-state=visible]{
7959
7958
  opacity:1
@@ -11896,6 +11895,11 @@ th.bk-table-column-selection .cell, th.bk-table-column-expand .cell, td.bk-table
11896
11895
  background-color:#eef6fe;
11897
11896
  color:#3a84ff;
11898
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
+ }
11899
11903
  .bk-transfer .source-list .content li .content-text, .bk-transfer .target-list .content li .content-text{
11900
11904
  -webkit-box-flex:1;
11901
11905
  -ms-flex:1;
@@ -29619,10 +29619,7 @@
29619
29619
  type: String,
29620
29620
  default: 'normal'
29621
29621
  },
29622
- precision: {
29623
- type: Number,
29624
- default: 0
29625
- },
29622
+ precision: Number,
29626
29623
  passwordIcon: {
29627
29624
  type: Array,
29628
29625
  default: function _default() {
@@ -29677,9 +29674,12 @@
29677
29674
  inputRightPadding: '10px',
29678
29675
  iconAreaSizeObserver: null,
29679
29676
  validKeyCodeList: [48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
29677
+ 96, 97, 98, 99, 100, 101, 102, 103, 104, 105,
29680
29678
  8,
29681
29679
  189,
29680
+ 109,
29682
29681
  190,
29682
+ 110,
29683
29683
  38, 40, 37, 39,
29684
29684
  46,
29685
29685
  9
@@ -29849,7 +29849,8 @@
29849
29849
  }
29850
29850
  return outputAttr;
29851
29851
  },
29852
- handleToFixed: function handleToFixed(defaultNumber, len) {
29852
+ handleToFixed: function handleToFixed(defaultNumber, length) {
29853
+ var len = _parseInt$2(length, 10);
29853
29854
  var number = Number(defaultNumber);
29854
29855
  if (isNaN(number) || number >= Math.pow(10, 21)) {
29855
29856
  return number.toString();
@@ -29950,11 +29951,6 @@
29950
29951
  return false;
29951
29952
  }
29952
29953
  if (keyCode === 190) {
29953
- if (this.precision === 0) {
29954
- event.stopPropagation();
29955
- event.preventDefault();
29956
- return false;
29957
- }
29958
29954
  if (String(value).trim()) {
29959
29955
  if (value.indexOf('.') >= 0) {
29960
29956
  event.stopPropagation();
@@ -32827,6 +32823,10 @@
32827
32823
  readonly: Boolean,
32828
32824
  loading: Boolean,
32829
32825
  searchable: Boolean,
32826
+ searchableMinCount: {
32827
+ type: Number,
32828
+ default: 0
32829
+ },
32830
32830
  searchIgnoreCase: {
32831
32831
  type: Boolean,
32832
32832
  default: true
@@ -33025,6 +33025,9 @@
33025
33025
  icon: 'circle-2-1',
33026
33026
  placement: 'right'
33027
33027
  }, this.scrollLoading);
33028
+ },
33029
+ showSearch: function showSearch() {
33030
+ return this.searchable && this.options.length >= this.searchableMinCount;
33028
33031
  }
33029
33032
  },
33030
33033
  watch: {
@@ -33201,7 +33204,7 @@
33201
33204
  var popover = this.getPopoverInstance();
33202
33205
  popover.set({
33203
33206
  onShown: function onShown() {
33204
- if (_this6.searchable) {
33207
+ if (_this6.showSearch) {
33205
33208
  _this6.$refs.searchInput.focus();
33206
33209
  }
33207
33210
  }
@@ -33571,7 +33574,7 @@
33571
33574
  "slot": "content"
33572
33575
  },
33573
33576
  slot: "content"
33574
- }, [_vm.searchable ? _c('div', {
33577
+ }, [_vm.showSearch ? _c('div', {
33575
33578
  staticClass: "bk-select-search-wrapper"
33576
33579
  }, [_c('i', {
33577
33580
  staticClass: "left-icon bk-icon icon-search"
@@ -33689,7 +33692,7 @@
33689
33692
  }, [_c('bk-spin', _vm._b({}, 'bk-spin', _vm.scrollEndLoading, false), [_vm._v(_vm._s(_vm.scrollEndLoading.text))])], 1) : _vm._e()], 2)]), _vm.showEmpty ? [!_vm.options.length ? _c('div', {
33690
33693
  staticClass: "bk-select-empty",
33691
33694
  class: _vm.fontSizeCls
33692
- }, [_vm._v("\n " + _vm._s(_vm.emptyText || _vm.t('bk.select.dataEmpty')) + "\n ")]) : _vm.searchable && _vm.unmatchedCount === _vm.options.length ? _c('div', {
33695
+ }, [_vm._v("\n " + _vm._s(_vm.emptyText || _vm.t('bk.select.dataEmpty')) + "\n ")]) : _vm.showSearch && _vm.unmatchedCount === _vm.options.length ? _c('div', {
33693
33696
  staticClass: "bk-select-empty",
33694
33697
  class: _vm.fontSizeCls
33695
33698
  }, [_vm._v("\n " + _vm._s(_vm.emptyText || _vm.t('bk.select.searchEmpty')) + "\n ")]) : _vm._e()] : _vm._e(), _vm.$slots.extension ? _c('div', {
@@ -36838,6 +36841,15 @@
36838
36841
  this.firstValue = val;
36839
36842
  }
36840
36843
  },
36844
+ firstChange: function firstChange(v) {
36845
+ if (v === '') {
36846
+ return;
36847
+ }
36848
+ this.firstInput = _parseFloat$2(v);
36849
+ if (this.firstInput >= this.minValue && this.firstInput <= this.maxValue) {
36850
+ this.firstValue = _parseFloat$2(v);
36851
+ }
36852
+ },
36841
36853
  secondInputChange: function secondInputChange(v) {
36842
36854
  if (v === '') {
36843
36855
  return;
@@ -36853,6 +36865,15 @@
36853
36865
  this.secondValue = val;
36854
36866
  }
36855
36867
  },
36868
+ secondChange: function secondChange(v) {
36869
+ if (v === '') {
36870
+ return;
36871
+ }
36872
+ this.secondInput = _parseFloat$2(v);
36873
+ if (this.secondInput >= this.minValue && this.secondInput <= this.maxValue) {
36874
+ this.secondValue = _parseFloat$2(v);
36875
+ }
36876
+ },
36856
36877
  on: function on(element, event, handler) {
36857
36878
  if (element && event && handler) {
36858
36879
  element.addEventListener(event, handler, false);
@@ -36976,7 +36997,7 @@
36976
36997
  "min": _vm.minValue
36977
36998
  },
36978
36999
  on: {
36979
- "change": _vm.firstInputChange,
37000
+ "change": _vm.firstChange,
36980
37001
  "enter": _vm.firstInputChange,
36981
37002
  "blur": _vm.firstInputChange
36982
37003
  },
@@ -37001,7 +37022,7 @@
37001
37022
  "min": _vm.minValue
37002
37023
  },
37003
37024
  on: {
37004
- "change": _vm.secondInputChange,
37025
+ "change": _vm.secondChange,
37005
37026
  "enter": _vm.secondInputChange,
37006
37027
  "blur": _vm.secondInputChange
37007
37028
  },
@@ -45499,7 +45520,7 @@
45499
45520
  sortDataList: function sortDataList(list, key, sortList) {
45500
45521
  var arr = sortList;
45501
45522
  return list.sort(function (a, b) {
45502
- return arr.indexOf(a[key]) - arr.indexOf(b[key]) >= 0;
45523
+ return arr.indexOf(a[key]) - arr.indexOf(b[key]);
45503
45524
  });
45504
45525
  },
45505
45526
  removeFromDataList: function removeFromDataList(removeItem) {
@@ -45514,6 +45535,7 @@
45514
45535
  var displayDataList = this.displayDataList;
45515
45536
  var hasSelectedList = this.hasSelectedList;
45516
45537
  displayDataList.forEach(function (transferItem) {
45538
+ if (transferItem.disabled) return;
45517
45539
  hasSelectedList.push(transferItem);
45518
45540
  _this6.removeFromDataList(transferItem);
45519
45541
  });
@@ -45531,10 +45553,13 @@
45531
45553
  },
45532
45554
  allToLeft: function allToLeft() {
45533
45555
  this.rightHoverIndex = -1;
45534
- var hasSelectedList = this.hasSelectedList;
45556
+ var hasSelectedList = this.hasSelectedList.filter(function (i) {
45557
+ return !i.disabled;
45558
+ });
45535
45559
  var dataList = this.dataList;
45536
45560
  while (hasSelectedList.length) {
45537
45561
  var transferItem = hasSelectedList.shift();
45562
+ this.hasSelectedList.splice(this.hasSelectedList.indexOf(transferItem), 1);
45538
45563
  dataList.push(transferItem);
45539
45564
  if (this.sortList.length === this.sourceList.length) {
45540
45565
  this.dataList = _toConsumableArray(this.sortDataList(dataList, this.sortCode, this.sortList));
@@ -45549,7 +45574,8 @@
45549
45574
  this.$emit('change', this.dataList, this.hasSelectedList, list);
45550
45575
  }
45551
45576
  },
45552
- leftClick: function leftClick(index) {
45577
+ leftClick: function leftClick(index, item) {
45578
+ if (item.disabled) return;
45553
45579
  this.leftHoverIndex = -1;
45554
45580
  var transferItem = this.displayDataList[index];
45555
45581
  var hasSelectedList = this.hasSelectedList;
@@ -45567,7 +45593,8 @@
45567
45593
  this.$emit('change', this.dataList, this.hasSelectedList, list);
45568
45594
  }
45569
45595
  },
45570
- rightClick: function rightClick(index) {
45596
+ rightClick: function rightClick(index, item) {
45597
+ if (item.disabled) return;
45571
45598
  this.rightHoverIndex = -1;
45572
45599
  var transferItem = this.hasSelectedList.splice(index, 1)[0];
45573
45600
  var dataList = this.dataList;
@@ -45649,12 +45676,13 @@
45649
45676
  }, _vm._l(_vm.displayDataList, function (item, index) {
45650
45677
  return _c('li', {
45651
45678
  key: index,
45679
+ class: [item.disabled ? 'is-disabled' : ''],
45652
45680
  on: {
45653
45681
  "click": function click($event) {
45654
45682
  $event.stopPropagation();
45655
45683
  $event.preventDefault();
45656
45684
 
45657
- _vm.leftClick(index);
45685
+ _vm.leftClick(index, item);
45658
45686
  },
45659
45687
  "mouseover": function mouseover($event) {
45660
45688
  $event.stopPropagation();
@@ -45680,12 +45708,12 @@
45680
45708
  attrs: {
45681
45709
  "title": item[_vm.displayCode]
45682
45710
  }
45683
- }, [_vm._v(_vm._s(item[_vm.displayCode]))]), _c('span', {
45711
+ }, [_vm._v(_vm._s(item[_vm.displayCode]))]), !item.disabled ? _c('span', {
45684
45712
  staticClass: "icon-wrapper",
45685
45713
  class: [index === _vm.leftHoverIndex ? 'hover' : '']
45686
45714
  }, [_c('i', {
45687
45715
  staticClass: "bk-icon icon-arrows-right"
45688
- })])], null, item)], 2);
45716
+ })]) : _vm._e()], null, item)], 2);
45689
45717
  }), 0)] : [_vm.slot['left-empty-content'] ? _c('div', [_vm._t("left-empty-content")], 2) : _c('div', {
45690
45718
  staticClass: "empty"
45691
45719
  }, [_vm._v("\n " + _vm._s(_vm.emptyContent[0] ? _vm.emptyContent[0] : _vm.t('bk.transfer.emptyContent')) + "\n ")])]], 2), _c('div', {
@@ -45711,12 +45739,13 @@
45711
45739
  }, _vm._l(_vm.hasSelectedList, function (item, index) {
45712
45740
  return _c('li', {
45713
45741
  key: index,
45742
+ class: [item.disabled ? 'is-disabled' : ''],
45714
45743
  on: {
45715
45744
  "click": function click($event) {
45716
45745
  $event.stopPropagation();
45717
45746
  $event.preventDefault();
45718
45747
 
45719
- _vm.rightClick(index);
45748
+ _vm.rightClick(index, item);
45720
45749
  },
45721
45750
  "mouseover": function mouseover($event) {
45722
45751
  $event.stopPropagation();
@@ -45742,12 +45771,12 @@
45742
45771
  attrs: {
45743
45772
  "title": item[_vm.displayCode]
45744
45773
  }
45745
- }, [_vm._v(_vm._s(item[_vm.displayCode]))]), _c('span', {
45774
+ }, [_vm._v(_vm._s(item[_vm.displayCode]))]), !item.disabled ? _c('span', {
45746
45775
  staticClass: "icon-wrapper",
45747
45776
  class: [index === _vm.rightHoverIndex ? 'hover' : '']
45748
45777
  }, [_c('i', {
45749
45778
  staticClass: "bk-icon icon-close"
45750
- })])], null, item)], 2);
45779
+ })]) : _vm._e()], null, item)], 2);
45751
45780
  }), 0)] : [_vm.slot['right-empty-content'] ? _c('div', [_vm._t("right-empty-content")], 2) : _c('div', {
45752
45781
  staticClass: "empty"
45753
45782
  }, [_vm._v("\n " + _vm._s(_vm.emptyContent[1] ? _vm.emptyContent[1] : _vm.t('bk.transfer.emptySelected')) + "\n ")])]], 2)]);
@@ -49995,6 +50024,10 @@
49995
50024
  type: String,
49996
50025
  default: ''
49997
50026
  },
50027
+ inputUnfocusClear: {
50028
+ type: Boolean,
50029
+ default: false
50030
+ },
49998
50031
  extCls: {
49999
50032
  type: String,
50000
50033
  default: ''
@@ -50367,8 +50400,19 @@
50367
50400
  if (unFocus) {
50368
50401
  this.hidePopper();
50369
50402
  this.input.focus = false;
50403
+ this.inputUnfocusClear && this.inputOutSideClear();
50404
+ this.$emit('input-click-outside', e);
50370
50405
  }
50371
- this.$emit('input-click-outside', e);
50406
+ },
50407
+ inputOutSideClear: function inputOutSideClear() {
50408
+ this.input.value = '';
50409
+ this.menu.active = -1;
50410
+ this.menu.id = null;
50411
+ this.updateInput();
50412
+ this.clearInput();
50413
+ this.menu.checked = {};
50414
+ this.menuChildInstance && (this.menuChildInstance.checked = {});
50415
+ this.menuInstance = null;
50372
50416
  },
50373
50417
  handleCancel: function handleCancel(e) {
50374
50418
  this.handleClearChildSelectChecked();