add entrance transition

This commit is contained in:
Timi
2026-08-24 16:16:43 +08:00
parent 2efce6de11
commit 05aad89706
54 changed files with 874 additions and 694 deletions
+45 -44
View File
@@ -47,55 +47,56 @@
class="list"
theme="card"
>
<customer-cell
class="item"
:class="{ 'in-top3': index < 3}"
v-for="(item, index) in pageResult.list"
:key="item.customerId"
arrow
@click="toCustomerDetail(item.customerId || '')"
:customer="item.customer"
>
<template #note>
<div
class="rank"
:class="{
<customer-cell
v-entrance-transition="index * 30"
v-for="(item, index) in pageResult.list"
:key="item.customerId"
class="item"
:class="{ 'in-top3': index < 3}"
arrow
@click="toCustomerDetail(item.customerId || '')"
:customer="item.customer"
>
<template #note>
<div
class="rank"
:class="{
top1: index === 0,
top2: index === 1,
top3: index === 2,
}"
v-text="index + 1"
/>
</template>
<template #description>
<div class="description">
<t-tag
v-if="rankType === 'TOTAL_DAYS'"
size="small"
variant="outline"
:content="`累计天数 ${item.totalEventDays || 0}`"
v-text="index + 1"
/>
<t-tag
v-else-if="rankType === 'TOTAL_COUNT'"
size="small"
variant="outline"
:content="`累计次数 ${item.totalEventCount || 0}`"
/>
<t-tag
v-else-if="rankType === 'CONTINUOUS_DAYS'"
size="small"
variant="outline"
:content="`连续天数 ${item.recentContinuousEventDays || 0}`"
/>
<t-tag
v-else
size="small"
variant="outline"
:content="`登记数值 ${getTotalNumberValueText(item)}`"
/>
</div>
</template>
</customer-cell>
</template>
<template #description>
<div class="description">
<t-tag
v-if="rankType === 'TOTAL_DAYS'"
size="small"
variant="outline"
:content="`累计天数 ${item.totalEventDays || 0}`"
/>
<t-tag
v-else-if="rankType === 'TOTAL_COUNT'"
size="small"
variant="outline"
:content="`累计次数 ${item.totalEventCount || 0}`"
/>
<t-tag
v-else-if="rankType === 'CONTINUOUS_DAYS'"
size="small"
variant="outline"
:content="`连续天数 ${item.recentContinuousEventDays || 0}`"
/>
<t-tag
v-else
size="small"
variant="outline"
:content="`登记数值 ${getTotalNumberValueText(item)}`"
/>
</div>
</template>
</customer-cell>
</t-cell-group>
<div v-else class="load-state" v-text="emptyStateText" />
<div v-if="pageResult.list.length" class="load-state" v-text="loadStateText" />