From 89384f46f12db2a7564050a81e25f761350965d9 Mon Sep 17 00:00:00 2001 From: rk_zhang <40221744+qmhc@users.noreply.github.com> Date: Tue, 19 Oct 2021 09:05:18 +0800 Subject: [PATCH] docs: update simple example for use --- README.md | 33 +++++++++++++++++++++++++++++++++ README.zh-CN.md | 32 ++++++++++++++++++++++++++++++++ example/components/JsTest.vue | 5 ++--- example/components/JsxTest.jsx | 5 ++--- 4 files changed, 69 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 160c8b2..81b8ed8 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,8 @@ yarn add vite-plugin-dts -D ## Usage +In `vite.config.ts`: + ```ts import { resolve } from 'path' import { defineConfig } from 'vite' @@ -30,6 +32,37 @@ export default defineConfig({ }) ``` +In your component: + +```vue + + + +``` + +```vue + + + +``` + ## Options ```ts diff --git a/README.zh-CN.md b/README.zh-CN.md index f5c6de1..6360f08 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -12,6 +12,8 @@ yarn add vite-plugin-dts -D ## 使用 +在 `vite.config.ts`: + ```ts import { resolve } from 'path' import { defineConfig } from 'vite' @@ -30,6 +32,36 @@ export default defineConfig({ }) ``` +在你的组件中: + +```vue + + + +``` + +```vue + + + +``` + ## 选项 ```ts diff --git a/example/components/JsTest.vue b/example/components/JsTest.vue index 16be4f7..6021ae5 100644 --- a/example/components/JsTest.vue +++ b/example/components/JsTest.vue @@ -5,9 +5,8 @@