feat:更新记录模块

This commit is contained in:
2026-08-09 14:01:59 +08:00
parent 8f92c55852
commit 1a63e14e82
15 changed files with 94 additions and 143 deletions

View File

@@ -1,12 +1,10 @@
import { defineStore } from 'pinia'
import type { IExamConfig, IExamRecord } from '@/types/exam.ts'
import { addExamRecordApi } from '@/apis/exam.ts'
import type { IExamConfig } from '@/types/exam.ts'
export const useExamStore = defineStore('exam', {
state: () => ({
dialogVisible: false,
config: {} as IExamConfig,
currentRecord: {} as IExamRecord
config: {} as IExamConfig
}),
actions: {
getEmptyConfig(): IExamConfig {
@@ -14,9 +12,6 @@ export const useExamStore = defineStore('exam', {
subject: '',
total: 50
}
},
async addRecord() {
await addExamRecordApi(this.currentRecord)
}
}
})