Header.vue 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. <template>
  2. <div class="header-wrapper" id="headerWrapperContent">
  3. <div class="header clearfix" :class="{'fixed': isFixed}">
  4. <div class="container">
  5. <!--Logo商标-->
  6. <div class="header-brand pull-left">
  7. <nuxt-link :to="'/'">
  8. <img src="/images/logo/uas_mall.png" class="mall-logo"/>
  9. <div class="mall-slogan">
  10. <p>For the World<br/>为世界电子产业创造价值</p>
  11. </div>
  12. </nuxt-link>
  13. </div>
  14. <!--搜索-->
  15. <div class="header-search pull-left">
  16. <search-box :isPcb="isPcb"></search-box>
  17. </div>
  18. <!--统计-->
  19. <!-- <div class="header-count pull-right">
  20. <count-box></count-box>
  21. </div>-->
  22. <!--立即入驻 新手指南-->
  23. <div class="header-count pull-right">
  24. <!--立即入驻-->
  25. <a class="enter enter02" href="/businessEnter">
  26. <img src="/images/all/goInto.png"/>
  27. </a>
  28. <!--新手指南-->
  29. <a class="enter enter01" href="/help/home" target="_blank">
  30. <img src="/images/all/newPointer.png"/>
  31. </a>
  32. </div>
  33. </div>
  34. </div>
  35. </div>
  36. </template>
  37. <script>
  38. import SearchBox from './Search.vue'
  39. import CountBox from './count/Box.vue'
  40. export default {
  41. name: 'home-header',
  42. components: {
  43. SearchBox,
  44. CountBox
  45. },
  46. props: {
  47. isPcb: {
  48. type: Boolean,
  49. default: false
  50. },
  51. isFixed: {
  52. type: Boolean,
  53. default: false
  54. }
  55. }
  56. }
  57. </script>
  58. <style lang="scss" scoped>
  59. @import '~assets/scss/variables';
  60. .header-wrapper {
  61. height: 103px;
  62. }
  63. .header {
  64. padding: 10px 0;
  65. &.fixed {
  66. position: fixed;
  67. width: 100%;
  68. background: #fff;
  69. z-index: 1002;
  70. top: 0;
  71. padding-top: 20px;
  72. -webkit-box-shadow: 0 2px 0 0 #ccc;
  73. -moz-box-shadow: 0 2px 0 0 #ccc;
  74. box-shadow: 0 2px 0 0 #ccc;
  75. }
  76. .header-brand {
  77. .mall-logo {
  78. float: left;
  79. }
  80. .mall-slogan {
  81. line-height: 20px;
  82. font-weight: bold;
  83. color: $primary;
  84. border-left: 1px solid $primary;
  85. padding-left: 12px;
  86. margin-left: 118px;
  87. margin-top: 20px;
  88. }
  89. }
  90. .header-search {
  91. margin-top: 20px;
  92. margin-left: 75px;
  93. }
  94. }
  95. .header-count a.enter:hover img{
  96. transform: scale(1.06);
  97. }
  98. .header-count a.enter span{
  99. display: inline-block;
  100. width: 104px;
  101. height: 79px;
  102. }
  103. .header-count a.enter:hover span{
  104. width: 110px;
  105. height: 84px;
  106. }
  107. .header-count a.enter01 span{
  108. background: url('/images/all/newPointer.png')
  109. }
  110. .header-count a.enter01:hover span{
  111. background: url('/images/all/newPointer01.png')
  112. }
  113. .header-count a.enter02 span{
  114. background: url('/images/all/goInto.png')
  115. }
  116. .header-count a.enter02:hover span{
  117. background: url('/images/all/goInto01.png')
  118. }
  119. </style>