ScrollView.vue
688 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<template>
<div :class="['scroll-view', ScrollViewclass]">
<van-list
v-model="loading"
:finished="finished"
finished-text="到底啦!!"
@load="onLoad"
offset="100"
:immediate-check="false"
>
<slot></slot>
</van-list>
</div>
</template>
<script type='text/ecmascript-6'>
export default {
name: 'ScrollView',
data () {
return {
loading: false,
finished: false,
}
},
props: ['ScrollViewclass'],
mounted () {
},
methods: {
onLoad () {
this.$emit('ReachBottom')
},
}
}
</script>
<style scoped lang='scss'>
.scroll-view {
overflow-y: scroll;
box-sizing: border-box;
}
</style>