progress.wxml 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. <custom style="height:{{CustomBar}}px;">
  2. <bar class="fixed gradual-blue" style="height:{{CustomBar}}px;padding-top:{{StatusBar}}px;">
  3. <navigator class='action' open-type="navigateBack" delta="1" hover-class="none">
  4. <text class='icon-back'></text> 进度条
  5. </navigator>
  6. </bar>
  7. </custom>
  8. <bar class="solid-bottom">
  9. <view class='action'>
  10. <text class='icon-title text-blue'></text>进度条形状
  11. </view>
  12. </bar>
  13. <view class="padding bg-white">
  14. <progress-bar>
  15. <view class='bg-red' style="width:{{loading?'61.8%':''}};">61.8%</view>
  16. </progress-bar>
  17. <progress-bar class="radius margin-top">
  18. <view class='bg-red' style="width:{{loading?'61.8%':''}};">61.8%</view>
  19. </progress-bar>
  20. <progress-bar class="round margin-top">
  21. <view class='bg-red' style="width:{{loading?'61.8%':''}};">61.8%</view>
  22. </progress-bar>
  23. </view>
  24. <bar class="solid-bottom margin-top">
  25. <view class='action'>
  26. <text class='icon-title text-blue'></text>进度条尺寸
  27. </view>
  28. </bar>
  29. <view class="padding bg-white">
  30. <progress-bar class="round">
  31. <view class='bg-red' style="width:{{loading?'61.8%':''}};"></view>
  32. </progress-bar>
  33. <progress-bar class="round margin-top sm">
  34. <view class='bg-red' style="width:{{loading?'61.8%':''}};"></view>
  35. </progress-bar>
  36. <progress-bar class="round margin-top xs">
  37. <view class='bg-red' style="width:{{loading?'61.8%':''}};"></view>
  38. </progress-bar>
  39. </view>
  40. <bar class="solid-bottom margin-top" bindtap="showModal" data-target="ColorModal">
  41. <view class='action'>
  42. <text class='icon-title text-blue'></text>进度条颜色
  43. </view>
  44. <view class='action'>
  45. <view class='padding-sm bg-{{color}} solid radius shadow-blur'></view>
  46. </view>
  47. </bar>
  48. <view class="padding {{color=='white'?'bg-grey':'bg-white'}}">
  49. <progress-bar class="round">
  50. <view class='bg-{{color}}' style="width:{{loading?'61.8%':''}};"></view>
  51. </progress-bar>
  52. </view>
  53. <bar class="solid-bottom margin-top">
  54. <view class='action'>
  55. <text class='icon-title text-blue'></text>进度条条纹
  56. </view>
  57. <switch class='sm margin-right-sm' bindchange='SetActive'></switch>
  58. </bar>
  59. <view class="padding bg-white">
  60. <progress-bar class="round sm striped {{active?'active':''}}">
  61. <view class='bg-green' style="width:{{loading?'60%':''}};"></view>
  62. </progress-bar>
  63. <progress-bar class="round sm margin-top-sm striped {{active?'active':''}}">
  64. <view class='bg-black' style="width:{{loading?'40%':''}};"></view>
  65. </progress-bar>
  66. </view>
  67. <bar class="solid-bottom margin-top">
  68. <view class='action'>
  69. <text class='icon-title text-blue'></text>进度条比例
  70. </view>
  71. </bar>
  72. <view class="padding bg-white">
  73. <progress-bar class="radius striped active">
  74. <view class='bg-red' style="width:{{loading?'30%':''}};">30%</view>
  75. <view class='bg-olive' style="width:{{loading?'45%':''}};">45%</view>
  76. <view class='bg-cyan' style="width:{{loading?'25%':''}};">25%</view>
  77. </progress-bar>
  78. </view>
  79. <bar class="solid-bottom margin-top">
  80. <view class='action'>
  81. <text class='icon-title text-blue'></text>进度条布局
  82. </view>
  83. </bar>
  84. <view class="padding bg-white ">
  85. <view class='flex'>
  86. <progress-bar class="round">
  87. <view class='bg-green' style="width:{{loading?'100%':''}};"></view>
  88. </progress-bar>
  89. <text class='icon-roundcheckfill text-green margin-left-sm'></text>
  90. </view>
  91. <view class='flex margin-top'>
  92. <progress-bar class="round">
  93. <view class='bg-green' style="width:{{loading?'80%':''}};"></view>
  94. </progress-bar>
  95. <text class='margin-left'>80%</text>
  96. </view>
  97. </view>
  98. <modal-box class="{{modalName=='ColorModal'?'show':''}}">
  99. <dialog>
  100. <bar class="justify-end">
  101. <view class='content'>选择颜色</view>
  102. <view class='action' bindtap='hideModal'>
  103. <text class='icon-close text-red'></text>
  104. </view>
  105. </bar>
  106. <view class='grid col-5 padding'>
  107. <view class='padding-xs' wx:for="{{ColorList}}" wx:key bindtap='SetColor' data-color='{{item.name}}' wx:if="{{item.name!='gray'}}">
  108. <view class='padding-tb bg-{{item.name}} radius'> {{item.title}} </view>
  109. </view>
  110. </view>
  111. </dialog>
  112. </modal-box>