PcHeaderLite.vue 580 B

1234567891011121314151617181920212223242526272829303132333435
  1. <template>
  2. <div class="pc-header-lite">
  3. <div class="home-link">
  4. <img
  5. @click="toHome"
  6. src="@/assets/img/logo.png"
  7. alt="PromoCollection Logo"
  8. id="logo" />
  9. </div>
  10. </div>
  11. </template>
  12. <script>
  13. // 仅带一个logo的轻量级页首组件
  14. export default {
  15. name: 'PcHeaderLite',
  16. methods: {
  17. toHome() {
  18. location.href = location.origin
  19. },
  20. },
  21. }
  22. </script>
  23. <style lang="scss" scoped>
  24. .pc-header-lite {
  25. height: 92px;
  26. .home-link {
  27. cursor: pointer;
  28. position: relative;
  29. top: 0;
  30. left: -20px;
  31. }
  32. }
  33. </style>