Skip to content

Commit 99c343b

Browse files
committed
build: releas v4.4.8
1 parent db6c1b5 commit 99c343b

File tree

12 files changed

+53
-151
lines changed

12 files changed

+53
-151
lines changed

CHANGELOG.MD

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
## Change Log
2+
### v4.4.8
3+
#### Revert
4+
* Remove `fit-content` and add `inline-block` to `scrollContent`
5+
---
26
### v4.4.7
37
#### Tweak
48
* Add `text-align` to content

dist/demo/demo-comprehensive.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
<span>{{index+1 + '.' + item}}</span>
6666
</div>
6767
<br
68-
v-if="(index+1) % 8 == 0"
68+
v-if="(index+1) % 40 == 0"
6969
/>
7070
</template>
7171
</vue-scroll>

dist/vuescroll.common.js

Lines changed: 10 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* @name: vuescroll 4.4.7
2+
* @name: vuescroll 4.4.8
33
* @author: (c) 2018-2018 wangyi7099
44
* @description: A reactive virtual scrollbar based on vue.js 2.X
55
* @license: MIT
@@ -139,7 +139,6 @@ function getGutter() {
139139
var haveHideen = false;
140140
var haveCreatedRefreshDomClass = false;
141141
var haveCreatedLoadDomClass = false;
142-
var haveCreatedContentClass = false;
143142
function hideSystemBar() {
144143
if (haveHideen) {
145144
return;
@@ -172,17 +171,6 @@ function createLoadDomStyle() {
172171
styleDom.innerHTML = "\n .vuescroll-load {\n color: black;\n height: 50px;\n text-align: center;\n font-size: 16px;\n line-height: 50px;\n }\n .vuescroll-load svg {\n margin-right: 10px;\n width: 25px;\n height: 25px;\n vertical-align: sub;\n }\n .vuescroll-load svg path,\n .vuescroll-load svg rect{\n fill: #FF6700;\n }\n ";
173172
document.getElementsByTagName("HEAD").item(0).appendChild(styleDom);
174173
}
175-
176-
function createContentDomStyle() {
177-
if (haveCreatedContentClass) {
178-
return;
179-
}
180-
haveCreatedContentClass = true;
181-
var styleDom = document.createElement("style");
182-
styleDom.type = "text/css";
183-
styleDom.innerHTML = "\n .vuescroll-content {\n text-align: left;\n }";
184-
document.getElementsByTagName("HEAD").item(0).appendChild(styleDom);
185-
}
186174
/**
187175
* @description render bar's style
188176
* @author wangyi
@@ -332,10 +320,6 @@ function listenResize(element, funArr) {
332320
element.removeChild(object);
333321
};
334322
}
335-
var inBrowser = typeof window !== "undefined";
336-
var UA = inBrowser && window.navigator.userAgent.toLowerCase();
337-
var isIE = UA && /msie|trident/.test(UA);
338-
var isFF = UA && /Firefox/i.test(UA);
339323

340324
var modes = ["slide", "native"];
341325
var GCF = {
@@ -2751,18 +2735,11 @@ var scrollContent = {
27512735
style.position = "relative";
27522736
style.minHeight = "100%";
27532737
style.minWidth = "100%";
2754-
if (isIE) {
2755-
style.display = "inline-block";
2756-
} else if (isFF) {
2757-
style.width = "-moz-fit-content";
2758-
} else {
2759-
style.width = "fit-content";
2760-
}
2738+
style.display = "inline-block";
2739+
27612740
if (props.ops.padding) {
27622741
style[props.ops.paddPos] = props.ops.paddValue;
27632742
}
2764-
// create style in <style> level
2765-
createContentDomStyle();
27662743

27672744
return h(props.ops.tag, {
27682745
style: style,
@@ -2871,7 +2848,8 @@ function createPanel(h, vm) {
28712848
var scrollPanelData = {
28722849
ref: "scrollPanel",
28732850
style: {
2874-
position: "relative"
2851+
position: "relative",
2852+
height: "100%"
28752853
},
28762854
nativeOn: {
28772855
scroll: vm.handleScroll
@@ -2888,12 +2866,12 @@ function createPanel(h, vm) {
28882866
if (vm.mergedOptions.scrollPanel.scrollingY) {
28892867
scrollPanelData.style["overflowY"] = vm.vBar.state.size ? "scroll" : "inherit";
28902868
} else {
2891-
scrollPanelData.style["overflowY"] = vm.vBar.state.size ? "hidden" : "inherit";
2869+
scrollPanelData.style["overflowY"] = "hidden";
28922870
}
28932871
if (vm.mergedOptions.scrollPanel.scrollingX) {
28942872
scrollPanelData.style["overflowX"] = vm.vBar.state.size ? "scroll" : "inherit";
28952873
} else {
2896-
scrollPanelData.style["overflowX"] = vm.vBar.state.size ? "hidden" : "inherit";
2874+
scrollPanelData.style["overflowX"] = "hidden";
28972875
}
28982876
var gutter = getGutter();
28992877
if (!getGutter.isUsed) {
@@ -2905,12 +2883,10 @@ function createPanel(h, vm) {
29052883
} else {
29062884
// hide system bar by use a negative value px
29072885
// gutter should be 0 when manually disable scrollingX #14
2908-
if (vm.mergedOptions.scrollPanel.scrollingY) {
2886+
if (vm.vBar.state.size && vm.mergedOptions.scrollPanel.scrollingY) {
29092887
scrollPanelData.style.marginRight = "-" + gutter + "px";
29102888
}
2911-
if (!vm.mergedOptions.scrollPanel.scrollingX) {
2912-
scrollPanelData.style.height = "100%";
2913-
} else {
2889+
if (vm.hBar.state.size && vm.mergedOptions.scrollPanel.scrollingX) {
29142890
scrollPanelData.style.height = "calc(100% + " + gutter + "px)";
29152891
}
29162892
}
@@ -3519,7 +3495,7 @@ var scroll = {
35193495

35203496
scroll.isInstalled = true;
35213497

3522-
scroll.version = "4.4.7";
3498+
scroll.version = "4.4.8";
35233499
}
35243500
};
35253501
/* istanbul ignore if */

dist/vuescroll.common.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/vuescroll.esm.js

Lines changed: 10 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* @name: vuescroll 4.4.7
2+
* @name: vuescroll 4.4.8
33
* @author: (c) 2018-2018 wangyi7099
44
* @description: A reactive virtual scrollbar based on vue.js 2.X
55
* @license: MIT
@@ -135,7 +135,6 @@ function getGutter() {
135135
var haveHideen = false;
136136
var haveCreatedRefreshDomClass = false;
137137
var haveCreatedLoadDomClass = false;
138-
var haveCreatedContentClass = false;
139138
function hideSystemBar() {
140139
if (haveHideen) {
141140
return;
@@ -168,17 +167,6 @@ function createLoadDomStyle() {
168167
styleDom.innerHTML = "\n .vuescroll-load {\n color: black;\n height: 50px;\n text-align: center;\n font-size: 16px;\n line-height: 50px;\n }\n .vuescroll-load svg {\n margin-right: 10px;\n width: 25px;\n height: 25px;\n vertical-align: sub;\n }\n .vuescroll-load svg path,\n .vuescroll-load svg rect{\n fill: #FF6700;\n }\n ";
169168
document.getElementsByTagName("HEAD").item(0).appendChild(styleDom);
170169
}
171-
172-
function createContentDomStyle() {
173-
if (haveCreatedContentClass) {
174-
return;
175-
}
176-
haveCreatedContentClass = true;
177-
var styleDom = document.createElement("style");
178-
styleDom.type = "text/css";
179-
styleDom.innerHTML = "\n .vuescroll-content {\n text-align: left;\n }";
180-
document.getElementsByTagName("HEAD").item(0).appendChild(styleDom);
181-
}
182170
/**
183171
* @description render bar's style
184172
* @author wangyi
@@ -328,10 +316,6 @@ function listenResize(element, funArr) {
328316
element.removeChild(object);
329317
};
330318
}
331-
var inBrowser = typeof window !== "undefined";
332-
var UA = inBrowser && window.navigator.userAgent.toLowerCase();
333-
var isIE = UA && /msie|trident/.test(UA);
334-
var isFF = UA && /Firefox/i.test(UA);
335319

336320
var modes = ["slide", "native"];
337321
var GCF = {
@@ -2747,18 +2731,11 @@ var scrollContent = {
27472731
style.position = "relative";
27482732
style.minHeight = "100%";
27492733
style.minWidth = "100%";
2750-
if (isIE) {
2751-
style.display = "inline-block";
2752-
} else if (isFF) {
2753-
style.width = "-moz-fit-content";
2754-
} else {
2755-
style.width = "fit-content";
2756-
}
2734+
style.display = "inline-block";
2735+
27572736
if (props.ops.padding) {
27582737
style[props.ops.paddPos] = props.ops.paddValue;
27592738
}
2760-
// create style in <style> level
2761-
createContentDomStyle();
27622739

27632740
return h(props.ops.tag, {
27642741
style: style,
@@ -2867,7 +2844,8 @@ function createPanel(h, vm) {
28672844
var scrollPanelData = {
28682845
ref: "scrollPanel",
28692846
style: {
2870-
position: "relative"
2847+
position: "relative",
2848+
height: "100%"
28712849
},
28722850
nativeOn: {
28732851
scroll: vm.handleScroll
@@ -2884,12 +2862,12 @@ function createPanel(h, vm) {
28842862
if (vm.mergedOptions.scrollPanel.scrollingY) {
28852863
scrollPanelData.style["overflowY"] = vm.vBar.state.size ? "scroll" : "inherit";
28862864
} else {
2887-
scrollPanelData.style["overflowY"] = vm.vBar.state.size ? "hidden" : "inherit";
2865+
scrollPanelData.style["overflowY"] = "hidden";
28882866
}
28892867
if (vm.mergedOptions.scrollPanel.scrollingX) {
28902868
scrollPanelData.style["overflowX"] = vm.vBar.state.size ? "scroll" : "inherit";
28912869
} else {
2892-
scrollPanelData.style["overflowX"] = vm.vBar.state.size ? "hidden" : "inherit";
2870+
scrollPanelData.style["overflowX"] = "hidden";
28932871
}
28942872
var gutter = getGutter();
28952873
if (!getGutter.isUsed) {
@@ -2901,12 +2879,10 @@ function createPanel(h, vm) {
29012879
} else {
29022880
// hide system bar by use a negative value px
29032881
// gutter should be 0 when manually disable scrollingX #14
2904-
if (vm.mergedOptions.scrollPanel.scrollingY) {
2882+
if (vm.vBar.state.size && vm.mergedOptions.scrollPanel.scrollingY) {
29052883
scrollPanelData.style.marginRight = "-" + gutter + "px";
29062884
}
2907-
if (!vm.mergedOptions.scrollPanel.scrollingX) {
2908-
scrollPanelData.style.height = "100%";
2909-
} else {
2885+
if (vm.hBar.state.size && vm.mergedOptions.scrollPanel.scrollingX) {
29102886
scrollPanelData.style.height = "calc(100% + " + gutter + "px)";
29112887
}
29122888
}
@@ -3515,7 +3491,7 @@ var scroll = {
35153491

35163492
scroll.isInstalled = true;
35173493

3518-
scroll.version = "4.4.7";
3494+
scroll.version = "4.4.8";
35193495
}
35203496
};
35213497
/* istanbul ignore if */

dist/vuescroll.esm.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/vuescroll.js

Lines changed: 10 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* @name: vuescroll 4.4.7
2+
* @name: vuescroll 4.4.8
33
* @author: (c) 2018-2018 wangyi7099
44
* @description: A reactive virtual scrollbar based on vue.js 2.X
55
* @license: MIT
@@ -141,7 +141,6 @@ function getGutter() {
141141
var haveHideen = false;
142142
var haveCreatedRefreshDomClass = false;
143143
var haveCreatedLoadDomClass = false;
144-
var haveCreatedContentClass = false;
145144
function hideSystemBar() {
146145
if (haveHideen) {
147146
return;
@@ -174,17 +173,6 @@ function createLoadDomStyle() {
174173
styleDom.innerHTML = "\n .vuescroll-load {\n color: black;\n height: 50px;\n text-align: center;\n font-size: 16px;\n line-height: 50px;\n }\n .vuescroll-load svg {\n margin-right: 10px;\n width: 25px;\n height: 25px;\n vertical-align: sub;\n }\n .vuescroll-load svg path,\n .vuescroll-load svg rect{\n fill: #FF6700;\n }\n ";
175174
document.getElementsByTagName("HEAD").item(0).appendChild(styleDom);
176175
}
177-
178-
function createContentDomStyle() {
179-
if (haveCreatedContentClass) {
180-
return;
181-
}
182-
haveCreatedContentClass = true;
183-
var styleDom = document.createElement("style");
184-
styleDom.type = "text/css";
185-
styleDom.innerHTML = "\n .vuescroll-content {\n text-align: left;\n }";
186-
document.getElementsByTagName("HEAD").item(0).appendChild(styleDom);
187-
}
188176
/**
189177
* @description render bar's style
190178
* @author wangyi
@@ -334,10 +322,6 @@ function listenResize(element, funArr) {
334322
element.removeChild(object);
335323
};
336324
}
337-
var inBrowser = typeof window !== "undefined";
338-
var UA = inBrowser && window.navigator.userAgent.toLowerCase();
339-
var isIE = UA && /msie|trident/.test(UA);
340-
var isFF = UA && /Firefox/i.test(UA);
341325

342326
var modes = ["slide", "native"];
343327
var GCF = {
@@ -2753,18 +2737,11 @@ var scrollContent = {
27532737
style.position = "relative";
27542738
style.minHeight = "100%";
27552739
style.minWidth = "100%";
2756-
if (isIE) {
2757-
style.display = "inline-block";
2758-
} else if (isFF) {
2759-
style.width = "-moz-fit-content";
2760-
} else {
2761-
style.width = "fit-content";
2762-
}
2740+
style.display = "inline-block";
2741+
27632742
if (props.ops.padding) {
27642743
style[props.ops.paddPos] = props.ops.paddValue;
27652744
}
2766-
// create style in <style> level
2767-
createContentDomStyle();
27682745

27692746
return h(props.ops.tag, {
27702747
style: style,
@@ -2873,7 +2850,8 @@ function createPanel(h, vm) {
28732850
var scrollPanelData = {
28742851
ref: "scrollPanel",
28752852
style: {
2876-
position: "relative"
2853+
position: "relative",
2854+
height: "100%"
28772855
},
28782856
nativeOn: {
28792857
scroll: vm.handleScroll
@@ -2890,12 +2868,12 @@ function createPanel(h, vm) {
28902868
if (vm.mergedOptions.scrollPanel.scrollingY) {
28912869
scrollPanelData.style["overflowY"] = vm.vBar.state.size ? "scroll" : "inherit";
28922870
} else {
2893-
scrollPanelData.style["overflowY"] = vm.vBar.state.size ? "hidden" : "inherit";
2871+
scrollPanelData.style["overflowY"] = "hidden";
28942872
}
28952873
if (vm.mergedOptions.scrollPanel.scrollingX) {
28962874
scrollPanelData.style["overflowX"] = vm.vBar.state.size ? "scroll" : "inherit";
28972875
} else {
2898-
scrollPanelData.style["overflowX"] = vm.vBar.state.size ? "hidden" : "inherit";
2876+
scrollPanelData.style["overflowX"] = "hidden";
28992877
}
29002878
var gutter = getGutter();
29012879
if (!getGutter.isUsed) {
@@ -2907,12 +2885,10 @@ function createPanel(h, vm) {
29072885
} else {
29082886
// hide system bar by use a negative value px
29092887
// gutter should be 0 when manually disable scrollingX #14
2910-
if (vm.mergedOptions.scrollPanel.scrollingY) {
2888+
if (vm.vBar.state.size && vm.mergedOptions.scrollPanel.scrollingY) {
29112889
scrollPanelData.style.marginRight = "-" + gutter + "px";
29122890
}
2913-
if (!vm.mergedOptions.scrollPanel.scrollingX) {
2914-
scrollPanelData.style.height = "100%";
2915-
} else {
2891+
if (vm.hBar.state.size && vm.mergedOptions.scrollPanel.scrollingX) {
29162892
scrollPanelData.style.height = "calc(100% + " + gutter + "px)";
29172893
}
29182894
}
@@ -3521,7 +3497,7 @@ var scroll = {
35213497

35223498
scroll.isInstalled = true;
35233499

3524-
scroll.version = "4.4.7";
3500+
scroll.version = "4.4.8";
35253501
}
35263502
};
35273503
/* istanbul ignore if */

dist/vuescroll.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"test:cover": "karma start test/karma.conf.js",
3434
"report-coverage": "codecov"
3535
},
36-
"version": "4.4.7",
36+
"version": "4.4.8",
3737
"devDependencies": {
3838
"babel-core": "^6.26.0",
3939
"babel-helper-vue-jsx-merge-props": "^2.0.3",

0 commit comments

Comments
 (0)