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:
Jeff Wang
2025-02-23 20:39:07 +08:00
committed by GitHub
co-authored by wangzhifeng
parent 0702ba898b
commit 80c6cb06e6
3 changed files with 76 additions and 11 deletions
@@ -196,3 +196,31 @@ Components({
- **Default** `undefined`
此选项已废弃,请使用 `module` 选项来设置模块类型。
### exclude
设置不自动引入的组件或 API。
- **Type** `string[]`
- **Default** `[]`
- **Example**
```ts
Components({
resolvers: [
VantResolver({
exclude: ['Button'],
}),
],
});
```
```ts
AutoImport({
resolvers: [
VantResolver({
exclude: ['showToast'],
}),
],
});
```