feat:修改数据结构

This commit is contained in:
zyronon
2025-07-21 00:03:52 +08:00
parent a90365e6a6
commit 3a913c8520
11 changed files with 3585 additions and 727 deletions

View File

@@ -44,7 +44,7 @@ export type Word = {
}[],
}
export function getDefaultWord(val?: any): Word {
export function getDefaultWord(val: Partial<Word> = {}): Word {
return {
"word": "",
"phonetic0": "",
@@ -96,7 +96,7 @@ export interface ArticleWord extends Word {
symbolPosition: 'start' | 'end' | '',
}
export function getDefaultArticleWord(val?: any): ArticleWord {
export function getDefaultArticleWord(val: Partial<ArticleWord> = {}): ArticleWord {
return getDefaultWord({
nextSpace: true,
isSymbol: false,
@@ -175,13 +175,6 @@ export enum Sort {
reverse = 2
}
export const ShortcutKeyMap = {
Show: 'Escape',
Ignore: 'Tab',
Remove: '`',
Collect: 'Enter',
}
export enum ShortcutKey {
ShowWord = 'ShowWord',
EditArticle = 'EditArticle',