|
@@ -3,7 +3,6 @@
|
|
|
:class="classes"
|
|
:class="classes"
|
|
|
:scroll-y="true"
|
|
:scroll-y="true"
|
|
|
:style="{ height: `${getContainerHeight}px` }"
|
|
:style="{ height: `${getContainerHeight}px` }"
|
|
|
- scroll-top="0"
|
|
|
|
|
@scroll="handleScrollEvent"
|
|
@scroll="handleScrollEvent"
|
|
|
ref="list"
|
|
ref="list"
|
|
|
>
|
|
>
|
|
@@ -84,7 +83,7 @@ export default create({
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
const handleScrollEvent = async (e: any) => {
|
|
const handleScrollEvent = async (e: any) => {
|
|
|
- const scrollTop = e.detail ? e.detail.scrollTop : e.target.scrollTop;
|
|
|
|
|
|
|
+ const scrollTop = Math.max(e.detail ? e.detail.scrollTop : e.target.scrollTop, 0.1);
|
|
|
state.start = Math.floor(scrollTop / props.height);
|
|
state.start = Math.floor(scrollTop / props.height);
|
|
|
if (end.value >= state.list.length) {
|
|
if (end.value >= state.list.length) {
|
|
|
emit('scroll-bottom');
|
|
emit('scroll-bottom');
|