From 1ec9334d34a03dd6f4b72c1865767a8590d7f84e Mon Sep 17 00:00:00 2001 From: wally <18603454788@163.com> Date: Tue, 25 Jan 2022 15:24:10 +0800 Subject: [PATCH] =?UTF-8?q?style:=20=E7=BB=86=E8=8A=82=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/index.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pages/index.vue b/pages/index.vue index be5de15..61da5f7 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -60,11 +60,11 @@ import { ref, onMounted, nextTick } from 'vue'; const active = ref(0); onMounted(async () => { - scrollToHashElement(); + scrollToElementByHash(); }); // 根据hash值跳转到指定位置 -async function scrollToHashElement() { +async function scrollToElementByHash() { await nextTick(); const hash = window.location.hash; if (!hash) return;