Skip to content

Commit b16342e

Browse files
authored
[Doc] ts import plugin (youzan#1230)
1 parent 333dedc commit b16342e

File tree

4 files changed

+9
-1
lines changed

4 files changed

+9
-1
lines changed

README.md

+2
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,8 @@ Then you can import components from vant, equivalent to import manually below.
8181
import { Button } from 'vant';
8282
```
8383

84+
> If you are using TypeScript,please use [ts-import-plugin](https://github.com/Brooooooklyn/ts-import-plugin) instead
85+
8486
#### 2. Manually import
8587

8688
```js

README.zh-CN.md

+2
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,8 @@ npm i babel-plugin-import -D
8282
import { Button } from 'vant';
8383
```
8484

85+
> 如果你在使用 TypeScript,可以使用 [ts-import-plugin](https://github.com/Brooooooklyn/ts-import-plugin) 实现按需引入
86+
8587
#### 方式二. 按需引入组件
8688

8789
在不使用插件的情况下,可以手动引入需要的组件

docs/markdown/quickstart.en-US.md

+2
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ Then you can import components from vant, equivalent to import manually below.
6262
import { Button } from 'vant';
6363
```
6464

65+
> If you are using TypeScript,please use [ts-import-plugin](https://github.com/Brooooooklyn/ts-import-plugin) instead
66+
6567
#### 2. Manually import
6668

6769
```js

docs/markdown/quickstart.zh-CN.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ npm i babel-plugin-import -D
6666
import { Button, Cell } from 'vant';
6767
```
6868

69+
> 如果你在使用 TypeScript,可以使用 [ts-import-plugin](https://github.com/Brooooooklyn/ts-import-plugin) 实现按需引入
70+
6971
#### 方式二. 按需引入组件
7072

7173
在不使用插件的情况下,可以手动引入需要的组件
@@ -86,7 +88,7 @@ import 'vant/lib/vant-css/index.css';
8688
Vue.use(Vant);
8789
```
8890

89-
>注意:配置 babel-plugin-import 插件后将不允许导入所有组件
91+
> 注意:配置 babel-plugin-import 插件后将不允许导入所有组件
9092
9193

9294
### Rem 适配

0 commit comments

Comments
 (0)