Files
gaoYuJournal/miniprogram/components/journal-list/index.wxml
2025-12-08 15:52:59 +08:00

41 lines
1.0 KiB
Plaintext

<!--components/journal-list/index.wxml-->
<scroll-view
class="journal-list"
scroll-y
bindscrolltolower="onScrollToLower"
>
<t-cell-group>
<t-cell
class="item {{selectedId === item.id ? 'selected' : ''}}"
wx:for="{{list}}"
wx:key="id"
title="{{item.date}}"
description="{{item.idea}}"
bind:tap="onSelectItem"
data-id="{{item.id}}"
>
<image
slot="left-icon"
wx:if="{{item.thumbUrl}}"
class="thumb"
src="{{item.thumbUrl}}"
mode="aspectFill"
/>
<t-icon wx:if="{{!item.thumbUrl}}" slot="left-icon" name="image-off" color="gray" size="96rpx" />
<t-icon
wx:if="{{selectedId === item.id}}"
slot="note"
class="check"
name="check"
size="48rpx"
color="var(--theme-wx)"
/>
</t-cell>
</t-cell-group>
<view wx:if="{{isFetching}}" class="loading">
<t-loading theme="dots" size="40rpx" />
</view>
<view wx:if="{{isFinished && list.length > 0}}" class="finished">没有更多了</view>
<view wx:if="{{!isFetching && list.length === 0}}" class="empty">暂无记录</view>
</scroll-view>