index.wxml 811 B

123456789101112
  1. <view class="l-avatar {{text||_isHaveUserNickName?'l-placement-'+placement:''}}" bindtap="tapAvatar">
  2. <view class="l-avatar-image {{shape?'l-'+shape:''}} l-class" wx:if="{{_isHaveUserAvatarUrl||icon||src}}" style="width:{{size}}rpx;height:{{size}}rpx">
  3. <open-data wx:if="{{_isHaveUserAvatarUrl}}" type="userAvatarUrl"/>
  4. <l-icon wx:elif="{{icon}}" size="{{iconSize || size*0.6}}" color="{{iconColor||'#ffffff'}}" name="{{icon}}"/>
  5. <image wx:elif="{{src}}" src="{{src}}" mode="{{mode}}" style="width:{{size}}rpx;height:{{size}}rpx"/>
  6. </view>
  7. <view class="l-avatar-text l-class-text l-text-class" wx:if="{{text||_isHaveUserNickName}}">
  8. <open-data wx:if="{{_isHaveUserNickName}}" type="userNickName"/>
  9. <text wx:elif="{{text}}">{{text}}</text>
  10. </view>
  11. </view>