bk-magic-vue 2.5.9-beta.26 → 2.5.9-beta.28

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.
@@ -57391,6 +57391,10 @@
57391
57391
  return [];
57392
57392
  }
57393
57393
  },
57394
+ changeImmediately: {
57395
+ type: Boolean,
57396
+ default: false
57397
+ },
57394
57398
  placeholder: {
57395
57399
  type: String,
57396
57400
  default: ''
@@ -58184,7 +58188,7 @@
58184
58188
  attrs: {
58185
58189
  "title": _vm.selectedName
58186
58190
  }
58187
- }, [_vm.filterable ? _c('input', {
58191
+ }, [_vm.filterable && _vm.isUnselected && _vm.changeImmediately ? _c('input', {
58188
58192
  directives: [{
58189
58193
  name: "model",
58190
58194
  rawName: "v-model",
@@ -59745,6 +59749,7 @@
59745
59749
  asideContentVisible: true,
59746
59750
  minimized: false,
59747
59751
  limitMax: null,
59752
+ asideStyleValue: null,
59748
59753
  state: {}
59749
59754
  };
59750
59755
  },
@@ -59756,11 +59761,13 @@
59756
59761
  return this.vertical ? 'width' : 'height';
59757
59762
  },
59758
59763
  computedAsideStyle: function computedAsideStyle() {
59759
- var divide = this.initialDivide;
59760
- if (typeof divide === 'number') {
59761
- divide = "".concat(divide, "px");
59764
+ var asideStyleValue = '';
59765
+ if (typeof this.asideStyleValue !== 'number' && isNaN(this.asideStyleValue)) {
59766
+ asideStyleValue = this.asideStyleValue;
59767
+ } else {
59768
+ asideStyleValue = "".concat(this.asideStyleValue, "px");
59762
59769
  }
59763
- return _defineProperty({}, this.computedStyleKey, divide);
59770
+ return _defineProperty({}, this.computedStyleKey, asideStyleValue);
59764
59771
  },
59765
59772
  computedTriggerStyle: function computedTriggerStyle() {
59766
59773
  var _style;
@@ -59774,6 +59781,17 @@
59774
59781
  return 0;
59775
59782
  }
59776
59783
  },
59784
+ watch: {
59785
+ initialDivide: {
59786
+ handler: function handler(newValue, _oldValue) {
59787
+ this.asideStyleValue = newValue;
59788
+ },
59789
+ immediate: true
59790
+ }
59791
+ },
59792
+ created: function created() {
59793
+ this.asideStyleValue = this.initialDivide;
59794
+ },
59777
59795
  mounted: function mounted() {
59778
59796
  this.setupLimit();
59779
59797
  addResizeListener(this.$el, this.setupLimit);
@@ -59863,6 +59881,7 @@
59863
59881
  var current = _this.state.aside[_this.computedStyleKey] + delta;
59864
59882
  var realValue = _this.getRealValue(current) + _this.triggerOffset;
59865
59883
  var pixel = "".concat(realValue, "px");
59884
+ _this.asideStyleValue = pixel;
59866
59885
  if (_this.immediate) {
59867
59886
  aside.style[_this.computedStyleKey] = pixel;
59868
59887
  } else {
@@ -59879,6 +59898,7 @@
59879
59898
  document.removeEventListener('mouseup', handleMouseUp);
59880
59899
  document.onselectstart = null;
59881
59900
  document.ondragstart = null;
59901
+ _this.asideStyleValue = resizeProxy.style[placement];
59882
59902
  _this.$nextTick(function () {
59883
59903
  _this.setupAutoMinimize();
59884
59904
  _this.$emit('after-resize', _parseFloat$2(resizeProxy.style[placement], 10));
@@ -59887,7 +59907,6 @@
59887
59907
  return false;
59888
59908
  }
59889
59909
  aside.style[_this.computedStyleKey] = resizeProxy.style[placement];
59890
- console.error('mouseup', aside.style[_this.computedStyleKey]);
59891
59910
  };
59892
59911
  document.addEventListener('mousemove', handleMouseMove);
59893
59912
  document.addEventListener('mouseup', handleMouseUp);
@@ -59904,9 +59923,11 @@
59904
59923
  this.asideContentVisible = true;
59905
59924
  return false;
59906
59925
  }
59926
+ var prevDataWidthAttr = aside.getAttribute("data-".concat(this.computedStyleKey));
59927
+ var prevDataWidth = prevDataWidthAttr && "".concat(_parseFloat$2(prevDataWidthAttr), "px") || this.initialDivide;
59907
59928
  this.setupAsideAnimation();
59908
59929
  this.$nextTick(function () {
59909
- aside.setAttribute("data-".concat(_this2.computedStyleKey), _this2.computedAsideStyle[_this2.computedStyleKey]);
59930
+ aside.setAttribute("data-".concat(_this2.computedStyleKey), prevDataWidth);
59910
59931
  });
59911
59932
  },
59912
59933
  setCollapse: function setCollapse(collapsed) {
@@ -59916,14 +59937,14 @@
59916
59937
  },
59917
59938
  setupAsideAnimation: function setupAsideAnimation() {
59918
59939
  var aside = this.$refs.aside;
59919
- var asideRect = aside.getBoundingClientRect();
59940
+ var previewStyleValue = aside.style[this.computedStyleKey];
59920
59941
  this.setupAsideListener(!this.collapsed);
59921
59942
  if (this.collapsed) {
59922
- aside.setAttribute("data-".concat(this.computedStyleKey), asideRect[this.computedStyleKey] + 'px');
59923
- aside.style[this.computedStyleKey] = this.collapsible ? '0' : '5px';
59943
+ aside.setAttribute("data-".concat(this.computedStyleKey), previewStyleValue);
59944
+ this.asideStyleValue = this.collapsible ? '0' : '5px';
59924
59945
  } else {
59925
59946
  this.asideContentVisible = true;
59926
- aside.style[this.computedStyleKey] = aside.getAttribute("data-".concat(this.computedStyleKey));
59947
+ this.asideStyleValue = aside.getAttribute("data-".concat(this.computedStyleKey));
59927
59948
  }
59928
59949
  },
59929
59950
  setupAsideListener: function setupAsideListener(asideContentVisible) {