perf: 优化会话框自适应宽度问题

This commit is contained in:
wangdan-fit2cloud 2024-09-26 10:55:09 +08:00
parent 95584496fc
commit d0e67d2983
3 changed files with 12 additions and 2 deletions

View File

@ -1,7 +1,7 @@
<template> <template>
<div ref="aiChatRef" class="ai-chat" :class="log ? 'chart-log' : ''"> <div ref="aiChatRef" class="ai-chat" :class="log ? 'chart-log' : ''">
<div <div
v-if="inputFieldList.length > 0 || (debug && apiInputFieldList.length > 0)" v-if="(inputFieldList.length > 0 || (debug && apiInputFieldList.length > 0)) && !log"
class="mb-16" class="mb-16"
style="padding: 0 24px" style="padding: 0 24px"
> >
@ -1098,4 +1098,10 @@ defineExpose({
max-width: 80%; max-width: 80%;
margin: 0 auto; margin: 0 auto;
} }
@media only screen and (max-width: 1000px) {
.chat-width {
max-width: 100% !important;
margin: 0 auto;
}
}
</style> </style>

View File

@ -327,5 +327,9 @@ onBeforeUnmount(() => {
bottom: 0 !important; bottom: 0 !important;
right: 0 !important; right: 0 !important;
} }
.chat-width {
max-width: 100% !important;
margin: 0 auto;
}
} }
</style> </style>

View File

@ -120,7 +120,7 @@ onMounted(() => {
} }
} }
.chat-width { .chat-width {
max-width: 80%; // max-width: 80%;
margin: 0 auto; margin: 0 auto;
} }
} }