File tree Expand file tree Collapse file tree 2 files changed +16
-4
lines changed
Expand file tree Collapse file tree 2 files changed +16
-4
lines changed Original file line number Diff line number Diff line change 1313 @click =" $emit('close')"
1414 class =" cursor-pointer"
1515 :name =" hamburgerIcon" />
16- <img src =" /MainLogo.svg" />
16+ <button @click =" onLogoClick" >
17+ <img src =" /MainLogo.svg" />
18+ </button >
1719 </div >
1820 <div class =" flex-1 overflow-y-auto flex flex-col gap-6" >
1921 <div
6567</template >
6668
6769<script setup lang="ts">
68- import { useRoute } from ' vue-router'
70+ import { useRoute , useRouter } from ' vue-router'
6971import { computed } from ' vue'
7072import CommonIcons from ' ../common/CommonIcons.vue'
7173import { hamburgerIcon } from ' @/constants/iconPath'
@@ -78,9 +80,10 @@ const memberStore = useMemberStore()
7880const { info } = storeToRefs (memberStore )
7981
8082const { isOpen } = defineProps <{ isOpen: boolean }>()
81- defineEmits ([' close' ])
83+ const emit = defineEmits ([' close' ])
8284
8385const route = useRoute ()
86+ const router = useRouter ()
8487
8588const role = computed (() => info .value .role )
8689const name = computed (() => info .value .name )
@@ -93,4 +96,9 @@ const filteredMenu = computed(() => {
9396 ? SIDE_MANAGER_MENU
9497 : SIDE_ADMIN_MENU
9598})
99+
100+ const onLogoClick = () => {
101+ emit (' close' )
102+ router .push (' /' )
103+ }
96104 </script >
Original file line number Diff line number Diff line change 88 @click =" onOpenSide" >
99 <CommonIcons :name =" hamburgerIcon" />
1010 </button >
11- <img src =" /MainLogo.svg" />
11+ <button @click =" router.push('/')" >
12+ <img src =" /MainLogo.svg" />
13+ </button >
1214 </div >
1315 <div
1416 v-if =" isLogined"
@@ -63,9 +65,11 @@ import ProfileModal from './ProfileModal.vue'
6365import { getNotifiCount } from ' @/api/common'
6466import ImageContainer from ' ../common/ImageContainer.vue'
6567import { useOutsideClick } from ' @/hooks/useOutsideClick'
68+ import { useRouter } from ' vue-router'
6669
6770const memberStore = useMemberStore ()
6871const { isLogined, info } = storeToRefs (memberStore )
72+ const router = useRouter ()
6973
7074onMounted (async () => {
7175 if (isLogined .value ) {
You can’t perform that action at this time.
0 commit comments