瀏覽代碼

feat: logo增加点击

lixuan 3 周之前
父節點
當前提交
147d93c2ff
共有 1 個文件被更改,包括 12 次插入1 次删除
  1. 12 1
      apps/web-velofex/src/layouts/header/header.vue

+ 12 - 1
apps/web-velofex/src/layouts/header/header.vue

@@ -74,6 +74,10 @@ function handleClick(path: string) {
   window.open(path, '_blank');
 }
 
+function handleHome() {
+  router.push('/');
+}
+
 watch(
   () => isLogin.value,
   (newValue) => {
@@ -90,7 +94,14 @@ watch(
 
 <template>
   <div class="mb-[32px] flex items-center justify-between">
-    <img :src="Logo" alt="logo" class="logo" height="30px" width="138px" />
+    <img
+      :src="Logo"
+      alt="logo"
+      class="logo"
+      height="30px"
+      width="138px"
+      @click="handleHome"
+    />
     <ul class="menu flex gap-[60px] text-xs">
       <li
         v-for="menuItem in menus"