|
@ -60,11 +60,11 @@ import { ref, onMounted, nextTick } from 'vue'; |
|
|
const active = ref(0); |
|
|
const active = ref(0); |
|
|
|
|
|
|
|
|
onMounted(async () => { |
|
|
onMounted(async () => { |
|
|
scrollToHashElement(); |
|
|
scrollToElementByHash(); |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
// 根据hash值跳转到指定位置 |
|
|
// 根据hash值跳转到指定位置 |
|
|
async function scrollToHashElement() { |
|
|
async function scrollToElementByHash() { |
|
|
await nextTick(); |
|
|
await nextTick(); |
|
|
const hash = window.location.hash; |
|
|
const hash = window.location.hash; |
|
|
if (!hash) return; |
|
|
if (!hash) return; |
|
|