Member tomasherceg commented Sep 7, 2024 To eliminate the animation, the ScrollTo method should override scroll-behavior: smooth. 👍 1 Added behavior:instant to suppress CSS smooth scroll settings 598e280 exyi approved these changes Sep 7, 2024 View reviewed changes quigamdev approved thes...
您使用的$refs.topScroll可能无法正常工作,因此最好使用window.scrollTo
我有同样的问题,smoothScrollToPosition方法解决它:
Notice:If you just need simple smooth scrolling foratags you might not need this library. Check out the nativeCSS scroll behaviorandCSS scroll margin top. View the Demo on CodePen 🎉 Getting Started|Usage|API|Noteworthy features|Browser Compatibility ...
其中ELEMENT_ID是要滚动到视图中的对象的id,在您的情况下,它通常是标题。请注意,这只在Firefox浏览...
I am using several ListView controls in my App, but the ScrollTo method is not working as aspected. When I call the method to scroll to the last item in the list, the ListView is always scrolling to the item before the last. I tried different parameters e.g. but the behavior was ...
So far I found this to be working (based on @ilyasmez solution): scrollBehavior: function (to) { if (to.hash) { setTimeout(() => { const element = document.querySelector(to.hash); window.scrollTo({ top: element ? element.offsetTop : 0, behavior: 'smooth' }) }, 500) } },...
我有同样的问题,smoothScrollToPosition方法解决它: