diff --git a/TODO.md b/TODO.md new file mode 100644 index 0000000..48129ca --- /dev/null +++ b/TODO.md @@ -0,0 +1,5 @@ +## 待办事项 + +- [ ] 拆分自由输入模式和固定输入模式 +- [ ] 使用 vitest 构建组件级别的测试 +- [ ] 为汉字和拼音的转换模块构建测试 \ No newline at end of file diff --git a/package.json b/package.json index df2739e..0d8d956 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,8 @@ "lint": "eslint --ext .ts,.vue src", "fix": "yarn lint --fix", "prepare": "husky install", - "test": "vitest" + "test": "vitest", + "watch": "vitest --watch" }, "dependencies": { "less": "^4.1.3", @@ -19,6 +20,7 @@ "vue-router": "4" }, "devDependencies": { + "@vitest/ui": "^0.27.0", "@napi-rs/pinyin": "^1.7.0", "@rushstack/eslint-patch": "^1.1.4", "@types/node": "^18.0.0", diff --git a/src/assets/arrow-left.svg b/src/assets/arrow-left.svg new file mode 100644 index 0000000..cd3df29 --- /dev/null +++ b/src/assets/arrow-left.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/src/components/ArticleInfo.vue b/src/components/ArticleInfo.vue new file mode 100644 index 0000000..181878a --- /dev/null +++ b/src/components/ArticleInfo.vue @@ -0,0 +1,212 @@ + + + + + diff --git a/src/components/MenuList.vue b/src/components/MenuList.vue index 5cf2167..c730ab3 100644 --- a/src/components/MenuList.vue +++ b/src/components/MenuList.vue @@ -1,5 +1,5 @@ + + + + diff --git a/src/env.d.ts b/src/env.d.ts index dc76cbb..1cf69f8 100644 --- a/src/env.d.ts +++ b/src/env.d.ts @@ -52,17 +52,6 @@ interface Combine { progress: Progress; } -type Article = - | { - type: RawArticleName; - progress: Progress; - } - | { - type: "CUSTOM"; - name: string; - progress: Progress; - }; - interface KeyConfig { main: Char; leads: string[]; @@ -78,15 +67,3 @@ interface Settings { } type Theme = "auto" | "dark" | "light"; - -interface AppState { - currentLeadIndex: number; - currentFollowIndex: number; - currentArticleIndex: number; - progresses: Record; - localConfigs: Record; - - combines: Combine[]; - articles: Article[]; - settings: Settings; -} diff --git a/src/pages/EditArticlePage.vue b/src/pages/EditArticlePage.vue new file mode 100644 index 0000000..2b22da6 --- /dev/null +++ b/src/pages/EditArticlePage.vue @@ -0,0 +1,122 @@ + + +