mirror of
https://github.com/youzan/vant.git
synced 2025-10-15 15:40:52 +00:00
feat(@vant/auto-import-resolver): Support exclude in components or apis (#13357)
Co-authored-by: wangzhifeng <wangzhifeng@keytop.com.cn>
This commit is contained in:
@@ -196,3 +196,31 @@ Components({
|
||||
- **Default:** `undefined`
|
||||
|
||||
This option is deprecated. Please use the `module` option to set the module type.
|
||||
|
||||
### exclude
|
||||
|
||||
Set the components or APIs that do not require automatic import.
|
||||
|
||||
- **Type:** `string[]`
|
||||
- **Default:** `[]`
|
||||
- **Example:**
|
||||
|
||||
```ts
|
||||
Components({
|
||||
resolvers: [
|
||||
VantResolver({
|
||||
exclude: ['Button'],
|
||||
}),
|
||||
],
|
||||
});
|
||||
```
|
||||
|
||||
```ts
|
||||
AutoImport({
|
||||
resolvers: [
|
||||
VantResolver({
|
||||
exclude: ['showToast'],
|
||||
}),
|
||||
],
|
||||
});
|
||||
```
|
Reference in New Issue
Block a user