TimeLine.wxml
1.3 KB
<!-- 时间轴组件 -->
<view class="timeline-container">
<view wx:for="{{timeLineNodes}}" wx:key="index" class="timeline-node">
<!-- 时间轴节点 -->
<view class="timeline-node__dot-wrapper">
<!-- 使用预处理的样式类 -->
<view class="timeline-node__dot timeline-node__dot--{{item.type}}"></view>
</view>
<!-- 时间轴连接线 -->
<view wx:if="{{index !== nodes.length - 1}}" class="timeline-node__line"></view>
<!-- 时间轴内容 -->
<view class="timeline-node__content timeline-node__content--{{item.type}} ">
<view class="timeline-node__header">
<view wx:if="{{item.statusDesc}}" class="timeline-node__title">{{item.statusDesc}}</view>
<view wx:if="{{item.operateTime}}" class="timeline-node__time">{{item.operateTime}}</view>
</view>
<view class="timeline-node__tip">
<view class="content">
<block wx:for="{{item.content}}" wx:key="index" wx:for-item="content">
<block wx:if="{{content.type==='text'}}">{{content.txt}}</block>
<label wx:elif="{{content.type==='phone'}}"
catchtap="makePhoneCall"
data-phone="{{content.txt}}"
class="phone">{{content.txt}}</label>
</block>
</view>
</view>
</view>
</view>
</view>