blob: dba5634550cf3e85cc161d891a8fee8038a9fe83 [file] [log] [blame]
binquan.qiu7f2665f2020-03-27 17:19:57 +08001<wxs module="utils">
2 var double = function(a) {
3 return 2*a
4 };
5 var ifSpecialIcon = function(v) {
6 return v === 'arrow' || v === 'back'
7 }
8 module.exports = {
9 double: double,
10 ifSpecialIcon: ifSpecialIcon
11 }
12</wxs>
13
14<view class="{{extClass}} weui-icon" style="background:{{color}};width:{{size}}px;height:{{ utils.ifSpecialIcon(icon) ? utils.double(size) : size}}px;mask-image:url({{src}});-webkit-mask-image:url({{src}});-moz-mask-image:url({{src}})"></view>