1.vue 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182
  1. <template>
  2. <!--样式1-->
  3. <div class="floatMenuBox" v-if="componentStyle == 1">
  4. <div class="title">导航列表</div>
  5. <div v-for="(item, index) in bottomMenu" :key="index" :class="item.id == pageId ? 'active' : ''">
  6. <NuxtLink v-if="item.type == 0" :to="`/about/${item.name_pinyin}/index.html`" :title="item.name">
  7. {{ item.name }}
  8. </NuxtLink>
  9. <NuxtLink v-else-if="item.type == 1" :to="`/about/${item.name_pinyin}/list-1.html`" :title="item.name">
  10. {{ item.name }}
  11. </NuxtLink>
  12. </div>
  13. </div>
  14. <!--样式2-->
  15. <div class="floatMenuStyle2" v-if="componentStyle == 2">
  16. <div class="title">导航列表</div>
  17. <div v-for="(item, index) in bottomMenu" :key="index" :class="item.id == pageId ? 'active' : ''">
  18. <NuxtLink v-if="item.type == 0" :to="`/about/${item.name_pinyin}/index.html`" :title="item.name">
  19. {{ item.name }}
  20. </NuxtLink>
  21. <NuxtLink v-else-if="item.type == 1" :to="`/about/${item.name_pinyin}/list-1.html`" :title="item.name">
  22. {{ item.name }}
  23. </NuxtLink>
  24. </div>
  25. </div>
  26. <!--样式3-->
  27. <div class="floatMenuStyle3" v-if="componentStyle == 3">
  28. <div class="title">导航列表</div>
  29. <div v-for="(item, index) in bottomMenu" :key="index" :class="item.id == pageId ? 'active' : ''">
  30. <NuxtLink v-if="item.type == 0" :to="`/about/${item.name_pinyin}/index.html`" :title="item.name">
  31. {{ item.name }}
  32. </NuxtLink>
  33. <NuxtLink v-else-if="item.type == 1" :to="`/about/${item.name_pinyin}/list-1.html`" :title="item.name">
  34. {{ item.name }}
  35. </NuxtLink>
  36. </div>
  37. </div>
  38. <!--样式4-->
  39. <div class="floatMenuStyle4" v-if="componentStyle == 4">
  40. <div class="title">导航列表</div>
  41. <div v-for="(item, index) in bottomMenu" :key="index" :class="item.id == pageId ? 'active' : ''">
  42. <NuxtLink v-if="item.type == 0" :to="`/about/${item.name_pinyin}/index.html`" :title="item.name">
  43. {{ item.name }}
  44. </NuxtLink>
  45. <NuxtLink v-else-if="item.type == 1" :to="`/about/${item.name_pinyin}/list-1.html`" :title="item.name">
  46. {{ item.name }}
  47. </NuxtLink>
  48. </div>
  49. </div>
  50. </template>
  51. <script setup>
  52. const props = defineProps({
  53. componentStyle: Number,//样式编号
  54. bottomMenu: Array,//底部菜单
  55. pageId: Number,//页面id
  56. });
  57. </script>
  58. <style lang="less" scoped>
  59. //基本样式 start ---------------------------------------->
  60. .floatMenuBox {
  61. div {
  62. height: 60px;
  63. line-height: 60px;
  64. text-align: center;
  65. background-color: #fff;
  66. border-bottom: 1px solid #fff;
  67. border:1px solid #EEEEEE;
  68. font-size: 20px;
  69. a {
  70. color: #333;
  71. }
  72. &:last-child {
  73. border-bottom: 2px solid #A72213;
  74. }
  75. }
  76. .title {
  77. color: #fff;
  78. margin-bottom: 10px;
  79. background: #A72213;
  80. }
  81. .active {
  82. background: #A72213;
  83. a {
  84. color: #fff;
  85. }
  86. }
  87. }
  88. //基本样式 end ---------------------------------------->
  89. //样式2 start ---------------------------------------->
  90. .floatMenuStyle2 {
  91. div {
  92. height: 60px;
  93. line-height: 60px;
  94. text-align: center;
  95. background-color: #fff;
  96. border-bottom: 1px solid #fff;
  97. border:1px solid #EEEEEE;
  98. font-size: 20px;
  99. a {
  100. color: #333;
  101. }
  102. &:last-child {
  103. border-bottom: 2px solid #A72213;
  104. }
  105. }
  106. .title {
  107. color: #fff;
  108. margin-bottom: 10px;
  109. background: #fff;
  110. color:#A72213;
  111. font-weight: bold;
  112. }
  113. .active {
  114. background: #A72213;
  115. a {
  116. color: #fff;
  117. }
  118. }
  119. }
  120. //样式3 start ---------------------------------------->
  121. .floatMenuStyle3 {
  122. div {
  123. height: 60px;
  124. line-height: 60px;
  125. text-align: center;
  126. background-color: #F9FAFB;
  127. border-bottom: 1px solid #fff;
  128. border:1px solid #EEEEEE;
  129. font-size: 20px;
  130. a {
  131. color: #333;
  132. }
  133. &:last-child {
  134. border-bottom: 2px solid #A72213;
  135. }
  136. }
  137. .title {
  138. color: #fff;
  139. margin-bottom: 10px;
  140. background: #A72213;
  141. }
  142. .active {
  143. background: #A72213;
  144. a {
  145. color: #fff;
  146. }
  147. }
  148. }
  149. //样式4 start ---------------------------------------->
  150. .floatMenuStyle4 {
  151. div {
  152. height: 60px;
  153. line-height: 60px;
  154. text-align: center;
  155. background-color: #F9FAFB;
  156. border-bottom: 1px solid #fff;
  157. border:1px solid #EEEEEE;
  158. font-size: 20px;
  159. a {
  160. color: #333;
  161. }
  162. &:last-child {
  163. border-bottom: 2px solid #A72213;
  164. }
  165. }
  166. .title {
  167. color: #fff;
  168. margin-bottom: 10px;
  169. background: #fff;
  170. color:#A72213;
  171. font-weight: bold;
  172. }
  173. .active {
  174. background: #A72213;
  175. a {
  176. color: #fff;
  177. }
  178. }
  179. }
  180. </style>