12345678910111213141516171819202122232425262728293031323334353637 |
- <!-- 加载中占位 -->
- <view wx:if="{{isLoading}}" class="t-class {{classPrefix}} {{classPrefix}}__mask {{classPrefix}}--loading {{shape}}">
- <t-loading
- wx:if="{{loading === 'default'}}"
- theme="dots"
- size="40rpx"
- loading
- class="t-class-load"
- t-class-text="{{classPrefix}}--loading-text"
- ></t-loading>
- <view wx:elif="{{loading !== 'slot' && loading !== ''}}" class="{{classPrefix}}__common t-class-load">
- {{loading}}
- </view>
- <slot wx:else name="loading" class="t-class-load" />
- </view>
- <!-- 加载失败占位 -->
- <view wx:elif="{{isFailed}}" class="t-class {{classPrefix}} {{classPrefix}}__mask {{classPrefix}}--faild {{shape}}">
- <view wx:if="{{error === 'default'}}" style="font-size: 40rpx; color: #999" class="t-class-load">
- <t-icon name="close" />
- </view>
- <view wx:elif="{{error !== 'slot' && error !== ''}}" class="{{classPrefix}}__common t-class-load"> {{error}} </view>
- <slot wx:else name="error" class="t-class-load"></slot>
- </view>
- <!-- 图片 -->
- <image
- id="image"
- hidden="{{isLoading || isFailed}}"
- class="t-class {{classPrefix}} {{shape}}"
- src="{{src}}"
- style="{{widthStyle}}"
- mode="{{mode}}"
- webp="{{webp}}"
- lazy-load="{{lazy}}"
- bindload="onLoaded"
- binderror="onLoadError"
- show-menu-by-longpress="{{showMenuByLongpress}}"
- />
|