feat:修改数据结构
This commit is contained in:
11
src/types.ts
11
src/types.ts
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user