feat: 优化数据加载逻辑,确保分页状态正确;更新资产记录列表样式
This commit is contained in:
@@ -20,7 +20,7 @@ async function fetchData() {
|
||||
query: query.value,
|
||||
}));
|
||||
data.value.push(...(record.value?.data || []));
|
||||
isFinished.value = (record.value?.data.length || 0) < query.value.limit!;
|
||||
isFinished.value = record.value?.pagination.hasNextPage === false;
|
||||
}
|
||||
|
||||
function reset() {
|
||||
@@ -80,7 +80,7 @@ onBeforeMount(() => {
|
||||
<!-- 资产记录列表 -->
|
||||
<div v-if="data.length > 0" class="space-y-2 pb-4">
|
||||
<div v-for="item in data" :key="item.id" class="ion-padding-horizontal">
|
||||
<div class="bg-gray-50 rounded-lg p-4">
|
||||
<div class="bg-faint rounded-lg p-4">
|
||||
<div class="flex items-center justify-between mb-3">
|
||||
<div class="flex items-center space-x-3">
|
||||
<div>
|
||||
|
||||
Reference in New Issue
Block a user