mirror of
https://hub.gitmirror.com/https://github.com/ExamAware/ExamShowboard-Legacy.git
synced 2025-04-29 08:06:32 +00:00
refactor(app): 更改store名称以适应新功能
由于功能扩展,将`useAppStore`重命名为`useProfileStore`,以更好地反映其在应用程序中的作用。此外,更新了`infoPage.vue`和`mainWindow.vue`组件中对store的引用,以保持代码的一致性。
This commit is contained in:
parent
83792e700f
commit
e1639b3242
@ -20,10 +20,10 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { useAppStore } from '@renderer/stores/app';
|
||||
import { useProfileStore } from '@renderer/stores/app';
|
||||
import { getCurrentTimeSlot, getNextExamTimeSlot } from '@renderer/utils/subjectUtils';
|
||||
|
||||
const globalStore = useAppStore();
|
||||
const globalStore = useProfileStore();
|
||||
|
||||
getCurrentTimeSlot(globalStore.examInfos);
|
||||
|
||||
|
@ -15,9 +15,9 @@
|
||||
|
||||
<script setup>
|
||||
import { useRouter } from 'vue-router';
|
||||
import { useAppStore } from '@renderer/stores/app';
|
||||
import { useProfileStore } from '@renderer/stores/app';
|
||||
|
||||
const globalStore = useAppStore();
|
||||
const globalStore = useProfileStore();
|
||||
|
||||
function openDialog() {
|
||||
window.electron.ipcRenderer.send('prog:loadjson');
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Utilities
|
||||
import { defineStore } from 'pinia';
|
||||
|
||||
export const useAppStore = defineStore('app', {
|
||||
export const useProfileStore = defineStore('app', {
|
||||
state: () => ({
|
||||
examName: '考试名称',
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user