fix: 没有采集任务时仍显示表头
This commit is contained in:
@@ -293,7 +293,7 @@ onMounted(load);
|
||||
<n-button type="primary" @click="reset()">添加采集</n-button>
|
||||
</header>
|
||||
<div class="admin-scroll">
|
||||
<div v-if="sources.length" class="surface table-card">
|
||||
<div class="surface table-card">
|
||||
<table class="admin-table">
|
||||
<thead>
|
||||
<tr>
|
||||
@@ -307,6 +307,9 @@ onMounted(load);
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-if="!sources.length">
|
||||
<td class="cell-empty" colspan="7">没有采集</td>
|
||||
</tr>
|
||||
<tr v-for="source in sources" :key="source.id">
|
||||
<td>{{ source.name }}</td>
|
||||
<td class="cell-clip" :title="tablesTitle(source)">{{ tablesText(source) }}</td>
|
||||
@@ -341,9 +344,6 @@ onMounted(load);
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div v-else class="surface empty-card">
|
||||
<p class="admin-status">没有采集</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<n-modal v-model:show="show" class="app-dialog app-dialog-collect" preset="card" :show-icon="false" title="采集">
|
||||
|
||||
@@ -223,6 +223,11 @@ button, input, select { font: inherit; }
|
||||
letter-spacing: 0.01em;
|
||||
box-shadow: inset 0 -1px 0 var(--line);
|
||||
}
|
||||
.admin-table .cell-empty {
|
||||
padding: 48px 16px;
|
||||
color: var(--muted);
|
||||
text-align: center;
|
||||
}
|
||||
.admin-table .cell-clip {
|
||||
max-width: 280px;
|
||||
overflow: hidden;
|
||||
|
||||
Reference in New Issue
Block a user