home.vue 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. <template name="components">
  2. <view>
  3. <cu-custom bgColor="bg-gradual-pink" :isBack="true">
  4. <block slot="backText">返回</block>
  5. <block slot="content"> 组件</block>
  6. </cu-custom>
  7. <scroll-view scroll-y class="page">
  8. <!-- <image src="/static/componentBg.png" mode="widthFix" class="response"></image> -->
  9. <view class="nav-list" style="margin-top: 10px;">
  10. <navigator hover-class='none' :url="'/pages/samples/component/' + item.name" class="nav-li" navigateTo :class="'bg-'+item.color"
  11. :style="[{animation: 'show ' + ((index+1)*0.2+1) + 's 1'}]" v-for="(item,index) in elements" :key="index">
  12. <view class="nav-title">{{item.title}}</view>
  13. <view class="nav-name">{{item.name}}</view>
  14. <text :class="'cuIcon-' + item.cuIcon"></text>
  15. </navigator>
  16. </view>
  17. <view class="cu-tabbar-height"></view>
  18. </scroll-view>
  19. </view>
  20. </template>
  21. <script>
  22. export default {
  23. data() {
  24. return {
  25. elements: [{
  26. title: '操作条',
  27. name: 'bar',
  28. color: 'purple',
  29. cuIcon: 'vipcard'
  30. },
  31. {
  32. title: '导航栏 ',
  33. name: 'nav',
  34. color: 'mauve',
  35. cuIcon: 'formfill'
  36. },
  37. {
  38. title: '列表',
  39. name: 'list',
  40. color: 'pink',
  41. cuIcon: 'list'
  42. },
  43. {
  44. title: '卡片',
  45. name: 'card',
  46. color: 'brown',
  47. cuIcon: 'newsfill'
  48. },
  49. {
  50. title: '表单',
  51. name: 'form',
  52. color: 'red',
  53. cuIcon: 'formfill'
  54. },
  55. {
  56. title: '时间轴',
  57. name: 'timeline',
  58. color: 'orange',
  59. cuIcon: 'timefill'
  60. },
  61. {
  62. title: '聊天',
  63. name: 'chat',
  64. color: 'green',
  65. cuIcon: 'messagefill'
  66. },
  67. {
  68. title: '轮播',
  69. name: 'swiper',
  70. color: 'olive',
  71. cuIcon: 'album'
  72. },
  73. {
  74. title: '模态框',
  75. name: 'modal',
  76. color: 'grey',
  77. cuIcon: 'squarecheckfill'
  78. },
  79. {
  80. title: '步骤条',
  81. name: 'steps',
  82. color: 'cyan',
  83. cuIcon: 'roundcheckfill'
  84. }
  85. ],
  86. };
  87. }
  88. }
  89. </script>
  90. <style>
  91. .page {
  92. height: 100vh;
  93. }
  94. </style>