mirror of
https://github.com/LifeArchiveProject/WeChatDataAnalysis.git
synced 2026-02-19 22:30:49 +08:00
improvement(wrapped): 增加返回聊天页按钮
- Wrapped 页左上角新增返回按钮,快速回到 /chat
This commit is contained in:
@@ -13,6 +13,27 @@
|
|||||||
<!-- 左上角:刷新 + 复古模式开关 -->
|
<!-- 左上角:刷新 + 复古模式开关 -->
|
||||||
<div class="absolute top-6 left-6 z-20 select-none">
|
<div class="absolute top-6 left-6 z-20 select-none">
|
||||||
<div class="flex items-center gap-3">
|
<div class="flex items-center gap-3">
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
class="pointer-events-auto inline-flex items-center justify-center w-9 h-9 rounded-full bg-transparent text-[#07C160] hover:bg-[#07C160]/10 focus:outline-none focus-visible:ring-2 focus-visible:ring-[#07C160]/30 transition"
|
||||||
|
aria-label="返回上一级"
|
||||||
|
title="返回上一级"
|
||||||
|
@click="goBack"
|
||||||
|
>
|
||||||
|
<svg
|
||||||
|
class="w-4 h-4"
|
||||||
|
viewBox="0 0 24 24"
|
||||||
|
fill="none"
|
||||||
|
stroke="currentColor"
|
||||||
|
stroke-width="2"
|
||||||
|
stroke-linecap="round"
|
||||||
|
stroke-linejoin="round"
|
||||||
|
aria-hidden="true"
|
||||||
|
>
|
||||||
|
<path d="M10 19l-7-7m0 0l7-7m-7 7h18" />
|
||||||
|
</svg>
|
||||||
|
</button>
|
||||||
|
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
class="pointer-events-auto inline-flex items-center justify-center w-9 h-9 rounded-full bg-transparent text-[#07C160] hover:bg-[#07C160]/10 focus:outline-none focus-visible:ring-2 focus-visible:ring-[#07C160]/30 disabled:opacity-60 disabled:cursor-not-allowed transition"
|
class="pointer-events-auto inline-flex items-center justify-center w-9 h-9 rounded-full bg-transparent text-[#07C160] hover:bg-[#07C160]/10 focus:outline-none focus-visible:ring-2 focus-visible:ring-[#07C160]/30 disabled:opacity-60 disabled:cursor-not-allowed transition"
|
||||||
@@ -291,6 +312,10 @@ const goTo = (i) => {
|
|||||||
activeIndex.value = clampIndex(i)
|
activeIndex.value = clampIndex(i)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const goBack = async () => {
|
||||||
|
await router.push('/chat')
|
||||||
|
}
|
||||||
|
|
||||||
const next = () => goTo(activeIndex.value + 1)
|
const next = () => goTo(activeIndex.value + 1)
|
||||||
const prev = () => goTo(activeIndex.value - 1)
|
const prev = () => goTo(activeIndex.value - 1)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user