refactor(app): 更改store名称以适应新功能

由于功能扩展,将`useAppStore`重命名为`useProfileStore`,以更好地反映其在应用程序中的作用。此外,更新了`infoPage.vue`和`mainWindow.vue`组件中对store的引用,以保持代码的一致性。
This commit is contained in:
hello8693 2024-08-22 20:54:47 +08:00
parent 83792e700f
commit e1639b3242
3 changed files with 5 additions and 5 deletions

View File

@ -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);

View File

@ -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');

View File

@ -1,7 +1,7 @@
// Utilities
import { defineStore } from 'pinia';
export const useAppStore = defineStore('app', {
export const useProfileStore = defineStore('app', {
state: () => ({
examName: '考试名称',