Header.vue 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  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 v-if="!user.logged" class="enter enter02" href="/businessEnter">
  26. <img src="/images/all/goInto.png"/>
  27. </a>
  28. <a v-if="user.logged" class="enter enter02" @click="goStoreApply()">
  29. <img src="/images/all/goInto.png"/>
  30. </a>
  31. <!--新手指南-->
  32. <a class="enter enter01" href="/help/home" target="_blank">
  33. <img src="/images/all/newPointer.png"/>
  34. </a>
  35. </div>
  36. </div>
  37. </div>
  38. </div>
  39. </template>
  40. <script>
  41. import SearchBox from './Search.vue'
  42. import CountBox from './count/Box.vue'
  43. export default {
  44. name: 'home-header',
  45. components: {
  46. SearchBox,
  47. CountBox
  48. },
  49. props: {
  50. isPcb: {
  51. type: Boolean,
  52. default: false
  53. },
  54. isFixed: {
  55. type: Boolean,
  56. default: false
  57. }
  58. }
  59. }
  60. </script>
  61. <style lang="scss" scoped>
  62. @import '~assets/scss/variables';
  63. .header-wrapper {
  64. height: 103px;
  65. }
  66. .header {
  67. padding: 10px 0;
  68. &.fixed {
  69. position: fixed;
  70. width: 100%;
  71. background: #fff;
  72. z-index: 1002;
  73. top: 0;
  74. padding-top: 20px;
  75. -webkit-box-shadow: 0 2px 0 0 #ccc;
  76. -moz-box-shadow: 0 2px 0 0 #ccc;
  77. box-shadow: 0 2px 0 0 #ccc;
  78. }
  79. .header-brand {
  80. .mall-logo {
  81. float: left;
  82. }
  83. .mall-slogan {
  84. line-height: 20px;
  85. font-weight: bold;
  86. color: $primary;
  87. border-left: 1px solid $primary;
  88. padding-left: 12px;
  89. margin-left: 118px;
  90. margin-top: 20px;
  91. }
  92. }
  93. .header-search {
  94. margin-top: 20px;
  95. margin-left: 75px;
  96. }
  97. }
  98. .header-count a.enter:hover img{
  99. transform: scale(1.06);
  100. }
  101. .header-count a.enter span{
  102. display: inline-block;
  103. width: 104px;
  104. height: 79px;
  105. }
  106. .header-count a.enter:hover span{
  107. width: 110px;
  108. height: 84px;
  109. }
  110. .header-count a.enter01 span{
  111. background: url('/images/all/newPointer.png')
  112. }
  113. .header-count a.enter01:hover span{
  114. background: url('/images/all/newPointer01.png')
  115. }
  116. .header-count a.enter02 span{
  117. background: url('/images/all/goInto.png')
  118. }
  119. .header-count a.enter02:hover span{
  120. background: url('/images/all/goInto01.png')
  121. }
  122. </style>