Skip to content

Commit caa02c5

Browse files
fix: 优化文件状态提示样式
1 parent 5eaafb0 commit caa02c5

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

ui/src/views/document/component/Status.vue

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
<template>
2-
<el-popover v-model:visible="visible" placement="top" :width="450" trigger="hover">
2+
<el-popover
3+
v-model:visible="visible"
4+
placement="top"
5+
trigger="hover"
6+
:popper-style="{ width: 'auto' }"
7+
>
38
<template #default
49
><StatusTable
510
v-if="visible"
@@ -48,13 +53,16 @@ const checkList: Array<string> = [
4853
State.SUCCESS
4954
]
5055
const aggStatus = computed(() => {
56+
let obj = { key: 0, value: '' }
5157
for (const i in checkList) {
5258
const state = checkList[i]
5359
const index = props.status.indexOf(state)
5460
if (index > -1) {
55-
return { key: props.status.length - index, value: state }
61+
obj = { key: props.status.length - index, value: state }
62+
break
5663
}
5764
}
65+
return obj
5866
})
5967
const startedMap = {
6068
[TaskType.EMBEDDING]: '索引中',

ui/src/views/document/component/StatusTable.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<div v-for="status in statusTable" :key="status.type">
2+
<div v-for="status in statusTable" :key="status.type" >
33
<span> {{ taskTypeMap[status.type] }}:</span>
44
<span>
55
<el-text v-if="status.state === State.SUCCESS || status.state === State.REVOKED">
@@ -37,7 +37,7 @@
3737
Object.values(status.aggs ? status.aggs : {}).reduce((x: any, y: any) => x + y, 0)
3838
}}</span
3939
>
40-
<el-text type="info" class="ml-4">
40+
<el-text type="info" class="ml-12">
4141
{{
4242
status.time
4343
? status.time[status.state == State.REVOKED ? State.REVOKED : State.PENDING]?.substring(

0 commit comments

Comments
 (0)