Skip to content

Commit 5018cbe

Browse files
committed
build: release 4.5.9
Features: Add a new event 'handle-scroll-complete', will emit when scroll complete. Refactor: Code structure, to be more easier understood
1 parent 6da46f3 commit 5018cbe

25 files changed

+1678
-1869
lines changed

README-ZH.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,21 @@
22

33
<p align="center"><a href="https://wangyi7099.github.io/vuescrolljs/zh/"><img width="100" src="https://wangyi7099.github.io/vuescrolljs/logo.png" /></a></p>
44

5-
Vuescroll 是一个基于 [vue.js 2.X](https://github.com/vuejs/vue)的虚拟滚动条,它拥有多个模式可供你选择: `slide` 模式、`native` 模式和`pure-native`模式, 并且它还支持定制滚动条的样式,检测内容尺寸变化、能够使内容分页、支持上拉-刷新,下推加载等诸多功能。
5+
Vuescroll 是一个基于 [vue.js 2.X](https://github.com/vuejs/vue)的虚拟滚动条,它当前拥有3个模式可供你选择:
6+
7+
`slide` 模式: 允许你用手指或鼠标滑动内容, 可以滑动超出边界范围。适用于移动端端用户。
8+
9+
`native` 模式: 有点想原生的滚动,可以自定义滚动条样式。使用于PC端用户。
10+
11+
`pure-native`模式: 滚动条使用原生的滚动条。适用于喜欢原生滚动条的用户。
12+
13+
并且它还支持定制滚动条的样式,检测内容尺寸变化、能够使内容分页、支持上拉-刷新,下推加载等诸多功能。
14+
15+
> 对于那些使用3.X的用户想升级到4.X 请使用如下命令,否则可能会导致升级失败!:
16+
```bash
17+
npm i vuescroll@latest
18+
# yarn add vuescroll@latest
19+
```
620

721
<a href="https://www.npmjs.com/package/vuescroll"><img src="https://img.shields.io/npm/v/vuescroll.svg" alt="Version"></a><a href="https://circleci.com/gh/wangyi7099/vuescroll/tree/dev"><img src="https://img.shields.io/circleci/project/wangyi7099/vuescroll/dev.svg" alt="Build Status"></a><a href="https://www.npmjs.com/package/vuescroll"><img src="https://img.shields.io/npm/l/vuescroll.svg" alt="License"></a>
822
<a href="https://www.npmjs.com/package/vuescroll"><img src="https://img.shields.io/npm/dm/vuescroll.svg" alt="Download"></a>

README.md

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,23 @@
11

22

3-
<p align="center"><a href="https://wangyi7099.github.io/vuescrolljs/"><img width="100" src="https://wangyi7099.github.io/vuescrolljs/logo.png" /></a></p>
3+
<p align="center"><a href="https://wangyi7099.github.io/vuescrolljs/"><img width="100" src="https://wangyi7099.github.io/vuescrolljs/logo.png" /></a></p>
44

5-
[中文README](https://github.com/wangyi7099/vuescroll/blob/dev/README-ZH.md)<br />
6-
**Vuescroll** is a virtual scrollbar based on [vue.js 2.X](https://github.com/vuejs/vue) ,and it has multi modes you can choose, such as **slide** mode, **native** mode, and **pure-native** mode. It also supports customizing styles of scrollbar,detecting size change of content、paging、pull-refresh,push-load and so on.
5+
[中文README](https://github.com/wangyi7099/vuescroll/blob/dev/README-ZH.md)<br />
6+
**Vuescroll** is a reactive, muli-modes, virtual scrollbar based on [vue.js 2.X](https://github.com/vuejs/vue) ,and it currently has 3 modes you can choose:
7+
8+
`slide` mode: Allow you slide by finger or mouse pointer, can slide out of bountry. It is suitable for mobile phone.
9+
10+
`native` mode: Seem to be native scrollbar, but can costumize styles of scrollbars. It is suitable for PC.
11+
12+
`pure-native`mode: Use native scrollbars. It is suitable for the users who like native scrollbar.
13+
14+
It also supports customizing styles of scrollbar,detecting size change of content、paging、pull-refresh,push-load and so on.
15+
16+
> For those who use 3.X and want to upgrade to 4.X, please use the following usage ,or might be upgrade fail:
17+
```bash
18+
npm i vuescroll@latest
19+
# yarn add vuescroll@latest
20+
```
721

822
<a href="https://www.npmjs.com/package/vuescroll"><img src="https://img.shields.io/npm/v/vuescroll.svg" alt="Version"></a><a href="https://circleci.com/gh/wangyi7099/vuescroll/tree/dev"><img src="https://img.shields.io/circleci/project/wangyi7099/vuescroll/dev.svg" alt="Build Status"></a><a href="https://www.npmjs.com/package/vuescroll"><img src="https://img.shields.io/npm/l/vuescroll.svg" alt="License"></a>
923
<a href="https://www.npmjs.com/package/vuescroll"><img src="https://img.shields.io/npm/dm/vuescroll.svg" alt="Download"></a>

demo/demo-comprehensive.html

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@
5353
@load-before-deactivate="loadBeforeDeactivate"
5454
@load-deactivate="loadDeactivate"
5555
@load-start="loadStart"
56+
@handle-scroll-complete="handleComplete"
5657
>
5758
<template
5859
v-for= "(item, index) in randomArray"
@@ -221,7 +222,6 @@
221222
},
222223
enable: false
223224
},
224-
snapping: false,
225225
paging: false,
226226
zooming: false
227227
},
@@ -240,7 +240,7 @@
240240
}
241241
}
242242
},
243-
dataNums: 40,
243+
dataNums: 120,
244244
reRender: 1,
245245
easings,
246246
dx: 0,
@@ -263,6 +263,9 @@
263263
}
264264
},
265265
methods: {
266+
handleComplete(v, h) {
267+
console.log(v, h);
268+
},
266269
refresh() {
267270
this.reRender ++;
268271
},

0 commit comments

Comments
 (0)