配置自动导入 `vue` 导致 `Ref` 等类型在 ts 文件中使用时使 IDE 失去了导入提示
### Describe the bug
这个问题的根源应该是 `Ref` 等类型的自动导入无法在 ts 文件中使用,需要进行手动导入,手动导入又使 IDE 失去了导入提示功能。
在 ts 中可以不进行类型的自动导入,但是一定保留 IDE 的导入提示功能
### Reproduction
https://github.com/WangJincheng4869/fanKuiWenJian/tree/main/packages/vite-auto-imports
### System Info
```Shell
System:
OS: Windows 11 10.0.26200
CPU: (16) x64 AMD Ryzen 9 7940H w/ Radeon 780M Graphics
Memory: 12.03 GB / 31.22 GB
Binaries:
Node: 22.17.1 - D:\Program Files\nodejs\node.EXE
npm: 10.9.2 - D:\Program Files\nodejs\npm.CMD
pnpm: 10.17.1 - D:\Users\jcwang\AppData\Roaming\npm\pnpm.CMD
Browsers:
Edge: Chromium (141.0.3537.99)
Internet Explorer: 11.0.26100.1882
```
### Used Package Manager
pnpm
### 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 条评论