perf: optimize embed mode (#2331)
This commit is contained in:
parent
097a24fbbd
commit
4df183c5a3
@ -1,6 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div
|
<div
|
||||||
class="chat-embed layout-bg"
|
class="chat-embed layout-bg"
|
||||||
|
:class="{ 'chat-embed--popup': isPopup }"
|
||||||
v-loading="loading"
|
v-loading="loading"
|
||||||
:style="{
|
:style="{
|
||||||
'--el-color-primary': applicationDetail?.custom_theme?.theme_color,
|
'--el-color-primary': applicationDetail?.custom_theme?.theme_color,
|
||||||
@ -116,11 +117,16 @@
|
|||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted, reactive, nextTick, computed } from 'vue'
|
import { ref, onMounted, reactive, nextTick, computed } from 'vue'
|
||||||
|
import { useRoute } from 'vue-router'
|
||||||
import { isAppIcon } from '@/utils/application'
|
import { isAppIcon } from '@/utils/application'
|
||||||
import { hexToRgba } from '@/utils/theme'
|
import { hexToRgba } from '@/utils/theme'
|
||||||
import useStore from '@/stores'
|
import useStore from '@/stores'
|
||||||
const { user, log } = useStore()
|
const { user, log } = useStore()
|
||||||
|
const route = useRoute()
|
||||||
|
|
||||||
|
const isPopup = computed(() => {
|
||||||
|
return route.query.popup !== 'no'
|
||||||
|
})
|
||||||
const AiChatRef = ref()
|
const AiChatRef = ref()
|
||||||
const loading = ref(false)
|
const loading = ref(false)
|
||||||
const left_loading = ref(false)
|
const left_loading = ref(false)
|
||||||
@ -303,9 +309,14 @@ onMounted(() => {
|
|||||||
z-index: 2009;
|
z-index: 2009;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 16px;
|
top: 16px;
|
||||||
right: 85px;
|
right: 16px;
|
||||||
font-size: 22px;
|
font-size: 22px;
|
||||||
}
|
}
|
||||||
|
&.chat-embed--popup{
|
||||||
|
.chat-popover-button {
|
||||||
|
right: 85px;
|
||||||
|
}
|
||||||
|
}
|
||||||
.chat-popover-mask {
|
.chat-popover-mask {
|
||||||
background-color: var(--el-overlay-color-lighter);
|
background-color: var(--el-overlay-color-lighter);
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user