欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

微信小程序progress組件使用詳解

 更新時間:2018年01月31日 10:43:27   作者:Rattenking  
這篇文章主要為大家詳細介紹了微信小程序progress組件的使用,具有一定的參考價值,感興趣的小伙伴們可以參考一下

本文為大家分享了微信小程序progress組件的使用方法,供大家參考,具體內(nèi)容如下

效果圖

progress組件效果圖

WXML

<view class="tui-content">
 <view class="tui-menu-list">
  <text>show-info在進度條右側(cè)顯示百分比</text>
  <progress percent="50" show-info />
 </view>
 <view class="tui-menu-list">
  <text>stroke-width進度條線的寬度,單位px</text>
  <progress percent="50" stroke-width="12" show-info/>
 </view>
 <view class="tui-menu-list">
  <text>color進度條顏色</text>
  <progress percent="50" color="red" show-info/>
 </view>
 <view class="tui-menu-list">
  <text>active進度條從左往右的動畫</text>
  <progress percent="50" active show-info/>
 </view>
 <view class="tui-menu-list">
  <text>backgroundColor未選擇的進度條的顏色</text>
  <progress percent="50" backgroundColor="blue" active show-info/>
 </view>
 <view class="tui-menu-list">
  <text>動態(tài)設(shè)置進度條進度</text>
  <progress percent="{{index}}" show-info/>
 </view>
 <view class="tui-tabbar-content">
  <view class="tui-tabbar-group">
   <text data-id="10" bindtap="changeTabbar" class="tui-tabbar-cell {{index == 10 ? 'tui-active' : ''}}">10%</text>
   <text data-id="30" bindtap="changeTabbar" class="tui-tabbar-cell {{index == 30 ? 'tui-active' : ''}}">30%</text>
   <text data-id="50" bindtap="changeTabbar" class="tui-tabbar-cell {{index == 50 ? 'tui-active' : ''}}">50%</text>
   <text data-id="70" bindtap="changeTabbar" class="tui-tabbar-cell {{index == 70 ? 'tui-active' : ''}}">70%</text>
   <text data-id="90" bindtap="changeTabbar" class="tui-tabbar-cell {{index == 90 ? 'tui-active' : ''}}">90%</text>
  </view>
 </view>
</view>

JS

Page({
 data: {
  index: 10
 },
 changeTabbar(e){
  this.setData({ index: e.currentTarget.dataset.id})
 }
})


progress屬性

percent:初始化所占百分比
show-info:進度條右側(cè)是否顯示進度條百分比
stroke-width:進度條寬度,單位px,默認為6
color:進度條顏色
activeColor:已選擇的進度條的顏色
backgroundColor:未選擇的進度條的顏色
active:進度條從左往右的動畫
active-mode:backwards: 動畫從頭播;forwards:動畫從上次結(jié)束點接著播

DEMO下載

以上就是本文的全部內(nèi)容,希望對大家的學習有所幫助,也希望大家多多支持腳本之家。

相關(guān)文章

最新評論