feat: 优化 rwa-list 组件,调整数据展示逻辑,增加空状态处理

This commit is contained in:
2026-01-12 21:47:10 +07:00
parent 7aa17bdcf8
commit f1a0ab6654
2 changed files with 35 additions and 32 deletions

2
components.d.ts vendored
View File

@@ -45,7 +45,6 @@ declare module 'vue' {
IonProgressBar: typeof import('@ionic/vue')['IonProgressBar']
IonRadio: typeof import('@ionic/vue')['IonRadio']
IonRadioGroup: typeof import('@ionic/vue')['IonRadioGroup']
IonRange: typeof import('@ionic/vue')['IonRange']
IonRefresher: typeof import('@ionic/vue')['IonRefresher']
IonRefresherContent: typeof import('@ionic/vue')['IonRefresherContent']
IonRouterOutlet: typeof import('@ionic/vue')['IonRouterOutlet']
@@ -105,7 +104,6 @@ declare global {
const IonProgressBar: typeof import('@ionic/vue')['IonProgressBar']
const IonRadio: typeof import('@ionic/vue')['IonRadio']
const IonRadioGroup: typeof import('@ionic/vue')['IonRadioGroup']
const IonRange: typeof import('@ionic/vue')['IonRange']
const IonRefresher: typeof import('@ionic/vue')['IonRefresher']
const IonRefresherContent: typeof import('@ionic/vue')['IonRefresherContent']
const IonRouterOutlet: typeof import('@ionic/vue')['IonRouterOutlet']

View File

@@ -33,40 +33,45 @@ function gotoTradeRwa(id: string) {
</ion-col>
</ion-row>
</ion-grid>
<div v-for="item in data" :key="item.id" @click="gotoTradeRwa(item.id)">
<ion-grid>
<ion-row class="ion-align-items-center my-5">
<ion-col size="6" class="flex items-center">
<div class="mr-3">
<CryptocurrencyColorNuls class="text-3xl" />
</div>
<div>
<div class="text-sm font-semibold mb-1 truncate">
{{ item?.name }}
<template v-if="data.length === 0">
<ui-empty />
</template>
<template v-else>
<div v-for="item in data" :key="item.id" @click="gotoTradeRwa(item.id)">
<ion-grid>
<ion-row class="ion-align-items-center my-5">
<ion-col size="6" class="flex items-center">
<div class="mr-3">
<CryptocurrencyColorNuls class="text-3xl" />
</div>
<div class="flex items-center space-x-2">
<div class="text-xs text-text-500">
{{ item?.code }}
<div>
<div class="text-sm font-semibold mb-1 truncate">
{{ item?.name }}
</div>
<div class="text-xs rounded-md px-1 py-0.5 bg-text-800">
{{ item.category?.name }}
<div class="flex items-center space-x-2">
<div class="text-xs text-text-500">
{{ item?.code }}
</div>
<div class="text-xs rounded-md px-1 py-0.5 bg-text-800">
{{ item.category?.name }}
</div>
</div>
</div>
</div>
</ion-col>
<ion-col>
<div class="text-xs text-right">
{{ useDateFormat(item.createdAt!, 'MM/DD HH:mm').value }}
</div>
</ion-col>
<ion-col>
<div class="text-sm font-bold text-primary text-right">
{{ t(`myIssues.status.${item.status}`) }}
</div>
</ion-col>
</ion-row>
</ion-grid>
</div>
</ion-col>
<ion-col>
<div class="text-xs text-right">
{{ useDateFormat(item.createdAt!, 'MM/DD HH:mm').value }}
</div>
</ion-col>
<ion-col>
<div class="text-sm font-bold text-primary text-right">
{{ t(`myIssues.status.${item.status}`) }}
</div>
</ion-col>
</ion-row>
</ion-grid>
</div>
</template>
</div>
</template>