大数据展示系统-前端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

75 lines
1.5 KiB

3 years ago
3 years ago
  1. <template>
  2. <div id="bookshelf">
  3. <div class="bookshelf-header" style="height:120px">
  4. <router-link to="/">
  5. <span class="icon iconfont icon-l">&#xe631;</span>
  6. </router-link>
  7. <h2>作者推荐</h2>
  8. </div>
  9. <div class="main">
  10. <div v-for="(item,index) in authorList" :key="index" class="book-rack">
  11. <span class="author-index">{{ index+1 }}</span>
  12. <div class="author-brief">
  13. <h3>{{ item.name }}</h3>
  14. <p>{{ item.brief }}</p>
  15. </div>
  16. </div>
  17. </div>
  18. </div>
  19. </template>
  20. <script>
  21. import data1 from './data1.json'
  22. export default {
  23. name: 'AuthorRecommend',
  24. components: {
  25. },
  26. data() {
  27. return {
  28. authorList: []
  29. }
  30. },
  31. created() {
  32. this.authorList = data1.authors
  33. }
  34. }
  35. </script>
  36. <style lang="scss" scoped>
  37. @import "~@/assets/styles/index.scss";
  38. .main{
  39. padding-top: 40px;
  40. height: calc(100vh - 180px);
  41. overflow: hidden;
  42. overflow-y:auto ;
  43. .book-rack{
  44. height: 387px;
  45. margin-bottom: 40px;
  46. padding: 0;
  47. display: flex;
  48. align-items: center;
  49. color: #333;
  50. .author-index{
  51. width: 120px;
  52. text-align: center;
  53. }
  54. .author-brief{
  55. flex: 1;
  56. padding: 20px 50px 20px 0;
  57. h3{
  58. font-size: 40px;
  59. margin-bottom: 20px;
  60. }
  61. p{
  62. font-size: 30px;
  63. overflow: hidden;
  64. display: -webkit-box;
  65. -webkit-line-clamp: 4;
  66. line-clamp: 4;
  67. -webkit-box-orient: vertical;
  68. }
  69. }
  70. }
  71. }
  72. </style>