11< script lang = "ts" setup >
22import { ref , computed , onUnmounted } from 'vue'
33import Menu from './Menu.vue'
4- import LOGOCustom from ' @/assets/svg/LOGO-custom.svg'
54import custom_small from '@/assets/svg/logo-custom_small.svg'
65import Workspace from './Workspace.vue'
76import Person from './Person.vue'
8- import LOGO from ' @/assets/LOGO.svg'
97import LOGO_fold from '@/assets/LOGO-fold.svg'
108import icon_moments_categories_outlined from '@/assets/svg/icon_moments-categories_outlined.svg'
119import icon_side_fold_outlined from '@/assets/svg/icon_side-fold_outlined.svg'
1210import icon_side_expand_outlined from '@/assets/svg/icon_side-expand_outlined.svg'
1311import { useRoute , useRouter } from 'vue-router'
1412import { useAppearanceStoreWithOut } from '@/stores/appearance'
15- import logo_blue from ' @/assets/blue/LOGO-blue.png'
16- import logo_fold_blue from ' @/assets/blue/LOGO-head_blue.png'
1713import { useEmitt } from '@/utils/useEmitt'
1814
1915const router = useRouter ()
@@ -24,6 +20,9 @@ let time: any
2420onUnmounted (() = > {
2521 clearTimeout (time )
2622})
23+ const loginBg = computed (() = > {
24+ return appearanceStore .getLogin
25+ })
2726const handleCollapseChange = (val : any = true ) = > {
2827 collapseCopy .value = val
2928 clearTimeout (time )
@@ -61,8 +60,18 @@ const showSysmenu = computed(() => {
6160 < div class = "left-side" :class = "collapse && 'left-side-collapse'" >
6261 < template v - if = "showSysmenu" >
6362 < div @click = "toUserIndex" class = "sys-management" >
63+ < img
64+ :style = "{ marginLeft: collapse ? '5px' : 0 }"
65+ @click = "toChatIndex"
66+ height = "30"
67+ width = "30"
68+ v - if = "loginBg"
69+ :src = "loginBg"
70+ :class = "!collapse && 'collapse-icon'"
71+ alt = ""
72+ / >
6473 < custom_small
65- v-if =" appearanceStore.themeColor !== 'default'"
74+ v - else - if = "appearanceStore.themeColor !== 'default'"
6675 :style = "{ marginLeft: collapse ? '5px' : 0 }"
6776 :class = "!collapse && 'collapse-icon'"
6877 > < / custom_small >
@@ -77,41 +86,109 @@ const showSysmenu = computed(() => {
7786 < template v - else >
7887 < template v - if = "appearanceStore.isBlue" >
7988 < img
80- v-if =" collapse"
81- width =" 30"
82- height =" 30"
83- :src =" logo_fold_blue"
8489 style = "margin: 0 0 6px 5px; cursor: pointer"
8590 @click = "toChatIndex"
91+ height = "30"
92+ width = "30"
93+ v - if = "loginBg && collapse"
94+ :src = "loginBg"
95+ alt = ""
8696 / >
97+ < div v - else - if = "loginBg && !collapse" class = "default-sqlbot" >
98+ < img
99+ @click = "toChatIndex"
100+ height = "30"
101+ width = "30"
102+ :src = "loginBg"
103+ alt = ""
104+ class = "collapse-icon"
105+ / >
106+ < span style = "max-width: 150px" :title = "appearanceStore.name" class = "ellipsis" > {{
107+ appearanceStore .name
108+ }}< / span >
109+ < / div >
110+ < custom_small
111+ v - else - if = "collapse"
112+ :style = "{ marginLeft: collapse ? '5px' : 0 }"
113+ :class = "!collapse && 'collapse-icon'"
114+ > < / custom_small >
115+
116+ < div v - else class = "default-sqlbot" >
117+ < custom_small class = "collapse-icon" > < / custom_small >
118+ < span style = "max-width: 150px" :title = "appearanceStore.name" class = "ellipsis" > {{
119+ appearanceStore .name
120+ }}< / span >
121+ < / div >
122+ < / template >
123+ < template v - else - if = "appearanceStore.themeColor === 'custom'" >
87124 < img
88- v-else
89- width =" 130"
90- height =" 31"
91- :src =" logo_blue"
92- style =" margin-bottom : 6px ; cursor : pointer "
125+ style = "margin: 0 0 6px 5px; cursor: pointer"
93126 @click = "toChatIndex"
127+ height = "30"
128+ width = "30"
129+ v - if = "loginBg && collapse"
130+ :src = "loginBg"
131+ alt = ""
94132 / >
95- </template >
96- <template v-else-if =" appearanceStore .themeColor === ' custom' " >
133+ < div v - else - if = "loginBg && !collapse" class = "default-sqlbot" >
134+ < img
135+ @click = "toChatIndex"
136+ height = "30"
137+ width = "30"
138+ :src = "loginBg"
139+ alt = ""
140+ class = "collapse-icon"
141+ / >
142+ < span style = "max-width: 150px" :title = "appearanceStore.name" class = "ellipsis" > {{
143+ appearanceStore .name
144+ }}< / span >
145+ < / div >
97146 < custom_small
98- v-if =" collapse"
147+ v - else - if = "collapse"
99148 style = "margin: 0 0 6px 5px; cursor: pointer"
100149 @click = "toChatIndex"
101150 > < / custom_small >
102- <LOGOCustom
103- v-else
104- style =" margin-bottom : 6px ; cursor : pointer "
105- @click =" toChatIndex"
106- ></LOGOCustom >
151+ < div v - else class = "default-sqlbot" >
152+ < custom_small class = "collapse-icon" > < / custom_small >
153+ < span style = "max-width: 150px" :title = "appearanceStore.name" class = "ellipsis" > {{
154+ appearanceStore .name
155+ }}< / span >
156+ < / div >
107157 < / template >
108158 < template v - else >
159+ < img
160+ style = "margin: 0 0 6px 5px; cursor: pointer"
161+ @click = "toChatIndex"
162+ height = "30"
163+ width = "30"
164+ v - if = "loginBg && collapse"
165+ :src = "loginBg"
166+ alt = ""
167+ / >
168+ < div v - else - if = "loginBg && !collapse" class = "default-sqlbot" >
169+ < img
170+ @click = "toChatIndex"
171+ height = "30"
172+ width = "30"
173+ :src = "loginBg"
174+ alt = ""
175+ class = "collapse-icon"
176+ / >
177+ < span style = "max-width: 150px" :title = "appearanceStore.name" class = "ellipsis" > {{
178+ appearanceStore .name
179+ }}< / span >
180+ < / div >
109181 < LOGO_fold
110- v-if =" collapse"
182+ v - else - if = "collapse"
111183 style = "margin: 0 0 6px 5px; cursor: pointer"
112184 @click = "toChatIndex"
113185 > < / LOGO_fold >
114- <LOGO v-else style =" margin-bottom : 6px ; cursor : pointer " @click =" toChatIndex" ></LOGO >
186+ < div v - else class = "default-sqlbot" >
187+ < LOGO_fold class = "collapse-icon" @click = "toChatIndex" > < / LOGO_fold >
188+ < span style = "max-width: 150px" :title = "appearanceStore.name" class = "ellipsis" > {{
189+ appearanceStore .name
190+ }}< / span >
191+ < / div >
115192 < / template >
116193 < / template >
117194 < Workspace v - if = "!showSysmenu" :collapse = "collapse" > < / Workspace >
@@ -168,6 +245,18 @@ const showSysmenu = computed(() => {
168245 position : relative ;
169246 min - width : 240 px ;
170247
248+ .default - sqlbot {
249+ display : flex ;
250+ align - items : center ;
251+ font - weight : 500 ;
252+ font - size : 16 px ;
253+ cursor : pointer ;
254+ margin - bottom : 12 px ;
255+ .collapse - icon {
256+ margin - right : 8 px ;
257+ }
258+ }
259+
171260 .sys - management {
172261 display : flex ;
173262 align - items : center ;
0 commit comments