home.vue 1.9 KB

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