VUE mobile terminal uses overflow-auto scroll bar pit

Solve the problem that the scroll bar always appears at the bottom after sliding once

Before closing the modal box, operate the native dom
var box = document.querySelector('div')
box .scrollTop=0 to
set the position of the scroll bar to 0,
so that each time another piece of data is reopened, the position of the scroll bar Are at the top of the initial position

Guess you like

Origin blog.csdn.net/weixin_45108907/article/details/90786943