Skip to content

Commit 29ced42

Browse files
committed
fix(logo): When you are on other pages, click the top logo to return to the default page of Smart Question, as shown below
1 parent 1976d79 commit 29ced42

File tree

1 file changed

+30
-6
lines changed

1 file changed

+30
-6
lines changed

frontend/src/components/layout/LayoutDsl.vue

Lines changed: 30 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ const handleFoldExpand = () => {
4242
const toWorkspace = () => {
4343
router.push('/')
4444
}
45+
46+
const toChatIndex = () => {
47+
router.push('/chat/index')
48+
}
4549
const route = useRoute()
4650
const showSysmenu = computed(() => {
4751
return route.path.includes('/system')
@@ -57,17 +61,37 @@ const showSysmenu = computed(() => {
5761
width="30"
5862
height="30"
5963
:src="logo_fold_blue"
60-
style="margin: 0 0 6px 5px"
64+
@click="toChatIndex"
65+
style="margin: 0 0 6px 5px; cursor: pointer"
66+
/>
67+
<img
68+
v-else
69+
@click="toChatIndex"
70+
width="130"
71+
height="31"
72+
:src="logo_blue"
73+
style="margin-bottom: 6px; cursor: pointer"
6174
/>
62-
<img v-else width="130" height="31" :src="logo_blue" style="margin-bottom: 6px" />
6375
</template>
6476
<template v-else-if="appearanceStore.themeColor === 'custom'">
65-
<custom_small v-if="collapse" style="margin: 0 0 6px 5px"></custom_small>
66-
<LOGOCustom v-else style="margin-bottom: 6px"></LOGOCustom>
77+
<custom_small
78+
@click="toChatIndex"
79+
v-if="collapse"
80+
style="margin: 0 0 6px 5px; cursor: pointer"
81+
></custom_small>
82+
<LOGOCustom
83+
@click="toChatIndex"
84+
v-else
85+
style="margin-bottom: 6px; cursor: pointer"
86+
></LOGOCustom>
6787
</template>
6888
<template v-else>
69-
<LOGO_fold v-if="collapse" style="margin: 0 0 6px 5px"></LOGO_fold>
70-
<LOGO v-else style="margin-bottom: 6px"></LOGO>
89+
<LOGO_fold
90+
@click="toChatIndex"
91+
v-if="collapse"
92+
style="margin: 0 0 6px 5px; cursor: pointer"
93+
></LOGO_fold>
94+
<LOGO @click="toChatIndex" v-else style="margin-bottom: 6px; cursor: pointer"></LOGO>
7195
</template>
7296
<Workspace v-if="!showSysmenu" :collapse="collapse"></Workspace>
7397
<Menu :collapse="collapseCopy"></Menu>

0 commit comments

Comments
 (0)