18 lines
342 B
TypeScript
18 lines
342 B
TypeScript
import { defineStore } from 'pinia'
|
|
import type { IExamConfig } from '@/types/exam.ts'
|
|
|
|
export const useExamStore = defineStore('exam', {
|
|
state: () => ({
|
|
dialogVisible: false,
|
|
config: {} as IExamConfig
|
|
}),
|
|
actions: {
|
|
getEmptyConfig(): IExamConfig {
|
|
return {
|
|
subject: '',
|
|
total: 50
|
|
}
|
|
}
|
|
}
|
|
})
|