Skip to content

Commit 5b9d4e6

Browse files
committed
Drop class
1 parent 6f7586c commit 5b9d4e6

File tree

9 files changed

+12
-26
lines changed

9 files changed

+12
-26
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
node_modules
2-
npm-debug.log
2+
npm-debug.log
3+
*.js.map

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,6 @@ new Vue({
9494
:--- | :--- | :--- | :--- |
9595
| size | Number || Each list item height, currently only supports fixed height. |
9696
| remain | Number || How many items except show in virtual-list viewport, so `size` and `remian` will determine the virtual-list outside container height (size × remian). |
97-
| klass | String | * | Add a custom classname to virtual-list component default is `virtual-scroll-list`. |
9897
| onScroll | Function | * | Call on virtual-list scroll event hanlding, param: `(e, scrollTop)` |
9998
| toTop | Event | * | An event emit by virtual-list component when the list is scrolled on top. |
10099
| toBottom | Event | * | An event emit by virtual-list component when the list is scrolled on bottom. |

demo/build/finite.js

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

demo/build/finite.js.map

Lines changed: 0 additions & 1 deletion
This file was deleted.

demo/build/infinite.js

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

demo/build/infinite.js.map

Lines changed: 0 additions & 1 deletion
This file was deleted.

demo/finite/finite.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<template>
22
<div>
3-
<VirtualList :size="50" :remain="6" :klass="'list'">
3+
<VirtualList :size="50" :remain="6" class="list">
44
<Item v-for="(udf, index) of items" :index="index" :key="index" />
55
</VirtualList>
66
</div>

demo/infinite/infinite.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<template>
22
<div>
3-
<VirtualList :size="50" :remain="6" v-on:toBottom="onBottom">
3+
<VirtualList class="list" :size="50" :remain="6" v-on:toBottom="onBottom">
44
<Item v-for="(udf, index) of items" :index="index" :key="index" />
55
</VirtualList>
66
</div>
@@ -34,7 +34,7 @@
3434
</script>
3535

3636
<style scoped>
37-
.virtual-scroll-list {
37+
.list {
3838
border-radius: 3px;
3939
border: 1px solid #ddd;
4040
-webkit-overflow-scrolling: touch;

src/index.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,6 @@ const VirtualList = Vue.component('vue-virtual-scroll-list', {
1111
type: Number,
1212
required: true
1313
},
14-
klass: {
15-
type: String,
16-
default: 'virtual-scroll-list'
17-
},
1814
onScroll: Function
1915
},
2016

@@ -96,7 +92,6 @@ const VirtualList = Vue.component('vue-virtual-scroll-list', {
9692

9793
return createElement('div', {
9894
'ref': 'container',
99-
'class': this.klass,
10095
'style': {
10196
'overflow-y': 'auto',
10297
'height': viewHeight + 'px'

0 commit comments

Comments
 (0)