hjyd的手机端
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.

101 lines
2.5 KiB

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
  1. <template>
  2. <div class="news_container">
  3. <HeadLine title="新闻/NEWS" line1="获取行业最新咨询" />
  4. <div class="card_wrap">
  5. <div class="card" v-for="(item, index) in newsList" :key="item.id">
  6. <div :class="activeTab == item.id ? 'header active' : 'header'">
  7. <div class="wrap">
  8. <img class="icon" :src="item.icon" />
  9. <p class="font">{{ item.title }}</p>
  10. </div>
  11. </div>
  12. <img class="img" :src="item.list[index].pic" />
  13. <div class="bottom">
  14. <p class="title">{{ item.list[index].productTitle }}</p>
  15. <p class="desc">{{ item.list[index].desc }}</p>
  16. </div>
  17. </div>
  18. </div>
  19. </div>
  20. </template>
  21. <script setup>
  22. import HeadLine from 'cpns/HeadLine'
  23. import { newsList } from '@/mock'
  24. import { ref } from 'vue'
  25. const activeTab = ref(1)
  26. </script>
  27. <style lang="scss" scoped>
  28. .news_container {
  29. background: #fff;
  30. .card_wrap {
  31. display: grid;
  32. grid-template-columns: repeat(3, 1fr);
  33. padding: 0 7px;
  34. box-sizing: border-box;
  35. border-radius: 3px;
  36. overflow: hidden;
  37. .card {
  38. flex: 1;
  39. background: #ededed;
  40. .header {
  41. display: flex;
  42. align-items: center;
  43. justify-content: center;
  44. .wrap {
  45. display: flex;
  46. align-items: center;
  47. padding: 7px 0;
  48. box-sizing: border-box;
  49. .icon {
  50. min-width: 13px;
  51. min-height: 13px;
  52. }
  53. .font {
  54. font-size: 16px;
  55. transform: scale(0.5);
  56. font-family: Alibaba PuHuiTi;
  57. font-weight: 400;
  58. white-space: nowrap;
  59. width: 200%;
  60. }
  61. }
  62. }
  63. .active {
  64. background: #f94622;
  65. color: #ffffff;
  66. }
  67. .img {
  68. width: 100%;
  69. height: auto;
  70. }
  71. .bottom {
  72. padding: 8px;
  73. box-sizing: border-box;
  74. .title {
  75. font-size: 14px;
  76. font-family: Source Han Sans CN;
  77. font-weight: 400;
  78. color: #262626;
  79. transform: scale(0.5);
  80. transform-origin: 0 center;
  81. max-width: 100px;
  82. white-space: nowrap;
  83. }
  84. .desc {
  85. font-size: 12px;
  86. font-family: Source Han Sans CN;
  87. font-weight: 300;
  88. color: #afafaf;
  89. transform: scale(0.5);
  90. transform-origin: 0 center;
  91. white-space: nowrap;
  92. max-width: 100px;
  93. }
  94. }
  95. }
  96. }
  97. }
  98. </style>