mirror of
https://github.com/youzan/vant.git
synced 2025-10-19 10:07:07 +00:00
fix(cli): fix anchor
This commit is contained in:
@@ -2,7 +2,7 @@ export function scrollToAnchor(selector) {
|
||||
let count = 0;
|
||||
|
||||
const timer = setInterval(() => {
|
||||
const el = document.querySelector(selector);
|
||||
const el = document.querySelector('#' + selector);
|
||||
if (el) {
|
||||
el.scrollIntoView();
|
||||
clearInterval(timer);
|
||||
|
Reference in New Issue
Block a user