消息模块完善
This commit is contained in:
@@ -10,11 +10,26 @@
|
||||
<t-icon bindtap="onClearUnreadTap" name="clear" size="40rpx" />
|
||||
</t-col>
|
||||
</t-row>
|
||||
<t-divider />
|
||||
|
||||
<!-- 消息类型分类 -->
|
||||
<t-tabs value="{{currentTabIndex}}" bind:change="onTabsChange" swipeable="{{false}}" t-class="message-tabs">
|
||||
<t-tab-panel
|
||||
wx:for="{{tabs}}"
|
||||
wx:key="key"
|
||||
label="{{item.label}}"
|
||||
value="{{index}}"
|
||||
badge-props="{{ { count: item.key === '' ? totalUnread : unreadMap[item.key] } }}"
|
||||
/>
|
||||
</t-tabs>
|
||||
|
||||
<view class="message-list">
|
||||
<view class="message-item" wx:for="{{list}}" wx:for-item="item" wx:key="id">
|
||||
<t-cell hover bordered title="{{item.title}}" data-key="showTextAndTitle" bind:tap="showDialog" data-id="{{item.id}}">
|
||||
<t-cell hover bordered data-key="showTextAndTitle" bind:tap="showDialog" data-id="{{item.id}}">
|
||||
<t-avatar class="avatar-example" slot="image" image="{{item.image}}" badge-props="{{ {dot: !item.is_read, offset: [0, 4] } }}" />
|
||||
<view slot="title" class="msg-title">
|
||||
<text class="msg-title-text">{{item.title}}</text>
|
||||
<t-tag size="small" variant="light" class="msg-type-tag">{{item.message_type_text}}</t-tag>
|
||||
</view>
|
||||
<view slot="description">{{_index.ellipsis(item.content, 22)}}</view>
|
||||
<text slot="note">{{item.createtime_text}}</text>
|
||||
</t-cell>
|
||||
@@ -25,11 +40,12 @@
|
||||
</view>
|
||||
<view class="safe-bottom" />
|
||||
</view>
|
||||
<t-dialog visible="{{showTextAndTitle}}" title="{{currentMessage.title}}" confirm-btn="{{ confirmBtn }}" bind:confirm="closeDialog">
|
||||
<t-dialog visible="{{showTextAndTitle}}" title="{{currentMessage.title}}" confirm-btn="{{ confirmBtn }}" bind:confirm="onDialogConfirm">
|
||||
<!-- 适配skyline,增加type="list" -->
|
||||
<scroll-view slot="content" type="list" scroll-y class="long-content">
|
||||
<view class="content-container">
|
||||
<view class="content-type">{{currentMessage.message_type_text}}</view>
|
||||
{{currentMessage.content}}
|
||||
</view>
|
||||
</scroll-view>
|
||||
</t-dialog>
|
||||
</t-dialog>
|
||||
|
||||
Reference in New Issue
Block a user