Skip to content

Commit

Permalink
build: release 4.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
wangyi7099 committed Apr 26, 2018
1 parent 8249b5d commit 4fe08eb
Show file tree
Hide file tree
Showing 11 changed files with 18 additions and 47 deletions.
4 changes: 0 additions & 4 deletions README-ZH.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@

vuescroll 是一个基于 [vue.js 2.X](https://github.com/vuejs/vue) 并且同时支持PC端和移动端的虚拟滚动条.你能够在浏览器环境中定制你喜欢的样式而不是用原生的滚动条.[这里是官方网站](https://wangyi7099.github.io/VuescrollDocs)


## 虚拟滚动条的使用例子
[element](http://element-cn.eleme.io/#/zh-CN/component/installation),[slimScroll](https://github.com/rochal/jQuery-slimScroll) and [CodePen(Code edit box)](https://codepen.io/wangyi7099/) 正在用.

## 特点
* [scrollor](https://github.com/pbakaus/scroller)的完整特性.
* [强大的配置](https://github.com/wangyi7099/vuescroll/blob/dev/src/config/GlobalConfig.js)能使你定制自己的滚动条。
Expand Down
5 changes: 1 addition & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,8 @@

vuescroll is a virtual scrollbar based on [vue.js 2.X](https://github.com/vuejs/vue) which can both support PC and mobile phone.You can customize the scrollbar how you like instead of using native in browser. Here is the offical [website](https://wangyi7099.github.io/VuescrollDocs).

## Use case of virtual scrollbar
[element](http://element-cn.eleme.io/#/zh-CN/component/installation),[slimScroll](https://github.com/rochal/jQuery-slimScroll) and [CodePen(Code edit box)](https://codepen.io/wangyi7099/) are using it. Here is the offical [website](https://wangyi7099.github.io/VuescrollDocs) of vuescroll.

## Features
* Whole features of [scrollor](https://github.com/pbakaus/scroller).
* Full features of [scrollor](https://github.com/pbakaus/scroller).
* Ability to customize scrollbar by [powerful configurations](https://github.com/wangyi7099/vuescroll/blob/dev/src/config/GlobalConfig.js).
* Ability to [detect size change](https://wangyi7099.github.io/VuescrollDocs/getStarted/en/event/handle-resize.html) of content and automatically update.
* [smooth-scroll](https://github.com/cferdinandi/smooth-scroll) Integration.
Expand Down
8 changes: 2 additions & 6 deletions dist/vuescroll.common.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* @name: vuescroll 4.4.9
* @name: vuescroll 4.5.0
* @author: (c) 2018-2018 wangyi7099
* @description: A reactive virtual scrollbar based on vue.js 2.X
* @license: MIT
Expand Down Expand Up @@ -110,7 +110,6 @@ function getGutter() {
/* istanbul ignore next */
if (Vue.prototype.$isServer) return 0;
if (scrollBarWidth !== undefined) return scrollBarWidth;

var outer = document.createElement("div");
outer.style.visibility = "hidden";
outer.style.width = "100px";
Expand All @@ -120,17 +119,14 @@ function getGutter() {

var widthNoScroll = outer.offsetWidth;
outer.style.overflow = "scroll";

var inner = document.createElement("div");
inner.style.width = "100%";
outer.appendChild(inner);

var widthWithScroll = inner.offsetWidth;
outer.parentNode.removeChild(outer);
scrollBarWidth = widthNoScroll - widthWithScroll;

getGutter.isUsed = false;

return scrollBarWidth;
}

Expand Down Expand Up @@ -3480,7 +3476,7 @@ var scroll = {
// feat: #8
Vue$$1.prototype.$vuescrollConfig = deepMerge(GCF, {});
scroll.isInstalled = true;
scroll.version = "4.4.9";
scroll.version = "4.5.0";
}
};
/* istanbul ignore if */
Expand Down
4 changes: 2 additions & 2 deletions dist/vuescroll.common.min.js

Large diffs are not rendered by default.

8 changes: 2 additions & 6 deletions dist/vuescroll.esm.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* @name: vuescroll 4.4.9
* @name: vuescroll 4.5.0
* @author: (c) 2018-2018 wangyi7099
* @description: A reactive virtual scrollbar based on vue.js 2.X
* @license: MIT
Expand Down Expand Up @@ -106,7 +106,6 @@ function getGutter() {
/* istanbul ignore next */
if (Vue.prototype.$isServer) return 0;
if (scrollBarWidth !== undefined) return scrollBarWidth;

var outer = document.createElement("div");
outer.style.visibility = "hidden";
outer.style.width = "100px";
Expand All @@ -116,17 +115,14 @@ function getGutter() {

var widthNoScroll = outer.offsetWidth;
outer.style.overflow = "scroll";

var inner = document.createElement("div");
inner.style.width = "100%";
outer.appendChild(inner);

var widthWithScroll = inner.offsetWidth;
outer.parentNode.removeChild(outer);
scrollBarWidth = widthNoScroll - widthWithScroll;

getGutter.isUsed = false;

return scrollBarWidth;
}

Expand Down Expand Up @@ -3476,7 +3472,7 @@ var scroll = {
// feat: #8
Vue$$1.prototype.$vuescrollConfig = deepMerge(GCF, {});
scroll.isInstalled = true;
scroll.version = "4.4.9";
scroll.version = "4.5.0";
}
};
/* istanbul ignore if */
Expand Down
4 changes: 2 additions & 2 deletions dist/vuescroll.esm.min.js

Large diffs are not rendered by default.

8 changes: 2 additions & 6 deletions dist/vuescroll.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* @name: vuescroll 4.4.9
* @name: vuescroll 4.5.0
* @author: (c) 2018-2018 wangyi7099
* @description: A reactive virtual scrollbar based on vue.js 2.X
* @license: MIT
Expand Down Expand Up @@ -112,7 +112,6 @@ function getGutter() {
/* istanbul ignore next */
if (Vue.prototype.$isServer) return 0;
if (scrollBarWidth !== undefined) return scrollBarWidth;

var outer = document.createElement("div");
outer.style.visibility = "hidden";
outer.style.width = "100px";
Expand All @@ -122,17 +121,14 @@ function getGutter() {

var widthNoScroll = outer.offsetWidth;
outer.style.overflow = "scroll";

var inner = document.createElement("div");
inner.style.width = "100%";
outer.appendChild(inner);

var widthWithScroll = inner.offsetWidth;
outer.parentNode.removeChild(outer);
scrollBarWidth = widthNoScroll - widthWithScroll;

getGutter.isUsed = false;

return scrollBarWidth;
}

Expand Down Expand Up @@ -3482,7 +3478,7 @@ var scroll = {
// feat: #8
Vue$$1.prototype.$vuescrollConfig = deepMerge(GCF, {});
scroll.isInstalled = true;
scroll.version = "4.4.9";
scroll.version = "4.5.0";
}
};
/* istanbul ignore if */
Expand Down
4 changes: 2 additions & 2 deletions dist/vuescroll.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"test:cover": "karma start test/karma.conf.js",
"report-coverage": "codecov"
},
"version": "4.4.9",
"version": "4.5.0",
"devDependencies": {
"babel-core": "^6.26.0",
"babel-helper-vue-jsx-merge-props": "^2.0.3",
Expand Down
6 changes: 2 additions & 4 deletions src/config/global-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,8 @@ export default {
// customize tag of scrollContent
tag: "div",
padding: true,
props: {
},
attrs: {
}
props: { },
attrs: { }
},
//
rail: {
Expand Down
12 changes: 2 additions & 10 deletions src/util/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,7 @@ export function deepMerge(from, to) {
*/
export function defineReactive(target, key, source, souceKey) {
let getter = null;
if(
!source[key]
&& typeof source !== "function"

) {
if(!source[key] && typeof source !== "function") {
return;
}
souceKey = souceKey || key;
Expand All @@ -72,7 +68,6 @@ export function getGutter() {
/* istanbul ignore next */
if (Vue.prototype.$isServer) return 0;
if (scrollBarWidth !== undefined) return scrollBarWidth;

const outer = document.createElement("div");
outer.style.visibility = "hidden";
outer.style.width = "100px";
Expand All @@ -82,17 +77,14 @@ export function getGutter() {

const widthNoScroll = outer.offsetWidth;
outer.style.overflow = "scroll";

const inner = document.createElement("div");
inner.style.width = "100%";
outer.appendChild(inner);

const widthWithScroll = inner.offsetWidth;
outer.parentNode.removeChild(outer);
scrollBarWidth = widthNoScroll - widthWithScroll;

getGutter.isUsed = false;

return scrollBarWidth;
}

Expand Down

0 comments on commit 4fe08eb

Please # to comment.