JS function anti-shake
anchor scrolling:
- The parameter selector is the ID value of the target DOM
- selectorNow is the real DOM node obtained according to the ID, the content is as shown in the figure below
goAnchor(selector) {
let selectorNow = this.$refs.wordcard[selector].$el;
debugger
selectorNow.scrollIntoView({
behavior: "smooth", // 平滑过渡
block: "start" // 上边框与视窗顶部平齐。默认值
});
},