mirror of
https://github.com/youzan/vant.git
synced 2025-10-17 08:37:23 +00:00
chore(cli): scroll to anchor immediately (#6323)
This commit is contained in:
@@ -4,9 +4,7 @@ export function scrollToAnchor(selector) {
|
||||
const timer = setInterval(() => {
|
||||
const el = document.querySelector(selector);
|
||||
if (el) {
|
||||
el.scrollIntoView({
|
||||
behavior: 'smooth',
|
||||
});
|
||||
el.scrollIntoView();
|
||||
clearInterval(timer);
|
||||
} else {
|
||||
count++;
|
||||
|
Reference in New Issue
Block a user