沙盘演示系统应用的微信小程序
zuoxiao
2024-08-28 eb3dbfdcb126beeb1d08f3306ac8f5bbc466e133
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<import src="../common/template/icon.wxml" />
<wxs src="../common/utils.wxs" module="_" />
<wxs src="./avatar.wxs" module="this" />
 
<view
  class="{{classPrefix}}__wrapper class {{prefix}}-class"
  style="{{_._style([this.getStyles(isShow, zIndex), style, customStyle])}}"
>
  <t-badge
    color="{{badgeProps.color || ''}}"
    content="{{badgeProps.content || ''}}"
    count="{{badgeProps.count || 0}}"
    dot="{{badgeProps.dot || false}}"
    max-count="{{badgeProps.maxCount || 99}}"
    offset="{{badgeProps.offset || []}}"
    shape="{{badgeProps.shape || 'circle'}}"
    show-zero="{{badgeProps.showZero || false}}"
    size="{{badgeProps.size || 'medium'}}"
    t-class="{{badgeProps.tClass}}"
    t-class-content="{{badgeProps.tClassContent}}"
    t-class-count="{{badgeProps.tClassCount}}"
  >
    <view
      class="{{this.getClass(classPrefix, size, shape, bordered || borderedWithGroup)}} {{prefix}}-class-image"
      style="{{this.getSize(size)}}"
      aria-label="{{ ariaLabel || alt ||'头像'}}"
      aria-role="{{ ariaRole || 'img'}}"
      aria-hidden="{{ ariaHidden }}"
    >
      <t-image
        wx:if="{{image}}"
        t-class="{{prefix}}-image {{classPrefix}}__image"
        t-class-load="{{prefix}}-class-alt"
        style="{{imageProps && imageProps.style || ''}}"
        src="{{image}}"
        mode="{{imageProps && imageProps.mode || 'aspectFill'}}"
        lazy="{{imageProps && imageProps.lazy || false}}"
        loading="{{imageProps && imageProps.loading || 'default'}}"
        shape="{{imageProps && imageProps.shape || 'round'}}"
        webp="{{imageProps && imageProps.webp || false}}"
        error="{{alt || 'default'}}"
        bind:error="onLoadError"
      />
      <template
        wx:elif="{{iconName || _.isNoEmptyObj(iconData)}}"
        is="icon"
        data="{{class: classPrefix + '__icon', tClass: prefix + '-class-icon', name: iconName, ...iconData}}"
      />
      <view wx:else class="{{classPrefix}}__text {{prefix}}-class-content">
        <slot />
      </view>
    </view>
  </t-badge>
</view>