mirror of
https://github.com/youzan/vant.git
synced 2025-10-19 10:07:07 +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 timer = setInterval(() => {
|
||||||
const el = document.querySelector(selector);
|
const el = document.querySelector(selector);
|
||||||
if (el) {
|
if (el) {
|
||||||
el.scrollIntoView({
|
el.scrollIntoView();
|
||||||
behavior: 'smooth',
|
|
||||||
});
|
|
||||||
clearInterval(timer);
|
clearInterval(timer);
|
||||||
} else {
|
} else {
|
||||||
count++;
|
count++;
|
||||||
|
Reference in New Issue
Block a user