docs(auto-import-resolver): add doc for importStyle option (#12382)

* docs(auto-import-resolver): add doc for importStyle option

* docs: upd
This commit is contained in:
neverland
2023-10-22 21:30:40 +08:00
committed by GitHub
parent 86688394d2
commit cc9aced041
4 changed files with 47 additions and 3 deletions

View File

@@ -1,6 +1,6 @@
# Vant Auto Import Resolver
[English](./README.md) | 简体中文
English | [简体中文](./README.zh-CN.md)
`@vant/auto-import-resolver` is a resolver for [unplugin-vue-components](https://github.com/unplugin/unplugin-vue-components) that enables on-demand importing of Vant components.
@@ -126,3 +126,24 @@ build({
],
});
```
## Options
### importStyle
Whether to automatically import the corresponding styles of the components.
- **Type:** `boolean`
- **Default:** `true`
- **Example:**
```ts
Components({
resolvers: [
VantResolver({
// Disable style import
importStyle: false,
}),
],
});
```

View File

@@ -1,6 +1,6 @@
# Vant Auto Import Resolver
English | [简体中文](./README.zh-CN.md)
[English](./README.md) | 简体中文
`@vant/auto-import-resolver` 是 [unplugin-vue-components](https://github.com/unplugin/unplugin-vue-components) 的一个解析器,用于实现 Vant 按需引入。
@@ -126,3 +126,24 @@ build({
],
});
```
## 选项
### importStyle
是否自动引用组件对应的样式。
- **Type** `boolean`
- **Default** `true`
- **Example**
```ts
Components({
resolvers: [
VantResolver({
// 禁用样式引用
importStyle: false,
}),
],
});
```