dynamic.vue 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. <template>
  2. <div id="dynamic">
  3. <el-row>
  4. <el-col :span="24">
  5. <el-tabs type="border-card" style="height:400px">
  6. <el-tab-pane v-for="(item,index) in dynamicList" :key="index">
  7. <span slot="label" class="title">{{item.title}}
  8. <span></span>
  9. </span>
  10. <el-col :span="24" class="content">
  11. <ul>
  12. <li v-for="(tag,index) in item.content" :key="index">
  13. <a href="#">
  14. <span class="dot"></span>
  15. <span>{{tag.title}}</span>
  16. <span class="tt">{{tag.time}}</span>
  17. </a>
  18. </li>
  19. </ul>
  20. <div class="entermore">
  21. <a href="#">查看更多</a>
  22. </div>
  23. </el-col>
  24. </el-tab-pane>
  25. </el-tabs>
  26. </el-col>
  27. </el-row>
  28. </div>
  29. </template>
  30. <script>
  31. export default {
  32. name: 'dynamic',
  33. props: {
  34. dynamicList: null,
  35. },
  36. components: {},
  37. data: () => ({}),
  38. created() {},
  39. computed: {},
  40. methods: {},
  41. };
  42. </script>
  43. <style lang="less" scoped>
  44. a {
  45. text-decoration: none;
  46. }
  47. ul {
  48. padding: 0px;
  49. list-style: none;
  50. }
  51. /deep/.el-tabs__nav {
  52. padding: 10px 10px 0 10px;
  53. background-color: #ffffff;
  54. width: 100%;
  55. }
  56. /deep/.el-tabs__item {
  57. display: contents;
  58. }
  59. /deep/.el-tabs--border-card > .el-tabs__content {
  60. padding: 0 15px 15px 15px;
  61. }
  62. /deep/.el-tabs__nav-wrap.is-scrollable {
  63. padding: 0;
  64. }
  65. /deep/.el-tabs--border-card > .el-tabs__header .el-tabs__item.is-active {
  66. color: #2c3350;
  67. }
  68. /deep/.el-tabs--border-card > .el-tabs__header .el-tabs__item:not(.is-disabled):hover {
  69. color: #2c3350;
  70. }
  71. .title {
  72. height: 45px;
  73. font-size: 22px;
  74. font-weight: bold;
  75. padding-left: 10px;
  76. }
  77. .title span {
  78. display: inline-block;
  79. height: 4px;
  80. width: 4px;
  81. text-align: center;
  82. background-color: #2b324e;
  83. margin: -16px 0px 4px 6px;
  84. }
  85. .el-tabs__item:last-child .title span {
  86. display: none;
  87. }
  88. .dot {
  89. width: 5px;
  90. height: 5px;
  91. background-color: #abaab8;
  92. border-radius: 90px;
  93. margin: 0 10px 6px 0;
  94. }
  95. .content ul {
  96. height: 177px;
  97. display: -webkit-box;
  98. text-overflow: ellipsis;
  99. overflow: hidden;
  100. -webkit-box-orient: vertical;
  101. }
  102. .content li {
  103. padding: 3px 0;
  104. }
  105. .content a {
  106. font-size: 16px;
  107. color: #6d6d77;
  108. }
  109. .tt {
  110. color: #abaab8;
  111. float: right;
  112. }
  113. .content a > span {
  114. display: inline-block;
  115. max-width: 600px;
  116. overflow: hidden;
  117. text-overflow: ellipsis;
  118. white-space: nowrap;
  119. }
  120. .entermore {
  121. margin-top: 10px;
  122. width: 765px;
  123. height: 30px;
  124. line-height: 30px;
  125. text-align: center;
  126. background: #f5f5f5;
  127. font-size: 16px;
  128. }
  129. </style>