Files
gaoYuJournal/miniprogram/pages/main/journal/index.wxml
2025-12-17 16:16:10 +08:00

56 lines
2.0 KiB
Plaintext

<view class="custom-navbar">
<t-navbar title="我们的记录">
<view slot="left" class="more" bind:tap="toggleMoreMenu">
<t-icon name="view-list" size="24px" />
</view>
</t-navbar>
</view>
<view wx:if="{{isShowMoreMenu}}" class="more-menu" catchtap="toggleMoreMenu">
<t-cell-group
class="content"
theme="card"
style="top: {{menuTop}}px; left: {{menuLeft}}px;"
catchtap="stopPropagation"
>
<t-cell title="新纪录" leftIcon="add" bind:tap="toCreater" />
<t-cell title="按列表查找" leftIcon="view-list" bind:tap="toSearch" />
<t-cell title="按日期查找" leftIcon="calendar-1" bind:tap="toDate" />
<t-cell title="按地图查找" leftIcon="location" bind:tap="toMap" />
</t-cell-group>
</view>
<t-indexes
class="journal-list"
bind:scroll="onScroll"
sticky-offset="{{stickyOffset}}"
>
<view class="content" wx:for="{{list}}" wx:for-item="journal" wx:for-index="journalIndex" wx:key="index">
<t-indexes-anchor class="date" index="{{journal.datetime}}" />
<view wx:if="{{journal.idea || journal.location}}" class="text">
<text class="idea">{{journal.idea}}</text>
<view
wx:if="{{journal.location}}"
class="location"
bind:tap="openLocation"
data-journal-index="{{journalIndex}}"
>
<t-icon class="icon" name="location-filled" />
<text class="text">{{journal.location}}</text>
</view>
</view>
<view wx:if="{{journal.columnedItems}}" class="items">
<view wx:for="{{journal.columnedItems}}" wx:for-item="column" wx:for-index="columnIndex" wx:key="columnIndex" class="column">
<block wx:for="{{column}}" wx:for-item="item" wx:for-index="itemIndex" wx:key="attachmentId">
<image
class="item thumbnail {{item.type}}"
src="{{item.thumbURL}}"
mode="widthFix"
bindtap="preview"
data-item-index="{{item.originalIndex}}"
data-journal-index="{{journalIndex}}"
></image>
</block>
</view>
</view>
</view>
<view wx:if="{{isFinished}}" class="start">已回到最初的起点</view>
</t-indexes>