页面跳转指定位置
官方文档
https://developer.mozilla.org/zhCN/docs/Web/API/Element/scrollIntoView
1,给页面DOM动态添加 ID
2,然后利用scrollIntoView 跳转指定位置
const elementId = arr.substring(14) // 刷新或者从其他路由跳来的ID
const element: HTMLElement | null = document.getElementById(elementId) // TS语法比较严格需要加HTMLElement | null
element?.scrollIntoView()