|
@@ -10,18 +10,20 @@ export default defineComponent({
|
|
|
let oldCategoryId= ref()
|
|
|
|
|
|
console.log(store.state.columnTypes)
|
|
|
- if (store.state.route.hash) {
|
|
|
+ if (store.state.route.query.type) {
|
|
|
setTimeout(()=>{
|
|
|
-
|
|
|
var ids = store.state.columnTypes.filter(item => item.title == '联系我们');
|
|
|
console.log(ids[0].id)
|
|
|
|
|
|
var ahchorEle = ids[0].id
|
|
|
- console.log(document.getElementById(ahchorEle))
|
|
|
- document.getElementById(ahchorEle).scrollIntoView({
|
|
|
- behavior: 'smooth' // 可选,平滑滚动效果
|
|
|
- })
|
|
|
- },1)
|
|
|
+ if(typeof window !== 'undefined' && typeof window.globalThis.addEventListener === 'function') {
|
|
|
+ document.getElementById(ahchorEle).scrollIntoView({
|
|
|
+ behavior: 'smooth' // 可选,平滑滚动效果
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ },10)
|
|
|
}
|
|
|
|
|
|
|