feat: allow logo to refresh home page

This commit is contained in:
Tim
2025-08-14 11:00:17 +08:00
parent 8c1a7afc6e
commit 928dbd73b5
2 changed files with 18 additions and 2 deletions

View File

@@ -75,7 +75,11 @@ const userMenu = ref(null)
const menuBtn = ref(null)
const goToHome = async () => {
await navigateTo('/', { replace: true })
if (router.currentRoute.value.fullPath === '/') {
window.dispatchEvent(new Event('refresh-home'))
} else {
await navigateTo('/', { replace: true })
}
}
const search = () => {
showSearch.value = true