bk-magic-vue 2.4.12-beta.3 → 2.4.13-beta.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.
@@ -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
@@ -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
  },
@@ -41833,7 +41854,9 @@
41833
41854
  },
41834
41855
  pagination: {
41835
41856
  type: Object,
41836
- default: {}
41857
+ default: function _default() {
41858
+ return {};
41859
+ }
41837
41860
  },
41838
41861
  showPaginationInfo: {
41839
41862
  type: Boolean,
@@ -49993,6 +50016,10 @@
49993
50016
  type: String,
49994
50017
  default: ''
49995
50018
  },
50019
+ inputUnfocusClear: {
50020
+ type: Boolean,
50021
+ default: false
50022
+ },
49996
50023
  extCls: {
49997
50024
  type: String,
49998
50025
  default: ''
@@ -50365,8 +50392,19 @@
50365
50392
  if (unFocus) {
50366
50393
  this.hidePopper();
50367
50394
  this.input.focus = false;
50395
+ this.inputUnfocusClear && this.inputOutSideClear();
50396
+ this.$emit('input-click-outside', e);
50368
50397
  }
50369
- this.$emit('input-click-outside', e);
50398
+ },
50399
+ inputOutSideClear: function inputOutSideClear() {
50400
+ this.input.value = '';
50401
+ this.menu.active = -1;
50402
+ this.menu.id = null;
50403
+ this.updateInput();
50404
+ this.clearInput();
50405
+ this.menu.checked = {};
50406
+ this.menuChildInstance && (this.menuChildInstance.checked = {});
50407
+ this.menuInstance = null;
50370
50408
  },
50371
50409
  handleCancel: function handleCancel(e) {
50372
50410
  this.handleClearChildSelectChecked();