| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103 |
- <template>
- <header class="cwg-pc-header bg-body" :class="{ 'dark': isDark }">
- <div class="left">
- <image class="left-img" src="/static/images/vu/logo.png" mode="widthFix" alt="logo" @click="openLeftDrawer" />
- <image class="left-img1" v-if="!isDark" src="/static/images/vu/logo-text-dark.png" mode="widthFix" alt="logo" @click="openLeftDrawer" />
- <image class="left-img1" v-else src="/static/images/vu/logo-text-white.png" mode="widthFix" alt="logo" @click="openLeftDrawer" />
- </div>
- <div class="right" v-if="visible">
- <cwg-payment />
- <cwg-system />
- <cwg-language />
- <cwg-notice />
- <cwg-right-drawer />
- </div>
- </header>
- </template>
- <script setup lang="ts">
- import { ref, computed, watch } from 'vue'
- import { storeToRefs } from 'pinia'
- import useUserStore from '@/stores/use-user-store'
- const userStore = useUserStore()
- const { userInfo } = storeToRefs(userStore)
- import useGlobalStore from '@/stores/use-global-store'
- const globalStore = useGlobalStore()
- const isDark = computed(() => globalStore.theme === 'dark')
- const visible = ref(true)
- watch(() => userInfo.value, (val) => {
- visible.value = !!val
- })
- const props = defineProps({
- sidebarVisible: {
- type: Boolean,
- default: false,
- },
- })
- </script>
- <style scoped lang="scss">
- .cwg-pc-header {
- display: flex;
- align-items: center;
- justify-content: space-between;
- height: px2rpx(55);
- border-bottom: 1px solid var(--bs-border-color);
- padding: 0 px2rpx(16);
- position: relative;
- z-index: 10;
- }
- .left {
- display: flex;
- align-items: center;
- }
- .center {
- flex: 1;
- }
- .right {
- display: flex;
- align-items: center;
- gap: 0;
- }
- .bell .dot {
- position: absolute;
- top: 0;
- right: -2px;
- width: 7px;
- height: 7px;
- background: #27ae60;
- border-radius: 50%;
- display: inline-block;
- }
- .left-img {
- width: px2rpx(40);
- }
- .left-img1 {
- display: block;
- margin-left: 12px;
- width: px2rpx(80);
- }
- .avatar .img {
- width: 32px;
- height: 32px;
- border-radius: 50%;
- background: #eee;
- }
- .logo .img {
- width: 36px;
- height: 36px;
- border-radius: 50%;
- background: #fff;
- }
- </style>
|