Card.vue 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. <template>
  2. <div class="book-card">
  3. <div class="thumb">
  4. <img :src="book.image" class="img" mode="aspectFit">
  5. </div>
  6. <div class="detail">
  7. <div class="row text-primary">
  8. <div class="right">
  9. {{book.rate}} <Rate :value="book.rate" />
  10. </div>
  11. <div class="left">
  12. {{book.title}}
  13. </div>
  14. </div>
  15. <div class="row">
  16. <div class="right text-primary">
  17. 浏览量:
  18. </div>
  19. <div class="left">
  20. {{book.author}}
  21. </div>
  22. </div>
  23. <div class="row">
  24. <div class="right">
  25. <!-- 捐赠人 -->
  26. {{book.user_info.nickName}}
  27. </div>
  28. <div class="left">
  29. {{book.publisher}}
  30. </div>
  31. </div>
  32. </div>
  33. </div>
  34. </template>
  35. <script>
  36. import Rate from '@/components/Rate';
  37. export default {
  38. components:{
  39. Rate
  40. },
  41. props: ['book']
  42. }
  43. </script>
  44. <style lang='scss' scoped>
  45. .book-card{
  46. padding:5px;
  47. overflow: hidden;
  48. margin-top:5px;
  49. margin-bottom:5px;
  50. font-size:14px;
  51. .thumb{
  52. width:90px;
  53. height:90px;
  54. float: left;
  55. margin:0 auto;
  56. overflow:hidden;
  57. .img{
  58. max-width: 100%;
  59. max-height: 100%;
  60. }
  61. }
  62. .detail{
  63. margin-left: 100px;
  64. .row{
  65. line-height:20px;
  66. margin-bottom:3px;
  67. }
  68. .right{
  69. float: right;
  70. }
  71. .left{
  72. margin-right:80px;
  73. }
  74. }
  75. }
  76. </style>