From fa789dd80836bc461ba3a12c90417225ac7ef7ec Mon Sep 17 00:00:00 2001 From: Rui Wu Date: Sun, 1 Sep 2024 15:03:28 +0800 Subject: [PATCH] docs: update config --- docs/.vitepress/config.ts | 14 ++++++++++---- docs/guide/{introduction.md => getting-started.md} | 4 +++- docs/guide/why.md | 5 +++++ 3 files changed, 18 insertions(+), 5 deletions(-) rename docs/guide/{introduction.md => getting-started.md} (99%) create mode 100644 docs/guide/why.md diff --git a/docs/.vitepress/config.ts b/docs/.vitepress/config.ts index b674411..0dc9460 100644 --- a/docs/.vitepress/config.ts +++ b/docs/.vitepress/config.ts @@ -21,17 +21,23 @@ export default defineConfig({ themeConfig: { logo: { src: "/logo.png", width: 24, height: 24 }, nav: [ - { text: "指南", link: "/guide/introduction" }, + { text: "指南", link: "/guide/getting-started", activeMatch: "/guide/" }, { - text: "更新日志", - link: "https://github.com/uni-helper/typed/tree/main/CHANGELOG.md", + text: "资源", + items: [ + { + text: "更新日志", + link: "https://github.com/uni-helper/typed/tree/main/CHANGELOG.md", + }, + ], }, ], sidebar: [ { text: "指南", items: [ - { text: "介绍", link: "/guide/introduction" }, + { text: "为什么是 @uni-helper/typed?", link: "/guide/why" }, + { text: "起步", link: "/guide/getting-started" }, { text: "uni-app-types", link: "/guide/uni-app-types" }, { text: "uni-cloud-types", link: "/guide/uni-cloud-types" }, { text: "uni-ui-types", link: "/guide/uni-ui-types" }, diff --git a/docs/guide/introduction.md b/docs/guide/getting-started.md similarity index 99% rename from docs/guide/introduction.md rename to docs/guide/getting-started.md index 2ffd8c1..8c6db68 100644 --- a/docs/guide/introduction.md +++ b/docs/guide/getting-started.md @@ -1,4 +1,6 @@ -# 介绍 +# 起步 + +## 概览 `@uni-helper/typed` 是一个为 [uni-app](https://uniapp.dcloud.io/) 打造的 TypeScript 支持库,包含几个子包: diff --git a/docs/guide/why.md b/docs/guide/why.md new file mode 100644 index 0000000..701da4e --- /dev/null +++ b/docs/guide/why.md @@ -0,0 +1,5 @@ +# 为什么是 @uni-helper/typed? + +很长一段时间,DCloud 公司(也就是 uni-app 官方)对于 TypeScript 支持只有 @dcloudio/types,它提供了脚本部分的 TypeScript 支持,但模板部分的 TypeScript 支持迟迟没有到位。 + +这个项目正是为了解决模板部分的 TypeScript 支持问题而生,希望对你有所帮助!