mirror of
https://hub.gitmirror.com/https://github.com/ExamAware/ExamShowboard-Legacy.git
synced 2025-04-29 08:06:32 +00:00
feat: 添加顶部导航栏并实现退出功能
添加了一个新的顶部导航栏组件,包括时间显示、应用标题和按钮,用于打开配置页面。实现了一个基于Electron的IPC的退出按钮功能,使用户能够通过点击退出按钮来发送一个退出程序的指令。
This commit is contained in:
parent
f3b19a6005
commit
926578d9ad
29
src/renderer/src/components/AppTopBar.vue
Normal file
29
src/renderer/src/components/AppTopBar.vue
Normal file
@ -0,0 +1,29 @@
|
||||
<template>
|
||||
<v-system-bar class="position-fixed">
|
||||
<v-icon icon="mdi-window-close" @click="ipcHandleExit"></v-icon>
|
||||
<span class="ms-2">{{
|
||||
new Date().toLocaleTimeString('en-US', {
|
||||
hour: 'numeric',
|
||||
minute: 'numeric',
|
||||
hour12: true
|
||||
})
|
||||
}}</span>
|
||||
</v-system-bar>
|
||||
<v-app-bar :elevation="2" class="position-fixed">
|
||||
<v-app-bar-title>DSZ考试看板</v-app-bar-title>
|
||||
|
||||
<template #append>
|
||||
<div class="ga-4">
|
||||
<v-btn @click="router.push('/mainWindow')">打开配置</v-btn>
|
||||
</div>
|
||||
</template>
|
||||
</v-app-bar>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { useRouter } from 'vue-router';
|
||||
|
||||
const ipcHandleExit = () => window.electron.ipcRenderer.send('prog:exit');
|
||||
|
||||
const router = useRouter();
|
||||
</script>
|
Loading…
x
Reference in New Issue
Block a user