重构数据结构

This commit is contained in:
zyronon
2023-08-29 18:49:45 +08:00
parent 992c7fac5a
commit 0bf3b90b31
9 changed files with 171 additions and 171 deletions

View File

@@ -1,4 +1,3 @@
export type Word = {
"name": string,
"usphone": string,
@@ -107,6 +106,15 @@ export interface Statistics {
wrongWordNumber: number//错误数
}
export const DefaultStatistics: Statistics = {
startDate: Date.now(),
endDate: -1,
spend: -1,
wordNumber: -1,
correctRate: -1,
wrongWordNumber: -1,
}
export enum Sort {
normal = 0,
random = 1,
@@ -124,6 +132,7 @@ export interface State {
words: Word[],
index: number,
wrongWords: Word[],
originWrongWords: Word[],
repeatNumber: number,
statistics: Statistics
},