poster-list.vue 1022 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <template>
  2. <view class="poster-list animated fadeIn fast">
  3. <view><image :src="item.img" mode="widthFix" :data-posterImg="item.img" lazy-load @tap="toPosterDetail"></image></view>
  4. <view class="u-f-ajc">{{item.name}}</view>
  5. </view>
  6. </template>
  7. <script>
  8. export default {
  9. props:{
  10. item:Object,
  11. index:Number
  12. },
  13. methods:{
  14. // 跳转海报详情页面
  15. toPosterDetail(e){
  16. var posterimg = e.currentTarget.dataset.posterimg;
  17. this.navigate({
  18. url: '/pages/tools/poster/poster-detail?img='+posterimg
  19. }, "navigateTo", true)
  20. }
  21. }
  22. }
  23. </script>
  24. <style scoped>
  25. .poster-list{
  26. width: 335upx;
  27. display: inline-block;
  28. border-radius: 20upx;
  29. margin: 25upx 20upx 0upx;
  30. overflow: hidden;
  31. box-sizing: border-box;
  32. background: #FFFFFF;
  33. }
  34. .poster-list>view:nth-of-type(1)>image{
  35. width: 100%;
  36. }
  37. .poster-list>view:nth-of-type(2){
  38. width: 100%;
  39. background-color: #FFFFFF;
  40. height: 60upx;
  41. padding-bottom: 10upx;
  42. }
  43. .u-f-ajc{
  44. text-align: center;
  45. font-weight: bold;
  46. }
  47. </style>