mirror of
https://github.com/youzan/vant.git
synced 2026-04-09 04:00:11 +08: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