You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

step.vue 2.1 KiB

4 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. <template>
  2. <view>
  3. <l-title>基本步骤条:</l-title>
  4. <view class="bg-white padding">
  5. <l-step
  6. :steps="[
  7. { title: '步骤1', icon: 'emoji' },
  8. { title: '步骤2', icon: 'home' },
  9. { title: '步骤3', icon: 'search' },
  10. { title: '步骤4', icon: 'check' }
  11. ]"
  12. :step="1"
  13. />
  14. <l-step
  15. :steps="[
  16. { title: '步骤1', icon: 'emoji' },
  17. { title: '步骤2', icon: 'home' },
  18. { title: '步骤3', icon: 'search' },
  19. { title: '步骤4', icon: 'check' }
  20. ]"
  21. :step="2"
  22. activeColor="red"
  23. class="margin-top-sm"
  24. point
  25. />
  26. </view>
  27. <l-demo-description>
  28. 步骤条使用 l-step 标签;绑定 steps 属性作为步骤条项的显示内容,这是一个数组;
  29. steps 使用以下数据: [{title:'步骤标题',icon:'步骤图标'},...] ;
  30. 属性 step 表示当前所处步骤号;属性 activeColor 表示激活时的颜色;添加属性 point 将把未激活的步骤显示为圆点
  31. </l-demo-description>
  32. <l-title>箭头步骤条:</l-title>
  33. <view class="bg-white padding">
  34. <l-step
  35. :steps="[
  36. { title: '步骤1', icon: 'emoji' },
  37. { title: '步骤2', icon: 'home' },
  38. { title: '步骤3', icon: 'search' },
  39. { title: '步骤4', icon: 'check' }
  40. ]"
  41. :step="1"
  42. arrow
  43. />
  44. </view>
  45. <l-demo-description>
  46. 给 l-step 标签添加 arrow 属性即可使用箭头步骤条
  47. </l-demo-description>
  48. <l-title>数字步骤条:</l-title>
  49. <view class="bg-white padding">
  50. <l-step
  51. :steps="[
  52. { title: '步骤1', icon: 'emoji' },
  53. { title: '步骤2', icon: 'home' },
  54. { title: '步骤3', icon: 'search' },
  55. { title: '步骤4', icon: 'check' }
  56. ]"
  57. :step="1"
  58. number
  59. arrow
  60. />
  61. </view>
  62. <l-demo-description>
  63. 给 l-step 标签添加 number 即可使用数字编号图标
  64. </l-demo-description>
  65. </view>
  66. </template>