<wxs module="utils" src="../wxs/utils.wxs"/>

<view
        class="custom-class {{ utils.bem('skeleton', [{animate}]) }}"
        wx:if="{{ loading }}"
>
    <view
            class="avatar-class {{ utils.bem('skeleton__avatar', [avatarShape])}}"
            style="{{ 'width:' + avatarSize + ';height:' + avatarSize }}"
            wx:if="{{ avatar }}"
    />
    <view class="{{ utils.bem('skeleton__content')}}">
        <view
                class="title-class {{ utils.bem('skeleton__title') }}"
                style="{{ 'width:' + titleWidth }}"
                wx:if="{{ title }}"
        />
        <view
                class="row-class {{ utils.bem('skeleton__row') }}"
                style="{{ 'width:' + (isArray ? rowWidth[index] : rowWidth) }}"
                wx:for="{{ rowArray }}"
                wx:for-index="index"
                wx:key="index"
        />
    </view>
</view>
<view class="{{ utils.bem('skeleton__content')}}" wx:else>
    <slot/>
</view>
