feat:更新考试模块
This commit is contained in:
19
src/stores/exam.ts
Normal file
19
src/stores/exam.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
import { defineStore } from 'pinia'
|
||||
import type { IExamConfig } from '@/types/exam.ts'
|
||||
|
||||
export const useExamStore = defineStore('exam', {
|
||||
state: () => ({
|
||||
hasStart: false,
|
||||
hasSubmit: false,
|
||||
dialogVisible: false,
|
||||
config: {} as IExamConfig
|
||||
}),
|
||||
actions: {
|
||||
getEmptyConfig(): IExamConfig {
|
||||
return {
|
||||
subject: '',
|
||||
total: 50
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user