u-icon.wxml 813 Bytes
<view data-event-opts="{{[['tap',[['clickHandler',['$event']]]]]}}" class="{{['u-icon','data-v-2ee87dc9','u-icon--'+labelPos]}}" bindtap="__e"><block wx:if="{{isImg}}"><image class="u-icon__img data-v-2ee87dc9" style="{{$root.s0}}" src="{{name}}" mode="{{imgMode}}"></image></block><block wx:else><text class="{{['u-icon__icon','data-v-2ee87dc9',uClasses]}}" style="{{$root.s1}}" hover-class="{{hoverClass}}">{{icon}}</text></block><block wx:if="{{label!==''}}"><text class="u-icon__label data-v-2ee87dc9" style="{{'color:'+(labelColor)+';'+('font-size:'+($root.g0)+';')+('margin-left:'+(labelPos=='right'?$root.g1:0)+';')+('margin-top:'+(labelPos=='bottom'?$root.g2:0)+';')+('margin-right:'+(labelPos=='left'?$root.g3:0)+';')+('margin-bottom:'+(labelPos=='top'?$root.g4:0)+';')}}">{{label}}</text></block></view>