home.vue 2.3 KB

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