userCard.wxml 1.1 KB

12345678910111213141516171819202122
  1. <!--components/userCard/userCard.wxml-->
  2. <view class="user-card " bind:tap="tapUserAction">
  3. <view class="flex flex-center" catch:tap="tapPersonalAction">
  4. <image class="{{layoutType== 1 ? 'user-img':'avatar'}}"
  5. src="{{authorInfo.avatar || '../../images/default_head.png'}}"></image>
  6. <view wx:if="{{layoutType== 1}}" class="flex flex-col flex-bet">
  7. <text class="user-name">{{authorInfo.userName}}</text>
  8. <text class="create-time">{{time}}</text>
  9. </view>
  10. <text wx:elif="{{layoutType== 2}}" class="name-time">{{ authorInfo.userName || "" }} · {{ time || '' }} </text>
  11. <view wx:else class="flex flex-center">
  12. <text class="user-name">{{authorInfo.userName}}</text>
  13. <text class="create-time">{{time}}</text>
  14. </view>
  15. </view>
  16. <view style="flex-shrink: 0;" wx:if="{{!isAuthor && isShowLike}}">
  17. <attention-btn is-attention="{{!!isLike}}" attention-id="{{authorInfo.id}}"></attention-btn>
  18. </view>
  19. <image class="more-icon" wx:if="{{isAuthor && isShowMore}}" catch:tap="tapDeleteAction" src='../../images/more.png'>
  20. </image>
  21. </view>