cube-ui / question-answer

Q&A for cube-ui
16 stars 7 forks source link

使用<cube-scroll>中的scrollTo方法滚动到指定scrollHeight位置到时候,会产生滚动后又归位的情况 #85

Open jamesXG opened 4 years ago

jamesXG commented 4 years ago

使用中的scrollTo方法滚动到指定scrollHeight位置到时候,会产生滚动后又归位的情况,请问是怎么回事呢?

dolymood commented 4 years ago

给个复现demo以及步骤吧

jamesXG commented 4 years ago

给个复现demo以及步骤吧

好的,我整理下发出来

badspider7 commented 9 months ago

在滚动之前加个 this.$refs.scroll.refresh(); 就可以了

badspider7 commented 9 months ago
    this.$refs.scroll.refresh();
    this.$refs.scroll.scrollTo(0, Number(top), 0, 'ease');