ListSecondaryHeading.vue 2.8 KB

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