mirror of
https://github.com/nagisa77/OpenIsle.git
synced 2026-03-04 02:50:59 +08:00
Merge pull request #540 from nagisa77/codex/fix-logo-click-triggering-window.reload
This commit is contained in:
@@ -8,7 +8,7 @@
|
|||||||
</button>
|
</button>
|
||||||
<span v-if="isMobile && unreadCount > 0" class="menu-unread-dot"></span>
|
<span v-if="isMobile && unreadCount > 0" class="menu-unread-dot"></span>
|
||||||
</div>
|
</div>
|
||||||
<NuxtLink class="logo-container" to="/" @click.prevent="goToHome">
|
<NuxtLink class="logo-container" to="/" replace @click="handleLogoClick">
|
||||||
<img
|
<img
|
||||||
alt="OpenIsle"
|
alt="OpenIsle"
|
||||||
src="https://openisle-1307107697.cos.ap-guangzhou.myqcloud.com/assert/image.png"
|
src="https://openisle-1307107697.cos.ap-guangzhou.myqcloud.com/assert/image.png"
|
||||||
@@ -74,11 +74,10 @@ const searchDropdown = ref(null)
|
|||||||
const userMenu = ref(null)
|
const userMenu = ref(null)
|
||||||
const menuBtn = ref(null)
|
const menuBtn = ref(null)
|
||||||
|
|
||||||
const goToHome = async () => {
|
const handleLogoClick = (event) => {
|
||||||
if (router.currentRoute.value.fullPath === '/') {
|
if (router.currentRoute.value.fullPath === '/') {
|
||||||
|
event.preventDefault()
|
||||||
window.dispatchEvent(new Event('refresh-home'))
|
window.dispatchEvent(new Event('refresh-home'))
|
||||||
} else {
|
|
||||||
await navigateTo('/', { replace: true })
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const search = () => {
|
const search = () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user