Card.vue 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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}}
  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. export default {
  37. props: ['book'],
  38. }
  39. </script>
  40. <style lang='scss' scoped>
  41. .book-card{
  42. padding:5px;
  43. overflow: hidden;
  44. margin-top:5px;
  45. margin-bottom:5px;
  46. font-size:14px;
  47. .thumb{
  48. width:90px;
  49. height:90px;
  50. float: left;
  51. margin:0 auto;
  52. overflow:hidden;
  53. .img{
  54. max-width: 100%;
  55. max-height: 100%;
  56. }
  57. }
  58. .detail{
  59. margin-left: 100px;
  60. .row{
  61. line-height:20px;
  62. margin-bottom:3px;
  63. }
  64. .right{
  65. float: right;
  66. }
  67. .left{
  68. margin-right:80px;
  69. }
  70. }
  71. }
  72. </style>