点击地方
方法 500毫秒后滚动到定位处
mounted() {
setTimeout(() => {
if (this.KaTeX parse error: Expected '}', got 'EOF' at end of input: …ClassName(this.route.query.anchor)
element[0] &&
element[0].scrollIntoView({ behavior: ‘smooth’, block: ‘start’, inline: ‘nearest’ })
}
}, 500)
}
使用处,动态class
跨页面 锚点定位
最新推荐文章于 2023-03-23 18:04:27 发布