This commit is contained in:
zyronon
2024-05-25 22:43:59 +08:00
parent aa20b159e9
commit 80da09e1db
6 changed files with 634 additions and 270 deletions

View File

@@ -238,6 +238,35 @@ export const DefaultDict: Dict = {
language: 'en',
}
export function getDefaultDict(val = {}): Dict {
return {
id: '',
name: '',
description: '',
sort: Sort.normal,
originWords: [],//原始单词
words: [],
chapterWordNumber: DefaultChapterWordNumber,//章节单词数量
chapterWords: [],
residueWords: [],//未分配单词
chapterIndex: 0,//章节下标
wordIndex: 0,//单词下标
articles: [],
statistics: [],
isCustom: false,
length: 0,
/*资源属性*/
resourceId: '',
url: '',
category: '',
tags: [],
translateLanguage: 'common',
type: DictType.word,
language: 'en',
...val
}
}
export interface Dict {
id: string,
name: string,