Skip to content

Commit

Permalink
Update fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
tangbc committed Mar 23, 2017
1 parent c8ea909 commit da20585
Show file tree
Hide file tree
Showing 10 changed files with 32 additions and 33 deletions.
14 changes: 8 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@

## vue-virtual-scroll-list

> A vue component that support big data by using virtual scroll list. Tiny, smooth and without any dependence.
> A vue component support big data by using virtual scroll list. Tiny, smooth and without any dependence.

## How it works

<img src="https://tangbc.github.io/github-images/virtual-scroll-list-4.gif">
<img src="https://tangbc.github.io/github-images/virtual-scroll-list-2.gif">


## Demos
Expand All @@ -35,10 +35,7 @@ Using Vue single file components:
```javascript
<template>
<div>
<VirtualList
:size="40"
:remain="8"
>
<VirtualList :size="40" :remain="8">
<Item v-for="(item, index) of items" :item="item" :key="item.id" />
</VirtualList>
</div>
Expand Down Expand Up @@ -76,6 +73,11 @@ The `<Item />` component is defined outside but included inside the `<VirtualLis
| toBottom | Event | * | An event emit by virtual list component when the list is scrolled on bottom. |


## Contributions

Welcome to improve vue-virtual-scroll-list by any pull request or issue!


## License

[MIT License](https://github.com/tangbc/vue-virtual-scroll-list/blob/master/LICENSE)
5 changes: 1 addition & 4 deletions demo/build/finite.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion demo/build/finite.js.map

Large diffs are not rendered by default.

8 changes: 2 additions & 6 deletions demo/build/infinite.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion demo/build/infinite.js.map

Large diffs are not rendered by default.

9 changes: 6 additions & 3 deletions demo/common.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,12 @@
}
.appWraper {
width: 440px;
position: absolute;
left: 50%;
margin-left: -220px;
margin: 0 auto;
overflow-y: auto;
box-shadow: 4px 6px 20px #e6e6e6;
}
@media (max-width: 1024px) {
.appWraper {
width: 100%;
}
}
7 changes: 3 additions & 4 deletions demo/finite/finite.vue
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
<template>
<div>
<VirtualList
:size="40"
:remain="8"
>
<VirtualList :size="40" :remain="8">
<Item v-for="(udf, index) of items" :index="index" :key="index" />
</VirtualList>
</div>
Expand All @@ -30,6 +27,8 @@
.virtual-list {
border-radius: 3px;
border: 1px solid #ddd;
-webkit-overflow-scrolling: touch;
overflow-scrolling: touch;
}
</style>

2 changes: 1 addition & 1 deletion demo/finite/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<link rel="stylesheet" type="text/css" href="../common.css">
</head>
<body>
<h1 class="title">Vue virtual list, with 10,0000 finite data.</h1>
<h1 class="title">Vue virtual list, with 100,000 finite data.</h1>
<div class="appWraper">
<div id="app"></div>
</div>
Expand Down
10 changes: 4 additions & 6 deletions demo/infinite/infinite.vue
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
<template>
<div>
<VirtualList
:size="40"
:remain="8"
v-on:toBottom="onBottom"
>
<VirtualList :size="40" :remain="8" v-on:toBottom="onBottom">
<Item v-for="(udf, index) of items" :index="index" :key="index" />
</VirtualList>
</div>
Expand All @@ -31,7 +27,7 @@
methods: {
onBottom () {
this.items = this.items.concat(getList());
this.items = this.items.concat(getList(20));
}
}
}
Expand All @@ -41,6 +37,8 @@
.virtual-list {
border-radius: 3px;
border: 1px solid #ddd;
-webkit-overflow-scrolling: touch;
overflow-scrolling: touch;
}
</style>

6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "vue-virtual-scroll-list",
"version": "1.0.2",
"description": "A vue component that support big data by using virtual scroll list. Tiny, smooth and without any dependence.",
"description": "A vue component support big data by using virtual scroll list. Tiny, smooth and without any dependence.",
"main": "src/index.js",
"scripts": {
"demo": "webpack --watch --config webpack.config.js"
Expand All @@ -14,6 +14,10 @@
"scroll-list",
"virtual-list"
],
"repository": {
"type": "git",
"url": "https://github.com/tangbc/vue-virtual-scroll-list"
},
"author": "TANG",
"license": "MIT",
"devDependencies": {
Expand Down

0 comments on commit da20585

Please sign in to comment.