tabsNews.vue 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. <template>
  2. <div class="tabsNewsBox">
  3. <editBtn :id="id" :sort="sort" :type="2" :size="5"/>
  4. <el-tabs v-model="activeName" @tab-click="handleClick">
  5. <el-tab-pane label="地方动态" name="first">
  6. <ul class="newsListBox">
  7. <li>
  8. <a href="javascript:;">资讯标题资讯标题资讯标题资讯标题资讯标题</a>
  9. <div>11-29</div>
  10. </li>
  11. <li>
  12. <a href="javascript:;">资讯标题资讯标题资讯标题资讯标题资讯标题</a>
  13. <div>11-29</div>
  14. </li>
  15. <li>
  16. <a href="javascript:;">资讯标题资讯标题资讯标题资讯标题资讯标题</a>
  17. <div>11-29</div>
  18. </li>
  19. <li>
  20. <a href="javascript:;">资讯标题资讯标题资讯标题资讯标题资讯标题</a>
  21. <div>11-29</div>
  22. </li>
  23. <li>
  24. <a href="javascript:;">资讯标题资讯标题资讯标题资讯标题资讯标题</a>
  25. <div>11-29</div>
  26. </li>
  27. </ul>
  28. </el-tab-pane>
  29. <el-tab-pane label="农资市场" name="second"></el-tab-pane>
  30. <el-tab-pane label="农产市场" name="third"></el-tab-pane>
  31. <el-tab-pane label="农村市场" name="fourth"></el-tab-pane>
  32. </el-tabs>
  33. </div>
  34. </template>
  35. <script>
  36. import editBtn from '../../../public/editBtn.vue'
  37. export default {
  38. components: {
  39. editBtn
  40. },
  41. props: {
  42. id:{
  43. type:Number,
  44. default:0
  45. },
  46. sort:{
  47. type:Number,
  48. default:0
  49. }
  50. },
  51. data() {
  52. return {
  53. activeName:"first"
  54. };
  55. },
  56. methods: {
  57. handleClick(tab, event) {
  58. console.log(tab, event);
  59. }
  60. },
  61. mounted() {
  62. },
  63. };
  64. </script>
  65. <style scoped lang="less">
  66. .tabsNewsBox {
  67. .newsListBox {
  68. padding: 0;
  69. li {
  70. list-style-type: none;
  71. height: 20px;
  72. padding: 0;
  73. display: flex;
  74. align-items: center;
  75. justify-content: space-between;
  76. margin-bottom: 10px;
  77. a {
  78. display: block;
  79. background: url('../../../../../assets/template/component/listyle.png') no-repeat left center;
  80. box-sizing: border-box;
  81. padding-left: 20px;
  82. white-space: nowrap;
  83. overflow: hidden;
  84. text-overflow: ellipsis;
  85. flex: 1;
  86. font-size: 16px;
  87. }
  88. div {
  89. color: #999;
  90. width: 50px;
  91. }
  92. }
  93. }
  94. }
  95. </style>