icon

属性名 类型 默认值 说明
type String icon的类型,有效值:success,success_no_circle,info,warn,waiting,cancel,download,search,clear
size Number 23 icon的大小,单位px
color Color icon的颜色,同css的color

示例:

Page({
  data: {
    iconSize: [20, 30, 40, 50, 60, 70],
    iconColor: [
      'red', 'orange', 'yellow', 'green', 'rgb(0,255,255)', 'blue', 'purple'
    ],
    iconType: [
      'success', 'info', 'warn', 'waiting', 'safe_success', 'safe_warn',
      'success_circle', 'success_no_circle', 'waiting_circle', 'circle', 'download',
      'info_circle', 'cancel', 'search', 'clear'
    ]
  }
})
<view class="group">
    <block wx:for-items="{{iconSize}}">
        <icon type="success" size="{{item}}"/>
    </block>
</view>

<view class="group">
    <scroll-view scroll-x>
        <block wx:for-items="{{iconType}}">
            <icon type="{{item}}" size="45"/>
        </block>
    </scroll-view>
</view>


<view class="group">
    <block wx:for-items="{{iconColor}}">
        <icon type="success" size="45" color="{{item}}"/>
    </block>
</view>

icon

个结果 ""

    没有找到相关内容 ""