u-image.wxml
1.3 KB
<view data-event-opts="{{[['tap',[['onClick',['$event']]]]]}}" class="u-image data-v-32babe48" style="{{$root.s0}}" bindtap="__e"><block wx:if="{{!isError}}"><image class="u-image__image data-v-32babe48" style="{{'border-radius:'+(shape=='circle'?'50%':$root.g0)+';'}}" src="{{src}}" mode="{{mode}}" lazy-load="{{lazyLoad}}" show-menu-by-longpress="{{showMenuByLongpress}}" data-event-opts="{{[['error',[['onErrorHandler',['$event']]]],['load',[['onLoadHandler',['$event']]]]]}}" binderror="__e" bindload="__e"></image></block><block wx:if="{{showLoading&&loading}}"><view class="u-image__loading data-v-32babe48" style="{{'border-radius:'+(shape=='circle'?'50%':$root.g1)+';'+('background-color:'+(this.bgColor)+';')}}"><block wx:if="{{$slots.loading}}"><slot name="loading"></slot></block><block wx:else><u-icon vue-id="249d8bbe-1" name="{{loadingIcon}}" width="{{width}}" height="{{height}}" class="data-v-32babe48" bind:__l="__l"></u-icon></block></view></block><block wx:if="{{showError&&isError&&!loading}}"><view class="u-image__error data-v-32babe48" style="{{'border-radius:'+(shape=='circle'?'50%':$root.g2)+';'}}"><block wx:if="{{$slots.error}}"><slot name="error"></slot></block><block wx:else><u-icon vue-id="249d8bbe-2" name="{{errorIcon}}" width="{{width}}" height="{{height}}" class="data-v-32babe48" bind:__l="__l"></u-icon></block></view></block></view>