知乎热榜 下拉刷新

This commit is contained in:
shikong 2024-10-17 16:01:41 +08:00
parent 13ed2cbe11
commit a179c383e2
Signed by: Shikong
GPG Key ID: BD85FF18B373C341

View File

@ -32,8 +32,13 @@ onReady(() => {
<template>
<view>
<uni-section title="知乎热榜" type="line">
<scroll-view refresher-enabled :refresher-triggered="ctx.refresh.triggered" @refresherrefresh="fetchHotList">
<uni-list>
<scroll-view style="max-height: 50vh"
show-scrollbar
refresher-threshold="150"
scroll-y
refresher-enabled
:refresher-triggered="ctx.refresh.triggered"
@refresherrefresh="fetchHotList">
<uni-list-item v-for="item in ctx.data" :key="item.target.id" direction="column">
<template #header>
<view class="w-full overflow-hidden overflow-ellipsis whitespace-nowrap font-bold text-lg">
@ -47,7 +52,7 @@ onReady(() => {
</view>
</template>
</uni-list-item>
</uni-list>
</scroll-view>
</uni-section>
</view>