• icon

    icon

    图标。

    属性名类型默认值说明
    typeStringicon的类型,有效值:success, success_no_circle, info, warn, waiting, cancel, download, search, clear
    sizeNumber / String23pxicon的大小,单位px
    colorColoricon的颜色,同css的color
    aria-labelString无障碍访问,(属性)元素的额外描述

    示例:

    1. <view class="group">
    2. <block qq:for="{{iconSize}}">
    3. <icon type="success" size="{{item}}" />
    4. </block>
    5. </view>
    6. <view class="group">
    7. <block qq:for="{{iconType}}">
    8. <icon type="{{item}}" size="40" />
    9. </block>
    10. </view>
    11. <view class="group">
    12. <block qq:for="{{iconColor}}">
    13. <icon type="success" size="40" color="{{item}}" />
    14. </block>
    15. </view>
    1. Page({
    2. data: {
    3. iconSize: [20, 30, 40, 50, 60, 70],
    4. iconColor: [
    5. 'red', 'orange', 'yellow', 'green', 'rgb(0,255,255)', 'blue', 'purple'
    6. ],
    7. iconType: [
    8. 'success', 'success_no_circle', 'info', 'warn', 'waiting', 'cancel', 'download', 'search', 'clear'
    9. ]
    10. }
    11. })

    icon