From 5736cbd51f1c6f8621ebf6b068d470d082a50940 Mon Sep 17 00:00:00 2001 From: dinphy Date: Sun, 25 Aug 2024 21:38:47 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E4=BC=98=E5=8C=96=E7=A7=BB=E5=8A=A8?= =?UTF-8?q?=E7=AB=AFUI=20-=20=E4=BE=A7=E8=BE=B9=E6=A0=8F=E8=8F=9C=E5=8D=95?= =?UTF-8?q?=E8=B0=83=E6=95=B4=E8=87=B3=E4=BB=8E=E5=BA=95=E9=83=A8=E6=BB=91?= =?UTF-8?q?=E5=87=BA=20-=20=E5=88=86=E7=A6=BB=E7=BD=AE=E9=A1=B6=E3=80=81?= =?UTF-8?q?=E7=BC=96=E8=BE=91=E5=92=8C=E5=88=A0=E9=99=A4=E6=93=8D=E4=BD=9C?= =?UTF-8?q?=EF=BC=8C=E7=A7=BB=E8=87=B3memo=E8=AF=A6=E6=83=85=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=EF=BC=8C=E7=82=B9=E5=87=BB=E7=BD=AE=E9=A1=B6=E5=9B=BE?= =?UTF-8?q?=E6=A0=87=E6=97=81=E7=9A=84=E5=9B=BE=E6=A0=87=E4=BB=8E=E5=BA=95?= =?UTF-8?q?=E9=83=A8=E6=BB=91=E5=87=BA=20-=20=E6=9B=B4=E6=8D=A2=E4=BA=86?= =?UTF-8?q?=E5=87=A0=E4=B8=AA=E5=9B=BE=E6=A0=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- front/components/Header.vue | 9 ++-- front/components/Memo.vue | 77 +++++++++++++++++++--------------- front/components/MobileNav.vue | 49 ++++++++++------------ front/layouts/default.vue | 6 +-- 4 files changed, 73 insertions(+), 68 deletions(-) diff --git a/front/components/Header.vue b/front/components/Header.vue index 72da86f0..f0ab9703 100644 --- a/front/components/Header.vue +++ b/front/components/Header.vue @@ -3,7 +3,7 @@
{{ item.user.nickname }} - - +
+ + + +
@@ -70,44 +73,47 @@
+ class="absolute top-[-8px] right-[32px] bg-[#4c4c4c] rounded text-white p-2">
-
+
- - -
+
{ const global = useGlobalState() +const moreToolbar = ref(false) + const showToolbar = ref(false) const toolbarRef = ref(null) const liked = ref(false) @@ -218,16 +226,19 @@ const removeMemo = async (id: number) => { } else { memoReloadEvent.emit() } - showToolbar.value = false + moreToolbar.value = false } const setPinned = async (id: number) => { await useMyFetch('/memo/setPinned?id=' + id) toast.success("操作成功!") - showToolbar.value = false - memoReloadEvent.emit() + if (isDetailPage.value) { + await navigateTo('/') + } else { + memoReloadEvent.emit() + } + moreToolbar.value = false } - const doLike = async (id: number, token: string = '') => { const likes = JSON.parse(localStorage.getItem('likeMemos') || '[]') as Array await useMyFetch(`/memo/like?id=${id}&token=${token}`) diff --git a/front/components/MobileNav.vue b/front/components/MobileNav.vue index b86e8f7a..fb98b02a 100644 --- a/front/components/MobileNav.vue +++ b/front/components/MobileNav.vue @@ -1,9 +1,16 @@