/* pages/type/type.wxml*/
<view class="group">
<block wx:for="{{iconSize}}">
<icon type="success" size="{{item}}"/>
</block>
</view>
<view class="group">
<block wx:for="{{iconType}}">
<icon type="{{item}}" size="30"/>
</block>
</view>
<view class="group">
<block wx:for="{{iconColor}}">
<icon type="success" size="40" color="{{item}}"/>
</block>
<!-- 进度条 -->
<progress class="progress_1" percent="20" show-info />
<!-- 进度条的百分比 -->
<progress percent="40" stroke-width="12" />
<!-- 进度条的宽度 -->
<progress percent="60" color="pink" />
<!-- 进度条的颜色 -->
<progress percent="70" color="red" active/>
<!-- 进度条从左往右的动画 -->
</view>
/* pages/type/type.wxss */
.group icon{
margin-left: 10rpx;
margin-top: 50rpx;
}
progress{
margin-top: 70rpx;
}
/* pages/type/type.js*/
Page({
data: {
iconSize: [15, 20, 25, 30, 35, 40, 45, 50 ],
iconColor: [
'red', 'orange', 'yellow', 'green', 'rgb(0,255,255)', 'blue', 'purple'
],
iconType: [
'success', 'success_no_circle', 'info', 'warn', 'waiting', 'cancel', 'download', 'search', 'clear'
]
}
})
image.png
网友评论