home.vue 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. <template name="components">
  2. <view>
  3. <scroll-view scroll-y class="page">
  4. <cu-custom bgImage="https://image.weilanwl.com/color2.0/plugin/cjkz2329.jpg">
  5. <block slot="content">
  6. <image src="/static/cjkz.png" mode="aspectFill" style="width: 240upx;height: 60upx;"></image>
  7. </block>
  8. </cu-custom>
  9. <view class="cu-card">
  10. <view class="cu-item bg-img shadow-blur" :style="[{backgroundImage:'url('+item.img+')'}]" @tap="toChild" :data-url="item.url"
  11. v-for="(item,index) in list" :key="index">
  12. <view class="cardTitle">
  13. {{item.title}}
  14. </view>
  15. </view>
  16. </view>
  17. <view class="cu-tabbar-height"></view>
  18. </scroll-view>
  19. </view>
  20. </template>
  21. <script>
  22. export default {
  23. name: "components",
  24. data() {
  25. return {
  26. StatusBar: this.StatusBar,
  27. CustomBar: this.CustomBar,
  28. list: [{
  29. title: '索引列表',
  30. img: 'https://image.weilanwl.com/color2.0/plugin/sylb2244.jpg',
  31. url: '../plugin/indexes'
  32. },
  33. {
  34. title: '微动画',
  35. img: 'https://image.weilanwl.com/color2.0/plugin/wdh2236.jpg',
  36. url: '../plugin/animation'
  37. },
  38. {
  39. title: '全屏抽屉',
  40. img: 'https://image.weilanwl.com/color2.0/plugin/qpct2148.jpg',
  41. url: '../plugin/drawer'
  42. },
  43. {
  44. title: '垂直导航',
  45. img: 'https://image.weilanwl.com/color2.0/plugin/qpczdh2307.jpg',
  46. url: '../plugin/verticalnav'
  47. }
  48. ]
  49. };
  50. },
  51. methods: {
  52. toChild(e) {
  53. uni.navigateTo({
  54. url: e.currentTarget.dataset.url
  55. })
  56. },
  57. },
  58. }
  59. </script>
  60. <style>
  61. .page {
  62. height: 100vh;
  63. }
  64. .cardTitle {
  65. color: #fff;
  66. padding: 90upx 60upx;
  67. font-size: 40upx;
  68. font-weight: 300;
  69. transform: skew(-10deg, 0deg);
  70. position: relative;
  71. text-shadow: 0px 0px 6upx rgba(0, 0, 0, 0.3)
  72. }
  73. .cardTitle::before {
  74. content: "";
  75. position: absolute;
  76. width: 60upx;
  77. height: 6upx;
  78. border-radius: 20upx;
  79. background-color: #fff;
  80. display: block;
  81. top: 60upx;
  82. left: 50upx;
  83. transform: skew(10deg, 0deg);
  84. }
  85. .cardTitle::after {
  86. content: "";
  87. position: absolute;
  88. width: 140upx;
  89. border-radius: 6upx;
  90. height: 24upx;
  91. background-color: #fff;
  92. display: block;
  93. bottom: 76upx;
  94. left: 90upx;
  95. transform: skew(10deg, 0deg);
  96. opacity: 0.1;
  97. }
  98. </style>