File tree 1 file changed +10
-8
lines changed
ui/src/components/ai-chat/component/question-content
1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change 1
1
<template >
2
2
<!-- 问题内容 -->
3
3
<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" >
11
5
<div class =" text break-all pre-wrap" >
12
6
<div class =" mb-8" v-if =" document_list.length" >
13
7
<el-space wrap class =" w-full media-file-width" >
@@ -153,7 +147,15 @@ const other_list = computed(() => {
153
147
)
154
148
return startNode ?.other_list || []
155
149
})
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
+ })
157
159
function downloadFile(item : any ) {
158
160
downloadByURL (item .url , item .name )
159
161
}
You can’t perform that action at this time.
0 commit comments