ListSecondaryHeading_zgzp.vue 2.5 KB

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