| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111 |
- <template>
- <uni-nav-bar :leftWidth="0" :rightWidth="0" :statusBar="true" :fixed="true" :height="55" :border="false">
- <view class="cwg-pc-header bg-body">
- <div class="left">
- <cwg-icon :name="!sidebarVisible ? 'crm-bars-staggered' : 'cwg-close'" color="#97A1C0"
- @click="openLeftDrawer" />
- </div>
- <div class="left">
- <image class="left-img" v-if="!isDark" src="/static/images/vu/logo-full.svg" mode="widthFix" alt="logo"
- @click="openLeftDrawer" />
- <image class="left-img" v-else src="/static/images/vu/logo-full-white.svg" mode="widthFix" alt="logo"
- @click="openLeftDrawer" />
- </div>
- <div class="right">
- <cwg-system />
- <cwg-notice />
- <cwg-right-drawer />
- </div>
- </view>
- </uni-nav-bar>
- </template>
- <script setup lang="ts">
- import { computed } from 'vue'
- import useGlobalStore from '@/stores/use-global-store'
- const globalStore = useGlobalStore()
- const isDark = computed(() => globalStore.theme === 'dark')
- const props = defineProps({
- sidebarVisible: {
- type: Boolean,
- default: false
- },
- })
- const emit = defineEmits<{
- (e: 'open-right-drawer'): void,
- (e: 'open-left-drawer'): void
- }>()
- function openLeftDrawer() {
- emit('open-left-drawer');
- }
- </script>
- <style scoped lang="scss">
- .cwg-pc-header {
- display: flex;
- align-items: center;
- justify-content: space-between;
- width: 100vw;
- height: 55px;
- background-color: rgba(255, 255, 255, 0.9);
- border-bottom: 1px solid var(--bs-border-color);
- padding: 0 px2rpx(16);
- box-sizing: border-box;
- // position: fixed;
- // top: 0;
- // left: 0;
- // z-index: 101;
- }
- .left {
- display: flex;
- align-items: center;
- }
- .back-arrow {
- color: #e74c3c;
- font-size: 22px;
- cursor: pointer;
- margin-right: 16px;
- }
- .center {
- flex: 1;
- }
- .right {
- display: flex;
- align-items: center;
- }
- .bell .dot {
- position: absolute;
- top: 0;
- right: -2px;
- width: 7px;
- height: 7px;
- background: #27ae60;
- border-radius: 50%;
- display: inline-block;
- }
- .left-img {
- width: px2rpx(120);
- }
- .avatar .img {
- width: 32px;
- height: 32px;
- border-radius: 50%;
- background: #eee;
- }
- .logo .img {
- width: 36px;
- height: 36px;
- border-radius: 50%;
- background: #fff;
- }
- </style>
|