ListSecondaryHeading.vue 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. <template>
  2. <section class="channel_1 clearfix">
  3. <div class="channel_head_box clearfix">
  4. <div class="channel_head_a_name_box clearfix">
  5. <NuxtLink :href="`/${pinyin}/index.html`" class="channel_head_a_name">
  6. {{ name }}
  7. </NuxtLink>
  8. </div>
  9. <div class="channel_head_a_img_box back100"></div>
  10. <nav class="channel_nav_box clearfix">
  11. <NuxtLink :to="{ path: `/${targetRoute}/${item.aLIas_pinyin}/list-1.html` }" class="channel_head_a"
  12. v-for="(item, index) in nav">{{ item.alias }}</NuxtLink>
  13. </nav>
  14. </div>
  15. </section>
  16. </template>
  17. <script setup>
  18. //1.设置组件数据 start---------------------------------------->
  19. //子导航
  20. const props = defineProps({
  21. name: String,
  22. nav: Array,
  23. pinyin: String,
  24. });
  25. //获取当前url路径
  26. const route = useRoute();
  27. //获得当前的完整路径
  28. const fullPath = route.path;
  29. const segments = fullPath.split('/');
  30. const targetRoute = segments[1];
  31. //1.设置组件数据 end---------------------------------------->
  32. </script>
  33. <style lang="less" scoped>
  34. /*农民工网-频道页*/
  35. .channel_1 {
  36. width: 1200px;
  37. margin: 0 auto;
  38. }
  39. .channel_head_box {
  40. border-top-left-radius: 3px;
  41. border-top-right-radius: 3px;
  42. border: solid 1px #D9D9D9;
  43. margin-top: 20px;
  44. margin-bottom: 15px;
  45. box-sizing: border-box;
  46. border-bottom: solid 2px #489D97;
  47. background: #fafafa;
  48. box-sizing: border-box;
  49. display: flex;
  50. align-items: center;
  51. .channel_nav_box {
  52. flex: 1;
  53. padding: 9px 0px;
  54. }
  55. .channel_head_a {
  56. position: relative;
  57. height: 18px;
  58. line-height: 18px;
  59. color: #333;
  60. font-size: 14px;
  61. border-top-left-radius: 3px;
  62. border-top-right-radius: 3px;
  63. float: left;
  64. padding: 0px 24px;
  65. text-align: center;
  66. box-sizing: border-box;
  67. margin: 5px 0px 5px -2px;
  68. // width: 101px;
  69. &:hover {
  70. color: #489D97;
  71. }
  72. }
  73. .channel_head_a::after {
  74. content: '';
  75. display: block;
  76. position: absolute;
  77. width: 2px;
  78. height: 12px;
  79. background: #DBDBDB;
  80. top: 3px;
  81. left: -1px;
  82. }
  83. }
  84. .channel_head_a_name_box {
  85. display: flex;
  86. margin-top: auto;
  87. }
  88. .channel_head_a_name {
  89. background: #489D97;
  90. font-size: 18px;
  91. font-weight: bold;
  92. color: #fff;
  93. padding: 0px 15px;
  94. position: relative;
  95. height: 44px;
  96. line-height: 44px;
  97. font-size: 18px;
  98. border-top-left-radius: 3px;
  99. border-top-right-radius: 3px;
  100. padding: 0px 15px;
  101. text-align: center;
  102. }
  103. .channel_head_a_img_box {
  104. width: 36px;
  105. height: 34px;
  106. float: left;
  107. background-image: url(@/public/img/25.png);
  108. margin: 0px 20px 0px 19px;
  109. }
  110. .channel_head_a:nth-of-type(1)::after,
  111. .channel_head_a:nth-of-type(11)::after {
  112. content: '';
  113. display: none;
  114. }
  115. </style>