xusd
7 days ago 998218675eb243d43912c203174a6b72b299c0f8
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
<wxs src="../wxs/utils.wxs" module="utils" />
 
<view
  wx:if="{{ loading }}"
  class="custom-class {{ utils.bem('skeleton', [{animate}]) }}"
>
  <view
    wx:if="{{ avatar }}"
    class="avatar-class {{ utils.bem('skeleton__avatar', [avatarShape])}}"
    style="{{ 'width:' + avatarSize + ';height:' + avatarSize }}"
  />
  <view class="{{ utils.bem('skeleton__content')}}">
    <view
      wx:if="{{ title }}"
      class="title-class {{ utils.bem('skeleton__title') }}"
      style="{{ 'width:' + titleWidth }}"
    />
    <view
      wx:for="{{ rowArray }}"
      wx:key="index"
      wx:for-index="index"
      class="row-class {{ utils.bem('skeleton__row') }}"
      style="{{ 'width:' + (isArray ? rowWidth[index] : rowWidth) }}"
    />
  </view>
</view>
<view wx:else class="{{ utils.bem('skeleton__content')}}">
  <slot />
</view>