W3Cschool
恭喜您成為首批注冊(cè)用戶
獲得88經(jīng)驗(yàn)值獎(jiǎng)勵(lì)
圖標(biāo)。
說(shuō)明:
<!-- API-DEMO page/component/icon.axml -->
<view class="page">
<view class="page-description">圖標(biāo)</view>
<view class="page-section">
<view class="page-section-title">Type</view>
<view class="page-section-demo icon-list">
<block a:for="{{iconType}}">
<view class="item">
<icon type="{{item}}" size="45"/>
<text>{{item}}</text>
</view>
</block>
</view>
</view>
<view class="page-section">
<view class="page-section-title">Size</view>
<view class="page-section-demo icon-list">
<block a:for="{{iconSize}}">
<view class="item">
<icon type="success" size="{{item}}"/>
<text>{{item}}</text>
</view>
</block>
</view>
</view>
<view class="page-section">
<view class="page-section-title">Color</view>
<view class="page-section-demo icon-list">
<block a:for="{{iconColor}}">
<view class="item">
<icon type="success" size="45" color="{{item}}"/>
<text style="color:{{item}}">{{item}}</text>
</view>
</block>
</view>
</view>
</view>
// API-DEMO page/component/icon.js
Page({
data: {
iconSize: [20, 30, 40, 50, 60],
iconColor: [
'red', 'yellow', 'blue', 'green',
],
iconType: [
'success',
'info',
'warn',
'waiting',
'clear',
'success_no_circle',
'download',
'cancel',
'search',
],
},
});
/* API-DEMO page/component/icon.acss */
.icon-list {
display: -webkit-flex;
display: flex;
-webkit-flex-wrap: wrap;
flex-wrap: wrap;
}
.item {
display: -webkit-flex;
display: flex;
flex-direction: column;
-webkit-flex-direction: column;
margin-bottom: 10px;
margin-right: 10px;
align-items: center;
-webkit-align-items: center;
}
屬性名 | 類型 | 默認(rèn)值 | 描述 | 最低版本 |
---|---|---|---|---|
type | String | - | icon 類型,有效值: info,warn,waiting,cancel,download,search,clear,success,success_no_circle,loading。 | loading(1.7.2) |
size | Number | 23 | icon 大小,單位 px。 | - |
color | String | - | icon 顏色,同 CSS 色值。 | - |
Copyright©2021 w3cschool編程獅|閩ICP備15016281號(hào)-3|閩公網(wǎng)安備35020302033924號(hào)
違法和不良信息舉報(bào)電話:173-0602-2364|舉報(bào)郵箱:jubao@eeedong.com
掃描二維碼
下載編程獅App
編程獅公眾號(hào)
聯(lián)系方式:
更多建議: