question-answer icon indicating copy to clipboard operation
question-answer copied to clipboard

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

Open jamesXG opened this issue 5 years ago • 4 comments

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

jamesXG avatar Jul 18 '19 03:07 jamesXG

给个复现demo以及步骤吧

dolymood avatar Jul 19 '19 03:07 dolymood

给个复现demo以及步骤吧

好的,我整理下发出来

jamesXG avatar Jul 19 '19 03:07 jamesXG

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

badspider7 avatar Oct 09 '23 03:10 badspider7

    this.$refs.scroll.refresh();
    this.$refs.scroll.scrollTo(0, Number(top), 0, 'ease');

badspider7 avatar Oct 09 '23 03:10 badspider7