Browse Source

fix(list v3): 虚拟列表在ios手机上,滚动条滚动到顶部会出现白屏。 #2031

suzigang 3 years ago
parent
commit
86986eac23
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/packages/__VUE/list/index.taro.vue

+ 1 - 1
src/packages/__VUE/list/index.taro.vue

@@ -84,7 +84,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');
         emit('scroll');