3.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413
  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. <!--样式5-->
  51. <div class="floatMenuStyle5" v-if="componentStyle == 5">
  52. <div class="title">导航列表</div>
  53. <div v-for="(item, index) in bottomMenu" :key="index" :class="item.id == pageId ? 'active' : ''">
  54. <NuxtLink v-if="item.type == 0" :to="`/about/${item.name_pinyin}/index.html`" :title="item.name">
  55. {{ item.name }}
  56. </NuxtLink>
  57. <NuxtLink v-else-if="item.type == 1" :to="`/about/${item.name_pinyin}/list-1.html`" :title="item.name">
  58. {{ item.name }}
  59. </NuxtLink>
  60. </div>
  61. </div>
  62. <!--样式6-->
  63. <div class="floatMenuStyle6" v-if="componentStyle == 6">
  64. <div class="title">导航列表</div>
  65. <div v-for="(item, index) in bottomMenu" :key="index" :class="item.id == pageId ? 'active' : ''">
  66. <NuxtLink v-if="item.type == 0" :to="`/about/${item.name_pinyin}/index.html`" :title="item.name">
  67. {{ item.name }}
  68. </NuxtLink>
  69. <NuxtLink v-else-if="item.type == 1" :to="`/about/${item.name_pinyin}/list-1.html`" :title="item.name">
  70. {{ item.name }}
  71. </NuxtLink>
  72. </div>
  73. </div>
  74. <!--样式7-->
  75. <div class="floatMenuStyle7" v-if="componentStyle == 7">
  76. <div class="title">导航列表</div>
  77. <div v-for="(item, index) in bottomMenu" :key="index" :class="item.id == pageId ? 'active' : ''">
  78. <NuxtLink v-if="item.type == 0" :to="`/about/${item.name_pinyin}/index.html`" :title="item.name">
  79. {{ item.name }}
  80. </NuxtLink>
  81. <NuxtLink v-else-if="item.type == 1" :to="`/about/${item.name_pinyin}/list-1.html`" :title="item.name">
  82. {{ item.name }}
  83. </NuxtLink>
  84. </div>
  85. </div>
  86. <!--样式8-->
  87. <div class="floatMenuStyle8" v-if="componentStyle == 8">
  88. <div class="title">导航列表</div>
  89. <div v-for="(item, index) in bottomMenu" :key="index" :class="item.id == pageId ? 'active' : ''">
  90. <NuxtLink v-if="item.type == 0" :to="`/about/${item.name_pinyin}/index.html`" :title="item.name">
  91. {{ item.name }}
  92. </NuxtLink>
  93. <NuxtLink v-else-if="item.type == 1" :to="`/about/${item.name_pinyin}/list-1.html`" :title="item.name">
  94. {{ item.name }}
  95. </NuxtLink>
  96. </div>
  97. </div>
  98. <!--样式9-->
  99. <div class="floatMenuStyle9" v-if="componentStyle == 9">
  100. <div class="title">导航列表</div>
  101. <div v-for="(item, index) in bottomMenu" :key="index" :class="item.id == pageId ? 'active' : ''">
  102. <NuxtLink v-if="item.type == 0" :to="`/about/${item.name_pinyin}/index.html`" :title="item.name">
  103. {{ item.name }}
  104. </NuxtLink>
  105. <NuxtLink v-else-if="item.type == 1" :to="`/about/${item.name_pinyin}/list-1.html`" :title="item.name">
  106. {{ item.name }}
  107. </NuxtLink>
  108. </div>
  109. </div>
  110. <!--样式10-->
  111. <div class="floatMenuStyle10" v-if="componentStyle == 10">
  112. <div class="title">导航列表</div>
  113. <div v-for="(item, index) in bottomMenu" :key="index" :class="item.id == pageId ? 'active' : ''">
  114. <NuxtLink v-if="item.type == 0" :to="`/about/${item.name_pinyin}/index.html`" :title="item.name">
  115. {{ item.name }}
  116. </NuxtLink>
  117. <NuxtLink v-else-if="item.type == 1" :to="`/about/${item.name_pinyin}/list-1.html`" :title="item.name">
  118. {{ item.name }}
  119. </NuxtLink>
  120. </div>
  121. </div>
  122. </template>
  123. <script setup>
  124. const props = defineProps({
  125. componentStyle: Number,//样式编号
  126. bottomMenu: Array,//底部菜单
  127. pageId: Number,//页面id
  128. });
  129. </script>
  130. <style lang="less" scoped>
  131. //基本样式 start ---------------------------------------->
  132. .floatMenuBox {
  133. div {
  134. height: 60px;
  135. line-height: 60px;
  136. text-align: center;
  137. background-color: #f9fafb;
  138. border-bottom: 1px solid #fff;
  139. a {
  140. color:#333;
  141. }
  142. }
  143. .title {
  144. color:#c82200;
  145. }
  146. .active {
  147. background: #c82200;
  148. a {
  149. color:#fff;
  150. }
  151. }
  152. }
  153. //基本样式 end ---------------------------------------->
  154. //样式2 start ---------------------------------------->
  155. .floatMenuStyle2 {
  156. div {
  157. height: 60px;
  158. line-height: 60px;
  159. text-align: center;
  160. background-color: #f9fafb;
  161. border-bottom: 1px solid #fff;
  162. a {
  163. color:#333;
  164. }
  165. }
  166. .title {
  167. background: #c82200;
  168. color:#fff;
  169. }
  170. .active {
  171. background: #c82200;
  172. a {
  173. color:#fff;
  174. }
  175. }
  176. }
  177. //样式2 end ---------------------------------------->
  178. //样式3
  179. .floatMenuStyle3 {
  180. div {
  181. height: 60px;
  182. line-height: 60px;
  183. text-align: center;
  184. color: #333333;
  185. background-color: #f9fafb;
  186. border-bottom: 1px solid #fff;
  187. a {
  188. color: #333333;
  189. }
  190. }
  191. .title {
  192. background: #c82200;
  193. color: #fff;
  194. }
  195. .active {
  196. background: #f9fafb;
  197. color: #c82200;
  198. a {
  199. color: #c82200;
  200. }
  201. }
  202. }
  203. //样式4
  204. .floatMenuStyle4 {
  205. div {
  206. height: 60px;
  207. line-height: 60px;
  208. text-align: center;
  209. color: #333333;
  210. background-color: #f9fafb;
  211. border-bottom: 1px solid #fff;
  212. a {
  213. color: #333333;
  214. }
  215. }
  216. .title {
  217. background: #c82200;
  218. color: #fff;
  219. }
  220. .active {
  221. background: #f0f0f0;
  222. color: #c82200;
  223. border-left: 2px solid #c82200;
  224. a {
  225. color: #c82200;
  226. }
  227. }
  228. }
  229. //样式5
  230. .floatMenuStyle5 {
  231. border: 1px solid #eeeeee;
  232. div {
  233. height: 60px;
  234. line-height: 60px;
  235. text-align: center;
  236. color: #333333;
  237. border-bottom: 1px solid #eeeeee;
  238. a {
  239. color: #333333;
  240. }
  241. &:last-child {
  242. border-bottom: none;
  243. }
  244. }
  245. .title {
  246. color: #c82200;
  247. }
  248. .active {
  249. background: #c82200;
  250. color: #fff;
  251. a {
  252. color: #fff;
  253. }
  254. }
  255. }
  256. //样式6
  257. .floatMenuStyle6 {
  258. border: 1px solid #eeeeee;
  259. div {
  260. height: 60px;
  261. line-height: 60px;
  262. text-align: center;
  263. color: #333333;
  264. border-bottom: 1px solid #eeeeee;
  265. a {
  266. color: #333333;
  267. }
  268. &:last-child {
  269. border-bottom: none;
  270. }
  271. }
  272. .title {
  273. background: #c82200;
  274. color: #fff;
  275. }
  276. .active {
  277. background: #c82200;
  278. color: #fff;
  279. a {
  280. color: #fff;
  281. }
  282. }
  283. }
  284. //样式7
  285. .floatMenuStyle7 {
  286. border: 1px solid #eeeeee;
  287. div {
  288. height: 60px;
  289. line-height: 60px;
  290. text-align: center;
  291. color: #333333;
  292. border-bottom: 1px solid #eeeeee;
  293. a {
  294. color: #333333;
  295. }
  296. &:last-child {
  297. border-bottom: none;
  298. }
  299. }
  300. .title {
  301. background: #c82200;
  302. color: #fff;
  303. }
  304. .active {
  305. color: #c82200;
  306. a {
  307. color: #c82200;
  308. }
  309. }
  310. }
  311. //样式8
  312. .floatMenuStyle8 {
  313. border: 1px solid #eeeeee;
  314. div {
  315. height: 60px;
  316. line-height: 60px;
  317. text-align: center;
  318. color: #333333;
  319. border-bottom: 1px solid #eeeeee;
  320. a {
  321. color: #333333;
  322. }
  323. &:last-child {
  324. border-bottom: none;
  325. }
  326. }
  327. .title {
  328. background: #c82200;
  329. color: #fff;
  330. }
  331. .active {
  332. background: #f0f0f0;
  333. color: #c82200;
  334. border-left: 2px solid #c82200;
  335. a {
  336. color: #c82200;
  337. }
  338. }
  339. }
  340. //样式9
  341. .floatMenuStyle9 {
  342. div {
  343. height: 60px;
  344. line-height: 60px;
  345. text-align: center;
  346. color: #333333;
  347. border-bottom: 1px dashed #cccccc;
  348. a {
  349. color: #333333;
  350. }
  351. }
  352. .active {
  353. border-bottom: none;
  354. }
  355. }
  356. //样式10
  357. .floatMenuStyle10 {
  358. div {
  359. height: 60px;
  360. line-height: 60px;
  361. text-align: center;
  362. color: #333333;
  363. border-bottom: 1px dashed #cccccc;
  364. a {
  365. color: #333333;
  366. }
  367. }
  368. }
  369. </style>