优化单词主页布局

This commit is contained in:
zyronon
2024-06-12 01:03:00 +08:00
parent 0dd415c2f3
commit ab93b1dd65
12 changed files with 36 additions and 1150 deletions

View File

@@ -16,28 +16,26 @@ export type Word = {
"phonetic0": string,
"phonetic1": string,
"trans": WordTrans[]
checked?: boolean,
sentences?: { v: string, tran: string }[],
relWords?: { w: string, tran: string }[],
phrases?: { v: string, tran: string } [],
synos?: { w: string, tran: string } [],
memory?: any,
memory?: string,
}
export const DefaultWord: Word = {
word: '',
phonetic0: '',
phonetic1: '',
trans: [],
}
export function getDefaultWord(val?: any) {
export function getDefaultWord(val?: any): Word {
return {
id: '',
word: '',
phonetic0: '',
phonetic1: '',
trans: [],
sentences: [],
relWords: [],
phrases: [],
synos: [],
memory: '',
...val
}
}