feat(search): 检索列表新增「描述」列

包名后展示 description(超出 230px 省略号,悬停 title 显示全文),
无描述显示 —。移动端表格 min-width 调整为 880px。
This commit is contained in:
陈银军
2026-09-19 22:23:36 +08:00
parent c379454ca6
commit 6e220a04a1
+13 -1
View File
@@ -196,6 +196,7 @@ async function onCleanConfirmed(res) {
<thead>
<tr>
<th>包名</th>
<th style="width: 240px">描述</th>
<th style="width: 90px">版本数</th>
<th style="width: 110px">占用空间</th>
<th style="width: 120px">最近更新</th>
@@ -211,6 +212,7 @@ async function onCleanConfirmed(res) {
<span class="pkg-cell">{{ p.name }}</span>
</span>
</td>
<td><span class="pkg-desc" :title="p.description || ''">{{ p.description || '—' }}</span></td>
<td><span class="num-cell" :class="{ over: p.versions > state.threshold.versionThreshold }">{{ p.versions }}</span></td>
<td><span class="num-cell">{{ fmtSize(p.size) }}</span></td>
<td><span class="date-cell">{{ p.lastUpdated || '—' }}</span></td>
@@ -412,6 +414,16 @@ async function onCleanConfirmed(res) {
.pkg-name { display: inline-flex; align-items: center; gap: 9px; min-width: 0; }
.pkg-name .pkg-cell { min-width: 0; }
.pkg-cell { font-weight: 600; word-break: break-all; }
.pkg-desc {
display: block;
max-width: 230px;
font-size: 12px;
color: var(--ink-dim);
font-weight: 500;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.num-cell.over { color: var(--red); }
/* 操作列:按钮横排一行,不换行 */
.vtable td:last-child { white-space: nowrap; }
@@ -426,6 +438,6 @@ async function onCleanConfirmed(res) {
.history-row { width: 100%; }
.toolbar { margin: 16px 0 10px; }
.vtable { overflow-x: auto; }
.vtable table { min-width: 640px; }
.vtable table { min-width: 880px; }
}
</style>