@@ -3,9 +3,9 @@ defineOptions({
3
3
name: ' ScrollCache' ,
4
4
})
5
5
6
- const list = ref ([])
7
6
const loading = ref (false )
8
7
const finished = ref (false )
8
+ const list = ref ([])
9
9
10
10
function onLoad() {
11
11
setTimeout (() => {
@@ -39,24 +39,33 @@ onBeforeRouteLeave(() => {
39
39
<van-list
40
40
v-model:loading =" loading"
41
41
:finished =" finished"
42
- finished-text =" 已经到底啦 ~ "
43
- loading-text =" 加载中... "
42
+ : finished-text =" $t('scrollCache.finished') "
43
+ : loading-text =" $t('scrollCache.loading') "
44
44
@load =" onLoad"
45
45
>
46
- <van-cell
47
- v-for =" (item, index) in list"
48
- :key =" index"
49
- :border =" false"
50
- class =" mb-8 rounded-12"
51
- >
52
- <template #title >
53
- {{ $t('scrollCache.listItem') }}
54
- </template >
46
+ <ul class =" space-y-10" >
47
+ <li v-for =" item in list" :key =" item" class =" p-3 flex gap-12" >
48
+ <div class =" shrink-0" >
49
+ <div class =" rounded-full bg-gray-500/20 flex h-48 w-48 items-center justify-center overflow-hidden" >
50
+ <span class =" text-[16px] text-zinc-600 tabular-nums dark:text-zinc-400" > {{ item }} </span >
51
+ </div >
52
+ </div >
53
+
54
+ <div class =" flex-1 min-w-0" >
55
+ <div class =" mb-2 flex flex-row gap-1 w-full justify-between" >
56
+ <h3 class =" text-[16px] text-zinc-600 font-semibold tracking-tight w-1/2 dark:text-white" >
57
+ <van-text-ellipsis :content =" `${$t('scrollCache.sectionTitle')}`" />
58
+ </h3 >
59
+
60
+ <time class =" text-[12px] text-zinc-400 tabular-nums" >2025年05月16日</time >
61
+ </div >
55
62
56
- <template #value >
57
- {{ item }}
58
- </template >
59
- </van-cell >
63
+ <p class =" text-[14px] text-zinc-500" >
64
+ <van-text-ellipsis :rows =" 2" :content =" $t('scrollCache.sectionText')" />
65
+ </p >
66
+ </div >
67
+ </li >
68
+ </ul >
60
69
</van-list >
61
70
</template >
62
71
0 commit comments