riku
2026-03-05 9465dc404f7e7cd56100e4859ee0946a3fef7b09
1
2
3
4
5
6
7
8
9
10
11
12
13
14
<wxs module="utils">
    var double = function(a) {
        return 2*a
    };
    var ifSpecialIcon = function(v) {
      return v === 'arrow' || v === 'back'
    }
    module.exports = {
      double: double,
      ifSpecialIcon: ifSpecialIcon
    }
</wxs>
 
<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>