From 804ca96528c7397e3577f26d7827fca9b54b4e0c Mon Sep 17 00:00:00 2001 From: wally <18603454788@163.com> Date: Tue, 25 Jan 2022 15:18:17 +0800 Subject: [PATCH 1/2] =?UTF-8?q?refact:=20=E8=B5=84=E6=BA=90=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E7=95=8C=E9=9D=A2=E6=A0=B9=E6=8D=AEhash=E6=BB=9A?= =?UTF-8?q?=E5=8A=A8=E5=88=B0=E7=9B=AE=E6=A0=87=E4=BD=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package-lock.json | 2 +- pages/index.vue | 154 ++++++++++++++++++++++------------------------ 2 files changed, 75 insertions(+), 81 deletions(-) diff --git a/package-lock.json b/package-lock.json index c409a7f..96dcf1a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,5 +1,5 @@ { - "name": "finance", + "name": "plugin-finance", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/pages/index.vue b/pages/index.vue index 5c07149..be5de15 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -1,48 +1,52 @@ + 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 2/2] =?UTF-8?q?style:=20=E7=BB=86=E8=8A=82=E8=B0=83?= =?UTF-8?q?=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;