top-window.vue 1.7 KB

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