bk-magic-vue 2.5.9-beta.26 → 2.5.9-beta.27
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.
- package/dist/bk-magic-vue.js +27 -10
- package/dist/bk-magic-vue.min.js +1 -1
- package/dist/bk-magic-vue.min.js.gz +0 -0
- package/dist/bk-magic-vue.min.js.map +1 -1
- package/lib/resize-layout.js +73 -56
- package/package.json +1 -1
package/dist/bk-magic-vue.js
CHANGED
|
@@ -59745,6 +59745,7 @@
|
|
|
59745
59745
|
asideContentVisible: true,
|
|
59746
59746
|
minimized: false,
|
|
59747
59747
|
limitMax: null,
|
|
59748
|
+
asideStyleValue: null,
|
|
59748
59749
|
state: {}
|
|
59749
59750
|
};
|
|
59750
59751
|
},
|
|
@@ -59756,11 +59757,13 @@
|
|
|
59756
59757
|
return this.vertical ? 'width' : 'height';
|
|
59757
59758
|
},
|
|
59758
59759
|
computedAsideStyle: function computedAsideStyle() {
|
|
59759
|
-
var
|
|
59760
|
-
if (typeof
|
|
59761
|
-
|
|
59760
|
+
var asideStyleValue = '';
|
|
59761
|
+
if (typeof this.asideStyleValue !== 'number' && isNaN(this.asideStyleValue)) {
|
|
59762
|
+
asideStyleValue = this.asideStyleValue;
|
|
59763
|
+
} else {
|
|
59764
|
+
asideStyleValue = "".concat(this.asideStyleValue, "px");
|
|
59762
59765
|
}
|
|
59763
|
-
return _defineProperty({}, this.computedStyleKey,
|
|
59766
|
+
return _defineProperty({}, this.computedStyleKey, asideStyleValue);
|
|
59764
59767
|
},
|
|
59765
59768
|
computedTriggerStyle: function computedTriggerStyle() {
|
|
59766
59769
|
var _style;
|
|
@@ -59774,6 +59777,17 @@
|
|
|
59774
59777
|
return 0;
|
|
59775
59778
|
}
|
|
59776
59779
|
},
|
|
59780
|
+
watch: {
|
|
59781
|
+
initialDivide: {
|
|
59782
|
+
handler: function handler(newValue, _oldValue) {
|
|
59783
|
+
this.asideStyleValue = newValue;
|
|
59784
|
+
},
|
|
59785
|
+
immediate: true
|
|
59786
|
+
}
|
|
59787
|
+
},
|
|
59788
|
+
created: function created() {
|
|
59789
|
+
this.asideStyleValue = this.initialDivide;
|
|
59790
|
+
},
|
|
59777
59791
|
mounted: function mounted() {
|
|
59778
59792
|
this.setupLimit();
|
|
59779
59793
|
addResizeListener(this.$el, this.setupLimit);
|
|
@@ -59863,6 +59877,7 @@
|
|
|
59863
59877
|
var current = _this.state.aside[_this.computedStyleKey] + delta;
|
|
59864
59878
|
var realValue = _this.getRealValue(current) + _this.triggerOffset;
|
|
59865
59879
|
var pixel = "".concat(realValue, "px");
|
|
59880
|
+
_this.asideStyleValue = pixel;
|
|
59866
59881
|
if (_this.immediate) {
|
|
59867
59882
|
aside.style[_this.computedStyleKey] = pixel;
|
|
59868
59883
|
} else {
|
|
@@ -59879,6 +59894,7 @@
|
|
|
59879
59894
|
document.removeEventListener('mouseup', handleMouseUp);
|
|
59880
59895
|
document.onselectstart = null;
|
|
59881
59896
|
document.ondragstart = null;
|
|
59897
|
+
_this.asideStyleValue = resizeProxy.style[placement];
|
|
59882
59898
|
_this.$nextTick(function () {
|
|
59883
59899
|
_this.setupAutoMinimize();
|
|
59884
59900
|
_this.$emit('after-resize', _parseFloat$2(resizeProxy.style[placement], 10));
|
|
@@ -59887,7 +59903,6 @@
|
|
|
59887
59903
|
return false;
|
|
59888
59904
|
}
|
|
59889
59905
|
aside.style[_this.computedStyleKey] = resizeProxy.style[placement];
|
|
59890
|
-
console.error('mouseup', aside.style[_this.computedStyleKey]);
|
|
59891
59906
|
};
|
|
59892
59907
|
document.addEventListener('mousemove', handleMouseMove);
|
|
59893
59908
|
document.addEventListener('mouseup', handleMouseUp);
|
|
@@ -59904,9 +59919,11 @@
|
|
|
59904
59919
|
this.asideContentVisible = true;
|
|
59905
59920
|
return false;
|
|
59906
59921
|
}
|
|
59922
|
+
var prevDataWidthAttr = aside.getAttribute("data-".concat(this.computedStyleKey));
|
|
59923
|
+
var prevDataWidth = prevDataWidthAttr && "".concat(_parseFloat$2(prevDataWidthAttr), "px") || this.initialDivide;
|
|
59907
59924
|
this.setupAsideAnimation();
|
|
59908
59925
|
this.$nextTick(function () {
|
|
59909
|
-
aside.setAttribute("data-".concat(_this2.computedStyleKey),
|
|
59926
|
+
aside.setAttribute("data-".concat(_this2.computedStyleKey), prevDataWidth);
|
|
59910
59927
|
});
|
|
59911
59928
|
},
|
|
59912
59929
|
setCollapse: function setCollapse(collapsed) {
|
|
@@ -59916,14 +59933,14 @@
|
|
|
59916
59933
|
},
|
|
59917
59934
|
setupAsideAnimation: function setupAsideAnimation() {
|
|
59918
59935
|
var aside = this.$refs.aside;
|
|
59919
|
-
var
|
|
59936
|
+
var previewStyleValue = aside.style[this.computedStyleKey];
|
|
59920
59937
|
this.setupAsideListener(!this.collapsed);
|
|
59921
59938
|
if (this.collapsed) {
|
|
59922
|
-
aside.setAttribute("data-".concat(this.computedStyleKey),
|
|
59923
|
-
|
|
59939
|
+
aside.setAttribute("data-".concat(this.computedStyleKey), previewStyleValue);
|
|
59940
|
+
this.asideStyleValue = this.collapsible ? '0' : '5px';
|
|
59924
59941
|
} else {
|
|
59925
59942
|
this.asideContentVisible = true;
|
|
59926
|
-
|
|
59943
|
+
this.asideStyleValue = aside.getAttribute("data-".concat(this.computedStyleKey));
|
|
59927
59944
|
}
|
|
59928
59945
|
},
|
|
59929
59946
|
setupAsideListener: function setupAsideListener(asideContentVisible) {
|