Skip to content

Commit 4df183c

Browse files
authored
perf: optimize embed mode (#2331)
1 parent 097a24f commit 4df183c

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

ui/src/views/chat/embed/index.vue

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<template>
22
<div
33
class="chat-embed layout-bg"
4+
:class="{ 'chat-embed--popup': isPopup }"
45
v-loading="loading"
56
:style="{
67
'--el-color-primary': applicationDetail?.custom_theme?.theme_color,
@@ -116,11 +117,16 @@
116117
</template>
117118
<script setup lang="ts">
118119
import { ref, onMounted, reactive, nextTick, computed } from 'vue'
120+
import { useRoute } from 'vue-router'
119121
import { isAppIcon } from '@/utils/application'
120122
import { hexToRgba } from '@/utils/theme'
121123
import useStore from '@/stores'
122124
const { user, log } = useStore()
125+
const route = useRoute()
123126
127+
const isPopup = computed(() => {
128+
return route.query.popup !== 'no'
129+
})
124130
const AiChatRef = ref()
125131
const loading = ref(false)
126132
const left_loading = ref(false)
@@ -303,9 +309,14 @@ onMounted(() => {
303309
z-index: 2009;
304310
position: absolute;
305311
top: 16px;
306-
right: 85px;
312+
right: 16px;
307313
font-size: 22px;
308314
}
315+
&.chat-embed--popup{
316+
.chat-popover-button {
317+
right: 85px;
318+
}
319+
}
309320
.chat-popover-mask {
310321
background-color: var(--el-overlay-color-lighter);
311322
bottom: 0;

0 commit comments

Comments
 (0)