home.vue 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. <template name="basics">
  2. <view>
  3. <scroll-view scroll-y class="page">
  4. <image src="/static/componentBg.png "
  5. mode="widthFix" class="response"></image>
  6. <view class="nav-list">
  7. <navigator hover-class="none" :url="'/pages/basics/' + item.name" class="nav-li" navigateTo :class="'bg-'+item.color"
  8. :style="[{animation: 'show ' + ((index+1)*0.2+1) + 's 1'}]" v-for="(item,index) in elements" :key="index">
  9. <view class="nav-title">{{item.title}}</view>
  10. <view class="nav-name">{{item.name}}</view>
  11. <text :class="'cuIcon-' + item.cuIcon"></text>
  12. </navigator>
  13. </view>
  14. <view class="cu-tabbar-height"></view>
  15. </scroll-view>
  16. </view>
  17. </template>
  18. <script>
  19. export default {
  20. name: "basics",
  21. data() {
  22. return {
  23. elements: [{
  24. title: '布局',
  25. name: 'layout',
  26. color: 'cyan',
  27. cuIcon: 'newsfill'
  28. },
  29. {
  30. title: '背景',
  31. name: 'background',
  32. color: 'blue',
  33. cuIcon: 'colorlens'
  34. },
  35. {
  36. title: '文本',
  37. name: 'text',
  38. color: 'purple',
  39. cuIcon: 'font'
  40. },
  41. {
  42. title: '图标 ',
  43. name: 'icon',
  44. color: 'mauve',
  45. cuIcon: 'cuIcon'
  46. },
  47. {
  48. title: '按钮',
  49. name: 'button',
  50. color: 'pink',
  51. cuIcon: 'btn'
  52. },
  53. {
  54. title: '标签',
  55. name: 'tag',
  56. color: 'brown',
  57. cuIcon: 'tagfill'
  58. },
  59. {
  60. title: '头像',
  61. name: 'avatar',
  62. color: 'red',
  63. cuIcon: 'myfill'
  64. },
  65. {
  66. title: '进度条',
  67. name: 'progress',
  68. color: 'orange',
  69. cuIcon: 'icloading'
  70. },
  71. {
  72. title: '边框阴影',
  73. name: 'shadow',
  74. color: 'olive',
  75. cuIcon: 'copy'
  76. },
  77. {
  78. title: '加载',
  79. name: 'loading',
  80. color: 'green',
  81. cuIcon: 'loading2'
  82. }
  83. ],
  84. };
  85. },
  86. onShow() {
  87. console.log("success")
  88. }
  89. }
  90. </script>
  91. <style>
  92. .page {
  93. height: 100vh;
  94. }
  95. </style>