From deb4bf3307d7bedf2ea3c9b3ed1363a3b47df765 Mon Sep 17 00:00:00 2001 From: gjj <Ganjj@probim.com.cn> Date: Wed, 19 Mar 2025 14:57:40 +0800 Subject: [PATCH] 1 --- src/components/Header.vue | 23 +++++++++++++++++------ 1 files changed, 17 insertions(+), 6 deletions(-) diff --git a/src/components/Header.vue b/src/components/Header.vue index 4b4c510..3e8d552 100644 --- a/src/components/Header.vue +++ b/src/components/Header.vue @@ -1,3 +1,11 @@ +<!-- + * @Author: gjj Ganjj@probim.com.cn + * @Date: 2025-02-14 14:32:18 + * @LastEditors: gjj Ganjj@probim.com.cn + * @LastEditTime: 2025-03-17 11:05:39 + * @FilePath: \北京交通大学\src\components\Header.vue + * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE +--> <template> <header class="headerWrapper"> <div class="relative z-[100] w-full h-[80px]" :style="{ @@ -24,7 +32,8 @@ </div> <div class="absolute top-0 right-0"> <div class="flex items-center h-[80px] mr-[20px]"> - <img class="w-[20px] h-[20px]" :src="getImageUrl('time.png')" alt=""> + <i class="el-icon-full-screen cursor-pointer text-[#00FFFF] text-[24px]" @click="handleFullscreen" :title="$fullscreen.isFullscreen ? '退出全屏' : '全屏'"></i> + <img class="w-[20px] h-[20px] ml-[8px]" :src="getImageUrl('time.png')" alt=""> <div class="text-[24px] text-[#FFBF00] ml-[8px]">{{ currentTime }}</div> <div class="text-[16px] text-[#C8C8C8] ml-[20px]">{{ currentDate }}</div> </div> @@ -34,12 +43,10 @@ </template> <script> - import DropDown from "./DropDown.vue"; export default { name: "AppHeader", components: { - "drop-down": DropDown, }, data() { return { @@ -61,14 +68,18 @@ }, }, methods: { + handleFullscreen() { + if (this.$fullscreen.isFullscreen) { + this.$fullscreen.exit() + } else { + this.$fullscreen.request() + } + }, getImageUrl(name) { return new URL(`../assets/images/backgrounds/${name}`, import.meta.url).href }, onHomeClick(tab) { this.activeTab = tab; - }, - onProjectChange(data) { - this.$store.commit("common/setCurrentProject", data); }, updateTime() { const now = new Date(); -- Gitblit v1.9.3