problem description
Therequirement is to click the button to add a new element to the scrolling area and scroll to the new element location. I am currently using scroll-view and have set the scroll-into-view property. If you click too fast, the page will have a stutter effect. May I ask how to solve this situation or is there any other means to achieve it?
related codes
/ / Please paste the code text below (do not replace the code with pictures)
<scroll-view scroll-into-view="{{target}}"></scroll-view>
fn() {
this.setData({target: xxx})
}
every time the button is clicked, fn () is called and the value of target is set. This can be achieved, but if you click quickly, you will get stuck
.