top-window.vue 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. <template>
  2. <header class="cwg-pc-header">
  3. <div class="left">
  4. <image class="left-img" src="/static/images/logo.png" mode="widthFix" alt="logo" @click="openLeftDrawer" />
  5. </div>
  6. <div class="right">
  7. <LanguageDropdown />
  8. <cwg-notice />
  9. <view class="pc-header-btn">
  10. <cwg-icon name="icon_my" color="#141d22" @click="openRightDrawer" />
  11. </view>
  12. </div>
  13. </header>
  14. </template>
  15. <script setup lang="ts">
  16. // import useGlobalStore from '@/stores/use-global-store'
  17. // const globalStore = useGlobalStore()
  18. import useRouter from "@/hooks/useRouter";
  19. import LanguageDropdown from "@/components/LanguageDropdown.vue";
  20. const router = useRouter();
  21. const props = defineProps({
  22. sidebarVisible: {
  23. type: Boolean,
  24. default: false
  25. },
  26. })
  27. function openRightDrawer() {
  28. uni.$emit('open-right-drawer')
  29. }
  30. </script>
  31. <style scoped lang="scss">
  32. .cwg-pc-header {
  33. display: flex;
  34. align-items: center;
  35. justify-content: space-between;
  36. height: px2rpx(55);
  37. background-color: rgba(255, 255, 255, 0.9);
  38. border-bottom: 1px solid #f0f0f0;
  39. padding: 0 px2rpx(16);
  40. position: relative;
  41. z-index: 10;
  42. }
  43. .left {
  44. display: flex;
  45. align-items: center;
  46. }
  47. .center {
  48. flex: 1;
  49. }
  50. .right {
  51. display: flex;
  52. align-items: center;
  53. gap: 0;
  54. }
  55. .bell .dot {
  56. position: absolute;
  57. top: 0;
  58. right: -2px;
  59. width: 7px;
  60. height: 7px;
  61. background: #27ae60;
  62. border-radius: 50%;
  63. display: inline-block;
  64. }
  65. .left-img {
  66. width: px2rpx(120);
  67. }
  68. .avatar .img {
  69. width: 32px;
  70. height: 32px;
  71. border-radius: 50%;
  72. background: #eee;
  73. }
  74. .logo .img {
  75. width: 36px;
  76. height: 36px;
  77. border-radius: 50%;
  78. background: #fff;
  79. }
  80. </style>