bk-magic-vue 2.4.12-beta.2 → 2.4.12

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
@@ -29677,9 +29677,12 @@
29677
29677
  inputRightPadding: '10px',
29678
29678
  iconAreaSizeObserver: null,
29679
29679
  validKeyCodeList: [48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
29680
+ 96, 97, 98, 99, 100, 101, 102, 103, 104, 105,
29680
29681
  8,
29681
29682
  189,
29683
+ 109,
29682
29684
  190,
29685
+ 110,
29683
29686
  38, 40, 37, 39,
29684
29687
  46,
29685
29688
  9
@@ -32827,6 +32830,10 @@
32827
32830
  readonly: Boolean,
32828
32831
  loading: Boolean,
32829
32832
  searchable: Boolean,
32833
+ searchableMinCount: {
32834
+ type: Number,
32835
+ default: 0
32836
+ },
32830
32837
  searchIgnoreCase: {
32831
32838
  type: Boolean,
32832
32839
  default: true
@@ -33025,6 +33032,9 @@
33025
33032
  icon: 'circle-2-1',
33026
33033
  placement: 'right'
33027
33034
  }, this.scrollLoading);
33035
+ },
33036
+ showSearch: function showSearch() {
33037
+ return this.searchable && this.options.length >= this.searchableMinCount;
33028
33038
  }
33029
33039
  },
33030
33040
  watch: {
@@ -33201,7 +33211,7 @@
33201
33211
  var popover = this.getPopoverInstance();
33202
33212
  popover.set({
33203
33213
  onShown: function onShown() {
33204
- if (_this6.searchable) {
33214
+ if (_this6.showSearch) {
33205
33215
  _this6.$refs.searchInput.focus();
33206
33216
  }
33207
33217
  }
@@ -33571,7 +33581,7 @@
33571
33581
  "slot": "content"
33572
33582
  },
33573
33583
  slot: "content"
33574
- }, [_vm.searchable ? _c('div', {
33584
+ }, [_vm.showSearch ? _c('div', {
33575
33585
  staticClass: "bk-select-search-wrapper"
33576
33586
  }, [_c('i', {
33577
33587
  staticClass: "left-icon bk-icon icon-search"
@@ -33689,7 +33699,7 @@
33689
33699
  }, [_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
33700
  staticClass: "bk-select-empty",
33691
33701
  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', {
33702
+ }, [_vm._v("\n " + _vm._s(_vm.emptyText || _vm.t('bk.select.dataEmpty')) + "\n ")]) : _vm.showSearch && _vm.unmatchedCount === _vm.options.length ? _c('div', {
33693
33703
  staticClass: "bk-select-empty",
33694
33704
  class: _vm.fontSizeCls
33695
33705
  }, [_vm._v("\n " + _vm._s(_vm.emptyText || _vm.t('bk.select.searchEmpty')) + "\n ")]) : _vm._e()] : _vm._e(), _vm.$slots.extension ? _c('div', {
@@ -36838,6 +36848,15 @@
36838
36848
  this.firstValue = val;
36839
36849
  }
36840
36850
  },
36851
+ firstChange: function firstChange(v) {
36852
+ if (v === '') {
36853
+ return;
36854
+ }
36855
+ this.firstInput = _parseFloat$2(v);
36856
+ if (this.firstInput >= this.minValue && this.firstInput <= this.maxValue) {
36857
+ this.firstValue = _parseFloat$2(v);
36858
+ }
36859
+ },
36841
36860
  secondInputChange: function secondInputChange(v) {
36842
36861
  if (v === '') {
36843
36862
  return;
@@ -36853,6 +36872,15 @@
36853
36872
  this.secondValue = val;
36854
36873
  }
36855
36874
  },
36875
+ secondChange: function secondChange(v) {
36876
+ if (v === '') {
36877
+ return;
36878
+ }
36879
+ this.secondInput = _parseFloat$2(v);
36880
+ if (this.secondInput >= this.minValue && this.secondInput <= this.maxValue) {
36881
+ this.secondValue = _parseFloat$2(v);
36882
+ }
36883
+ },
36856
36884
  on: function on(element, event, handler) {
36857
36885
  if (element && event && handler) {
36858
36886
  element.addEventListener(event, handler, false);
@@ -36976,7 +37004,7 @@
36976
37004
  "min": _vm.minValue
36977
37005
  },
36978
37006
  on: {
36979
- "change": _vm.firstInputChange,
37007
+ "change": _vm.firstChange,
36980
37008
  "enter": _vm.firstInputChange,
36981
37009
  "blur": _vm.firstInputChange
36982
37010
  },
@@ -37001,7 +37029,7 @@
37001
37029
  "min": _vm.minValue
37002
37030
  },
37003
37031
  on: {
37004
- "change": _vm.secondInputChange,
37032
+ "change": _vm.secondChange,
37005
37033
  "enter": _vm.secondInputChange,
37006
37034
  "blur": _vm.secondInputChange
37007
37035
  },
@@ -41831,7 +41859,12 @@
41831
41859
  type: Boolean,
41832
41860
  default: true
41833
41861
  },
41834
- pagination: Object,
41862
+ pagination: {
41863
+ type: Object,
41864
+ default: function _default() {
41865
+ return {};
41866
+ }
41867
+ },
41835
41868
  showPaginationInfo: {
41836
41869
  type: Boolean,
41837
41870
  default: true
@@ -49990,6 +50023,10 @@
49990
50023
  type: String,
49991
50024
  default: ''
49992
50025
  },
50026
+ inputUnfocusClear: {
50027
+ type: Boolean,
50028
+ default: false
50029
+ },
49993
50030
  extCls: {
49994
50031
  type: String,
49995
50032
  default: ''
@@ -50362,8 +50399,19 @@
50362
50399
  if (unFocus) {
50363
50400
  this.hidePopper();
50364
50401
  this.input.focus = false;
50402
+ this.inputUnfocusClear && this.inputOutSideClear();
50403
+ this.$emit('input-click-outside', e);
50365
50404
  }
50366
- this.$emit('input-click-outside', e);
50405
+ },
50406
+ inputOutSideClear: function inputOutSideClear() {
50407
+ this.input.value = '';
50408
+ this.menu.active = -1;
50409
+ this.menu.id = null;
50410
+ this.updateInput();
50411
+ this.clearInput();
50412
+ this.menu.checked = {};
50413
+ this.menuChildInstance && (this.menuChildInstance.checked = {});
50414
+ this.menuInstance = null;
50367
50415
  },
50368
50416
  handleCancel: function handleCancel(e) {
50369
50417
  this.handleClearChildSelectChecked();