BigTitle_List.vue 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. <template>
  2. <div class="list">
  3. <div class="inner">
  4. <ul>
  5. <li v-for="item in headlinelist1" class="left">
  6. <!-- <i></i> -->
  7. <NuxtLink :to="{path:`/newsDetail/${item.id}`,query:{listId:routeId,listName:routeName}}" :title="item.title">{{item.title}}</NuxtLink>
  8. </li>
  9. </ul>
  10. </div>
  11. </div>
  12. </template>
  13. <script setup>
  14. const props = defineProps({
  15. headlinelist1: Object
  16. });
  17. // const headlinelist1 = ref("")
  18. // async function getModelData1() {
  19. // const { data: mkdata, error: mkdataError } = requestData('/web/getWebsiteArticlett', {
  20. // method: 'GET',
  21. // query: {
  22. // 'pageSize': 2,
  23. // 'level': 1,
  24. // 'placeid': 2,
  25. // 'id':''
  26. // },
  27. // });
  28. // if (mkdataError.value) {
  29. // //console.error('模块1数据上部分请求失败!', mkdataError.value);
  30. // } else {
  31. // if (mkdata.value) {
  32. // //console.log('模块1数据上部分请求成功!', mkdata.value.data);
  33. // headlinelist1.value = mkdata.value.data;
  34. // }
  35. // }
  36. // }
  37. // getModelData1()
  38. </script>
  39. <style lang="less" scoped>
  40. // 列表
  41. .list {
  42. height: 34px;
  43. margin: 16px 0 20px 0;
  44. .inner {
  45. height: 20px;
  46. margin: 0 auto;
  47. }
  48. ul {
  49. width: auto;
  50. height: 20px;
  51. box-sizing: border-box;
  52. padding-left: 180px;
  53. li:nth-child(1) {
  54. border-right: 1px solid #CCCCCC;
  55. }
  56. >li {
  57. width: 470px;
  58. margin-right: 30px;
  59. >i {
  60. display: inline-block;
  61. width: 13px;
  62. height: 13px;
  63. background-color: #d9d9d9;
  64. border-radius: 7px;
  65. // vertical-align: middle;
  66. margin-right: 10px;
  67. }
  68. >a {
  69. display: inline-block;
  70. width: 460px;
  71. height: 20px;
  72. white-space: nowrap;
  73. overflow: hidden;
  74. text-overflow: ellipsis;
  75. font-family: PingFang SC, PingFang SC;
  76. font-weight: 600;
  77. font-size: 18px;
  78. color: #333333;
  79. line-height: 16px;
  80. text-align: left;
  81. font-style: normal;
  82. text-transform: none;
  83. vertical-align: middle;
  84. }
  85. }
  86. >li:hover>i {
  87. background-color: #139602;
  88. }
  89. >li:hover>a {
  90. color: #139602;
  91. }
  92. }
  93. }
  94. </style>