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