|
100 | 100 | </div> |
101 | 101 | </template> |
102 | 102 |
|
103 | | - <div class="history-table-wrap"> |
104 | | - <el-table |
105 | | - :pagination-config="paginationConfig" |
106 | | - :data="historyItems" |
107 | | - v-loading="historyLoading" |
108 | | - class="history-table" |
109 | | - @row-click="openHistoryRecord" |
110 | | - @selection-change="handleSelectionChange" |
111 | | - > |
112 | | - <el-table-column type="selection" width="46" /> |
113 | | - <el-table-column :label="$t('commons.table.date')" min-width="180"> |
114 | | - <template #default="{ row }"> |
115 | | - {{ dateFormatSimpleWithSecond(row.createdAt) }} |
116 | | - </template> |
117 | | - </el-table-column> |
118 | | - <el-table-column |
119 | | - :label="$t('file.fileName')" |
120 | | - prop="fileName" |
121 | | - min-width="160" |
122 | | - show-overflow-tooltip |
123 | | - /> |
124 | | - <el-table-column |
125 | | - :label="$t('file.path')" |
126 | | - prop="path" |
127 | | - min-width="260" |
128 | | - show-overflow-tooltip |
129 | | - /> |
130 | | - <el-table-column :label="$t('commons.table.type')" min-width="110"> |
131 | | - <template #default="{ row }"> |
132 | | - <div class="flex flex-wrap items-center gap-2"> |
133 | | - <el-tag size="small" effect="plain"> |
134 | | - {{ getOperationLabel(row.operation) }} |
135 | | - </el-tag> |
136 | | - </div> |
137 | | - </template> |
138 | | - </el-table-column> |
139 | | - <el-table-column :label="$t('file.size')" min-width="110"> |
140 | | - <template #default="{ row }"> |
141 | | - {{ computeSize(row.contentSize) }} |
142 | | - </template> |
143 | | - </el-table-column> |
144 | | - <el-table-column :label="$t('commons.table.operate')" min-width="110" fixed="right"> |
145 | | - <template #default="{ row }"> |
146 | | - <el-button link type="primary" @click.stop="openHistoryRecord(row)"> |
147 | | - {{ $t('commons.button.view') }} |
148 | | - </el-button> |
149 | | - <el-button link type="danger" @click.stop="deleteSelected(row)"> |
150 | | - {{ $t('commons.button.delete') }} |
151 | | - </el-button> |
152 | | - </template> |
153 | | - </el-table-column> |
154 | | - </el-table> |
155 | | - </div> |
| 103 | + <div class="table-box history-table-box"> |
| 104 | + <div class="history-table-wrap"> |
| 105 | + <el-table |
| 106 | + :pagination-config="paginationConfig" |
| 107 | + :data="historyItems" |
| 108 | + v-loading="historyLoading" |
| 109 | + class="history-table" |
| 110 | + @row-click="openHistoryRecord" |
| 111 | + @selection-change="handleSelectionChange" |
| 112 | + > |
| 113 | + <el-table-column type="selection" width="46" /> |
| 114 | + <el-table-column :label="$t('commons.table.date')" min-width="180"> |
| 115 | + <template #default="{ row }"> |
| 116 | + {{ dateFormatSimpleWithSecond(row.createdAt) }} |
| 117 | + </template> |
| 118 | + </el-table-column> |
| 119 | + <el-table-column |
| 120 | + :label="$t('file.fileName')" |
| 121 | + prop="fileName" |
| 122 | + min-width="160" |
| 123 | + show-overflow-tooltip |
| 124 | + /> |
| 125 | + <el-table-column |
| 126 | + :label="$t('file.path')" |
| 127 | + prop="path" |
| 128 | + min-width="260" |
| 129 | + show-overflow-tooltip |
| 130 | + /> |
| 131 | + <el-table-column :label="$t('commons.table.type')" min-width="110"> |
| 132 | + <template #default="{ row }"> |
| 133 | + <div class="flex flex-wrap items-center gap-2"> |
| 134 | + <el-tag size="small" effect="plain"> |
| 135 | + {{ getOperationLabel(row.operation) }} |
| 136 | + </el-tag> |
| 137 | + </div> |
| 138 | + </template> |
| 139 | + </el-table-column> |
| 140 | + <el-table-column :label="$t('file.size')" min-width="110"> |
| 141 | + <template #default="{ row }"> |
| 142 | + {{ computeSize(row.contentSize) }} |
| 143 | + </template> |
| 144 | + </el-table-column> |
| 145 | + <el-table-column :label="$t('commons.table.operate')" min-width="110" fixed="right"> |
| 146 | + <template #default="{ row }"> |
| 147 | + <el-button link type="primary" @click.stop="openHistoryRecord(row)"> |
| 148 | + {{ $t('commons.button.view') }} |
| 149 | + </el-button> |
| 150 | + <el-button link type="danger" @click.stop="deleteSelected(row)"> |
| 151 | + {{ $t('commons.button.delete') }} |
| 152 | + </el-button> |
| 153 | + </template> |
| 154 | + </el-table-column> |
| 155 | + </el-table> |
| 156 | + </div> |
156 | 157 |
|
157 | | - <div class="flex justify-end pt-4"> |
158 | 158 | <el-pagination |
159 | 159 | v-model:current-page="pagination.currentPage" |
160 | 160 | v-model:page-size="pagination.pageSize" |
@@ -692,7 +692,12 @@ onBeforeUnmount(() => { |
692 | 692 | min-width: 0; |
693 | 693 | } |
694 | 694 |
|
| 695 | +.history-table-box { |
| 696 | + min-height: 0; |
| 697 | +} |
| 698 | +
|
695 | 699 | .history-table-wrap { |
| 700 | + flex: 1; |
696 | 701 | min-width: 0; |
697 | 702 | overflow-x: auto; |
698 | 703 | max-height: clamp(240px, 36vh, 420px); |
@@ -731,4 +736,12 @@ onBeforeUnmount(() => { |
731 | 736 | padding-bottom: 2px; |
732 | 737 | } |
733 | 738 | } |
| 739 | +
|
| 740 | +.history-list-card { |
| 741 | + :deep(.el-card__body) { |
| 742 | + display: flex; |
| 743 | + flex-direction: column; |
| 744 | + min-height: 0; |
| 745 | + } |
| 746 | +} |
734 | 747 | </style> |
0 commit comments