进度条 Progress

基本用法

进度条 Progress - 图1

  1. <template lang="html">
  2. <main>
  3. <div class="demo-hidden">
  4. <div class="progress" style="margin-bottom:50px;">
  5. <za-progress :percent='percent' :theme='theme'>
  6. {{percent + '%'}}
  7. </za-progress>
  8. </div>
  9. <div class="progress">
  10. <za-progress type='circle' :percent='percent' :theme='theme'>
  11. <div class="progress-content">
  12. <span class="progress-text">{{percent}}</span>
  13. <span class="progress-percent">%</span>
  14. </div>
  15. </za-progress>
  16. </div>
  17. <za-panel>
  18. <za-panel-header title="基本"></za-panel-header>
  19. <za-panel-body>
  20. <za-cell title='进度'>
  21. <za-stepper
  22. shape="radius"
  23. :step='10'
  24. :min='0'
  25. :max='100'
  26. v-model='percent'
  27. @step-change='handleStepChange'
  28. />
  29. </za-cell>
  30. <za-cell title='主题'>
  31. <za-select
  32. v-model='theme'
  33. :data-source='dataSource'
  34. @ok='handleOk'
  35. />
  36. </za-cell>
  37. </za-panel-body>
  38. </za-panel>
  39. </div>
  40. </main>
  41. </template>
  42. <script>
  43. export default {
  44. data() {
  45. return {
  46. percent: 10,
  47. theme: 'primary',
  48. dataSource:[
  49. { value: 'default', label: 'default' },
  50. { value: 'primary', label: 'primary' },
  51. { value: 'info', label: 'info' },
  52. { value: 'warning', label: 'warning' },
  53. { value: 'error', label: 'error' },
  54. ],
  55. }
  56. },
  57. methods: {
  58. handleStepChange(e) {
  59. },
  60. handleOk(v) {
  61. this.theme = v.value;
  62. }
  63. },
  64. };
  65. </script>

API

属性类型默认值可选值/参数说明
prefixClsstringza-progress类名前缀
themestring'primary''default', 'primary', 'info', 'success', 'warning', 'error'主题
percentnumber0进度百分比(范围:0~100)
shapestring'line''line', 'circle'类型