Vue3项目自动引入ElementPlus的ElMessage、ElMessageBox时无法被ts识别并生成类型
### Describe the bug
配置如下,src/auto-imports.d.ts 中没有自动生成 ElMessage、ElMessageBox 的类型
export default defineConfig({
plugins: [
vue(),
vueDevTools(),
AutoImport({
resolvers: [ElementPlusResolver()],
dts: 'src/auto-imports.d.ts',
}),
Components({
resolvers: [ElementPlusResolver()],
dts: 'src/components.d.ts',
}),
],
### Reproduction
项目启动后
### System Info
```Shell
?
```
### Used Package Manager
npm
### Validations
- [x] Follow our [Code of Conduct](https://github.com/antfu/.github/blob/main/CODE_OF_CONDUCT.md)
- [x] Read the [Contributing Guide](https://github.com/antfu/contribute).
- [x] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- [x] Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
- [x] The provided reproduction is a [minimal reproducible](https://stackoverflow.com/help/minimal-reproducible-example) of the bug.
0 条评论