Skip to content

Commit 7e4b147

Browse files
fix: upload style
1 parent 9cd0820 commit 7e4b147

File tree

1 file changed

+10
-8
lines changed
  • ui/src/components/ai-chat/component/question-content

1 file changed

+10
-8
lines changed

ui/src/components/ai-chat/component/question-content/index.vue

+10-8
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,7 @@
11
<template>
22
<!-- 问题内容 -->
33
<div class="question-content item-content mb-16 lighter">
4-
<div
5-
class="content p-12-16 border-r-8"
6-
:class="
7-
(document_list.length >= 2 ? 'media_2' : `media_${document_list.length}`) ||
8-
(other_list.length >= 2 ? 'media_2' : `media_${other_list.length}`)
9-
"
10-
>
4+
<div class="content p-12-16 border-r-8" :class="getClassName">
115
<div class="text break-all pre-wrap">
126
<div class="mb-8" v-if="document_list.length">
137
<el-space wrap class="w-full media-file-width">
@@ -153,7 +147,15 @@ const other_list = computed(() => {
153147
)
154148
return startNode?.other_list || []
155149
})
156-
150+
const getClassName = computed(() => {
151+
return document_list.value.length >= 2 || other_list.value.length >= 2
152+
? 'media_2'
153+
: document_list.value.length
154+
? `media_${document_list.value.length}`
155+
: other_list.value.length
156+
? `media_${other_list.value.length}`
157+
: `media_0`
158+
})
157159
function downloadFile(item: any) {
158160
downloadByURL(item.url, item.name)
159161
}

0 commit comments

Comments
 (0)