Compare commits

...

2 Commits

View File

@@ -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 = () => {