feat: 增加标题栏自定义配置

This commit is contained in:
hello8693 2024-08-22 20:59:16 +08:00
parent ca3e42a4a3
commit 76cd5af332
3 changed files with 6 additions and 4 deletions

View File

@ -10,7 +10,7 @@
}}</span> }}</span>
</v-system-bar> </v-system-bar>
<v-app-bar :elevation="2" class="position-fixed"> <v-app-bar :elevation="2" class="position-fixed">
<v-app-bar-title>DSZ考试看板</v-app-bar-title> <v-app-bar-title>{{ profileStore.appHeader }}</v-app-bar-title>
<template #append> <template #append>
<div class="ga-4"> <div class="ga-4">
@ -22,6 +22,9 @@
<script setup> <script setup>
import { useRouter } from 'vue-router'; import { useRouter } from 'vue-router';
import { useProfileStore } from '../stores/app';
const profileStore = useProfileStore();
const ipcHandleExit = () => window.electron.ipcRenderer.send('prog:exit'); const ipcHandleExit = () => window.electron.ipcRenderer.send('prog:exit');

View File

@ -7,7 +7,7 @@
</v-row> </v-row>
<v-row> <v-row>
<v-col cols="12"> <v-col cols="12">
<v-btn color="primary" @click="openDialog" dark> 打开配置 </v-btn> <v-btn color="primary" dark @click="openDialog"> 打开配置 </v-btn>
</v-col> </v-col>
</v-row> </v-row>
</v-container> </v-container>

View File

@ -4,8 +4,7 @@ import { defineStore } from 'pinia';
export const useProfileStore = defineStore('app', { export const useProfileStore = defineStore('app', {
state: () => ({ state: () => ({
examName: '考试名称', examName: '考试名称',
appHeader: 'DSZ考试看板',
roomName: '考场名称',
message: '考试提醒信息', message: '考试提醒信息',
examInfos: [] examInfos: []
}), }),