|
1 | 1 | <template> |
2 | 2 | <div |
3 | | - class="chat-mobile layout-bg" |
| 3 | + class="chat-mobile layout-bg chat-background" |
4 | 4 | v-loading="loading" |
5 | 5 | :style="{ |
6 | | - '--el-color-primary': applicationDetail?.custom_theme?.theme_color, |
7 | | - '--el-color-primary-light-9': hexToRgba(applicationDetail?.custom_theme?.theme_color, 0.1), |
| 6 | + '--el-color-primary': applicationDetail?.custom_theme?.theme_color, |
| 7 | + '--el-color-primary-light-9': hexToRgba(applicationDetail?.custom_theme?.theme_color, 0.1), |
| 8 | + backgroundImage: `url(${applicationDetail?.chat_background})`, |
8 | 9 | }" |
9 | 10 | > |
10 | | - <div class="chat-embed__header" :style="customStyle"> |
| 11 | + <div class="chat-embed__header" :style="(user.isEE() || user.isPE()) && customStyle"> |
11 | 12 | <div class="flex align-center"> |
12 | | - <AppIcon iconName="app-history-outlined" style="font-size: 20px" class="ml-16" :style="{ |
13 | | - color: applicationDetail?.custom_theme?.header_font_color, |
14 | | - }" @click.prevent.stop="show = true" /> |
| 13 | + <AppIcon |
| 14 | + iconName="app-history-outlined" |
| 15 | + style="font-size: 20px" |
| 16 | + class="ml-16" |
| 17 | + :style="{ |
| 18 | + color: applicationDetail?.custom_theme?.header_font_color, |
| 19 | + }" |
| 20 | + @click.prevent.stop="show = true" |
| 21 | + /> |
15 | 22 | <div class="mr-12 ml-16 flex"> |
16 | | - <el-avatar v-if="isAppIcon(applicationDetail?.icon)" shape="square" :size="32" style="background: none"> |
| 23 | + <el-avatar |
| 24 | + v-if="isAppIcon(applicationDetail?.icon)" |
| 25 | + shape="square" |
| 26 | + :size="32" |
| 27 | + style="background: none" |
| 28 | + > |
17 | 29 | <img :src="applicationDetail?.icon" alt="" /> |
18 | 30 | </el-avatar> |
19 | 31 | <LogoIcon v-else height="32px" /> |
|
46 | 58 | </AiChat> |
47 | 59 | </div> |
48 | 60 |
|
49 | | - <el-drawer v-model="show" :with-header="false" class="left-drawer" direction="ltr" :size="280"> |
| 61 | + <el-drawer |
| 62 | + v-model="show" |
| 63 | + :with-header="false" |
| 64 | + class="left-drawer" |
| 65 | + direction="ltr" |
| 66 | + :size="280" |
| 67 | + > |
50 | 68 | <div> |
51 | 69 | <div class="flex align-center mb-16"> |
52 | 70 | <div class="flex mr-8"> |
53 | | - <el-avatar v-if="isAppIcon(applicationDetail?.icon)" shape="square" :size="32" style="background: none"> |
| 71 | + <el-avatar |
| 72 | + v-if="isAppIcon(applicationDetail?.icon)" |
| 73 | + shape="square" |
| 74 | + :size="32" |
| 75 | + style="background: none" |
| 76 | + > |
54 | 77 | <img :src="applicationDetail?.icon" alt="" /> |
55 | 78 | </el-avatar> |
56 | 79 | <LogoIcon v-else height="32px" /> |
|
67 | 90 | <div class="left-height pt-0"> |
68 | 91 | <el-scrollbar> |
69 | 92 | <div> |
70 | | - <common-list :style="{ '--el-color-primary': applicationDetail?.custom_theme?.theme_color }" |
71 | | - :data="chatLogData" v-loading="left_loading" :defaultActive="currentChatId" @click="clickListHandle" |
72 | | - @mouseenter="mouseenter" @mouseleave="mouseId = ''"> |
| 93 | + <common-list |
| 94 | + :style="{ '--el-color-primary': applicationDetail?.custom_theme?.theme_color }" |
| 95 | + :data="chatLogData" |
| 96 | + v-loading="left_loading" |
| 97 | + :defaultActive="currentChatId" |
| 98 | + @click="clickListHandle" |
| 99 | + @mouseenter="mouseenter" |
| 100 | + @mouseleave="mouseId = ''" |
| 101 | + > |
73 | 102 | <template #default="{ row }"> |
74 | 103 | <div class="flex-between"> |
75 | | - <ReadWrite @change="editName($event, row)" :data="row.abstract" trigger="manual" |
76 | | - :write="row.writeStatus" @close="closeWrite(row)" :maxlength="1024" /> |
77 | | - <div @click.stop v-if="mouseId === row.id && row.id !== 'new' && !row.writeStatus" class="flex"> |
| 104 | + <ReadWrite |
| 105 | + @change="editName($event, row)" |
| 106 | + :data="row.abstract" |
| 107 | + trigger="manual" |
| 108 | + :write="row.writeStatus" |
| 109 | + @close="closeWrite(row)" |
| 110 | + :maxlength="1024" |
| 111 | + /> |
| 112 | + <div |
| 113 | + @click.stop |
| 114 | + v-if="mouseId === row.id && row.id !== 'new' && !row.writeStatus" |
| 115 | + class="flex" |
| 116 | + > |
78 | 117 | <el-button style="padding: 0" link @click.stop="openWrite(row)"> |
79 | 118 | <el-icon> |
80 | 119 | <EditPen /> |
|
104 | 143 | <el-avatar :size="32"> |
105 | 144 | <img src="@/assets/user-icon.svg" style="width: 54%" alt="" /> |
106 | 145 | </el-avatar> |
107 | | - <span v-if="chatUser.chat_profile?.authentication" class="ml-8 color-text-primary">{{ chatUser.chatUserProfile?.nick_name }}</span> |
| 146 | + <span v-if="chatUser.chat_profile?.authentication" class="ml-8 color-text-primary">{{ |
| 147 | + chatUser.chatUserProfile?.nick_name |
| 148 | + }}</span> |
108 | 149 | </div> |
109 | 150 | </el-drawer> |
110 | 151 | </div> |
@@ -299,8 +340,8 @@ onMounted(() => { |
299 | 340 | }) |
300 | 341 |
|
301 | 342 | const userCenterDrawerShow = ref(false) |
302 | | -function toUserCenter () { |
303 | | - if(!chatUser.chat_profile?.authentication) return |
| 343 | +function toUserCenter() { |
| 344 | + if (!chatUser.chat_profile?.authentication) return |
304 | 345 | userCenterDrawerShow.value = true |
305 | 346 | } |
306 | 347 | </script> |
@@ -332,7 +373,9 @@ function toUserCenter () { |
332 | 373 | .left-drawer { |
333 | 374 | .el-drawer__body { |
334 | 375 | padding: 16px; |
335 | | - background: linear-gradient(187.61deg, rgba(235, 241, 255, 0.5) 39.6%, rgba(231, 249, 255, 0.5) 94.3%), #eef1f4; |
| 376 | + background: |
| 377 | + linear-gradient(187.61deg, rgba(235, 241, 255, 0.5) 39.6%, rgba(231, 249, 255, 0.5) 94.3%), |
| 378 | + #eef1f4; |
336 | 379 | overflow: hidden; |
337 | 380 |
|
338 | 381 | .add-button { |
|
0 commit comments