fix: 自适应表格高度并改用中文标签

This commit is contained in:
Nixevol
2026-09-30 16:22:49 +08:00
parent 965060dc0c
commit eb4e2db918
13 changed files with 236 additions and 37 deletions
+16 -2
View File
@@ -143,6 +143,7 @@ function onDelete(r: ApiToken) {
<div class="page-body">
<LoadFailed v-if="loadError" :description="loadError" @retry="load" />
<template v-else>
<div class="page-filters">
<SecretOnceAlert
v-if="onceToken"
title="令牌只显示一次"
@@ -151,13 +152,16 @@ function onDelete(r: ApiToken) {
data-testid="token-once"
@dismiss="onceToken = null"
/>
</div>
<div class="page-table">
<n-data-table
flex-height
:loading="loading"
:columns="columns"
:data="rows"
:row-key="(r: ApiToken) => r.id"
:max-height="480"
/>
</div>
</template>
</div>
@@ -188,7 +192,17 @@ function onDelete(r: ApiToken) {
}
.page-body {
flex: 1;
overflow: auto;
min-height: 0;
display: flex;
flex-direction: column;
overflow: hidden;
padding: 16px;
}
.page-filters {
flex: 0 0 auto;
}
.page-table {
flex: 1;
min-height: 0;
}
</style>