ListSecondaryHeading.vue 2.9 KB

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