Nav.vue 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. <template>
  2. <nav class="nav-list">
  3. <div class="container">
  4. <nuxt-link to="/product" class="item item-first">
  5. <div>器件选型</div>
  6. </nuxt-link>
  7. <nuxt-link :to="'/'" class="item" exact>
  8. <span>首&nbsp;&nbsp;页</span>
  9. </nuxt-link>
  10. <nuxt-link to="/product" class="item">
  11. <span>品牌中心</span>
  12. </nuxt-link>
  13. <nuxt-link to="/provider/factories" class="item">
  14. <span>原厂专区</span>
  15. </nuxt-link>
  16. <nuxt-link to="/provider/home" class="item">
  17. <span>代理经销</span>
  18. </nuxt-link>
  19. <!-- <nuxt-link to="/product/original" class="item">
  20. <span>热卖推荐</span>
  21. </nuxt-link>-->
  22. <nuxt-link to="/product" class="item" target="_blank">
  23. <span>库存寄售</span>
  24. </nuxt-link>
  25. <nuxt-link to="/news" class="item">
  26. <span>优软快讯</span>
  27. </nuxt-link>
  28. </div>
  29. </nav>
  30. </template>
  31. <script>
  32. export default {
  33. name: 'navView'
  34. }
  35. </script>
  36. <style lang="scss" scoped>
  37. @import '~assets/scss/variables';
  38. $nav-height: 40px;
  39. .container{
  40. padding: 0;
  41. }
  42. .nav-list {
  43. background-color: rgb(244, 248, 255);
  44. height: $nav-height;
  45. .item {
  46. display: inline-block;
  47. height: $nav-height;
  48. line-height: $nav-height;
  49. margin: 0 15px;
  50. color: $black-light;
  51. > span {
  52. padding: 5px 2px;
  53. }
  54. &.nuxt-link-active, &:hover {
  55. > span {
  56. color: #5078cb;
  57. border-bottom: #5078cb 3px solid;
  58. font-weight: bold;
  59. }
  60. }
  61. &.item-first {
  62. width: 200px;
  63. margin: 0;
  64. background-color: rgb(33, 71, 151);
  65. font-size: 14px;
  66. font-weight: bold;
  67. text-align: center;
  68. color: #fff;
  69. cursor: pointer;
  70. }
  71. }
  72. }
  73. </style>