Skip to content

Commit e7e4570

Browse files
committed
refactor: log add hover
--bug=1054088 --user=王孝刚 【操作日志】优化-操作详情建议一行展示,提供hover功能,hover后展示全部详情 https://www.tapd.cn/57709429/s/1678006
1 parent f69346f commit e7e4570

File tree

1 file changed

+21
-6
lines changed

1 file changed

+21
-6
lines changed

ui/src/views/operate-log/index.vue

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -131,12 +131,20 @@
131131
</el-table-column>
132132
<el-table-column prop="operate" :label="$t('views.operateLog.table.operate.detail')">
133133
<template #default="{ row }">
134-
{{
135-
row.operate +
136-
(row.operation_object && row.operation_object.name
137-
? `【${row.operation_object.name}】`
138-
: '')
139-
}}
134+
<el-tooltip
135+
:content="
136+
row.operate + (row.operation_object?.name ? `【${row.operation_object.name}】` : '')
137+
"
138+
effect="dark"
139+
placement="top"
140+
>
141+
<span class="text-ellipsis">
142+
{{
143+
row.operate +
144+
(row.operation_object?.name ? `【${row.operation_object.name}】` : '')
145+
}}
146+
</span>
147+
</el-tooltip>
140148
</template>
141149
</el-table-column>
142150
<el-table-column
@@ -342,4 +350,11 @@ onMounted(() => {
342350
.text-button {
343351
font-size: 14px;
344352
}
353+
.text-ellipsis {
354+
white-space: nowrap;
355+
overflow: hidden;
356+
text-overflow: ellipsis;
357+
max-width: 100%;
358+
display: block;
359+
}
345360
</style>

0 commit comments

Comments
 (0)