mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
docs: update import path (#10007)
This commit is contained in:
parent
df9eb68dbe
commit
0b57718b6e
@ -152,7 +152,7 @@ export default {
|
||||
{
|
||||
libraryName: 'vant',
|
||||
esModule: true,
|
||||
resolveStyle: (name) => `vant/es/${name}/style`,
|
||||
resolveStyle: (name) => `vant/es/${name}/style/index`,
|
||||
},
|
||||
],
|
||||
}),
|
||||
@ -163,8 +163,8 @@ export default {
|
||||
### 3. Manually import
|
||||
|
||||
```js
|
||||
import Button from 'vant/es/button';
|
||||
import 'vant/es/button/style';
|
||||
import Button from 'vant/es/button/index';
|
||||
import 'vant/es/button/style/index';
|
||||
```
|
||||
|
||||
### 4. Import all components
|
||||
|
@ -172,7 +172,7 @@ export default {
|
||||
{
|
||||
libraryName: 'vant',
|
||||
esModule: true,
|
||||
resolveStyle: (name) => `vant/es/${name}/style`,
|
||||
resolveStyle: (name) => `vant/es/${name}/style/index`,
|
||||
},
|
||||
],
|
||||
}),
|
||||
@ -186,9 +186,9 @@ export default {
|
||||
|
||||
```js
|
||||
// 引入组件
|
||||
import Button from 'vant/es/button';
|
||||
import Button from 'vant/es/button/index';
|
||||
// 引入组件对应的样式,若组件没有样式文件,则无须引入
|
||||
import 'vant/es/button/style';
|
||||
import 'vant/es/button/style/index';
|
||||
```
|
||||
|
||||
### 方式四. 导入所有组件
|
||||
|
Loading…
x
Reference in New Issue
Block a user