-
-
Notifications
You must be signed in to change notification settings - Fork 9.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
从类型文件中导入某个类型之后,会导致 vue 全局属性识别异常。 #13086
Labels
Comments
|
改的是源码,不过新版本还没发布,等到时候发布了,你再试一下 |
好的,感谢回复。 |
这周会发个新版本 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
重现链接
https://github.com/LLoyou00/bug_report
Vant 版本
4.9.4
描述一下你遇到的问题。
起因是我对 VanField 组件进行二次封装,因为我用的是 ts,所以导入了 FieldRule 用来给 props 进行类型声明,然后我发现所有自定义的 vue 全局属性都提示 does not exist(实际不影响使用),经过排查后,确认是 Vant 导致的,可能我的表述不是很准确,但这个问题很容易复现。
以上是正常情况,可以看到可以识别 $router 的类型,如果我把 import VantButton 的语句取消注释,就会报错。
重现步骤
新建空白 vue 项目,使用 ts 语法,安装 vue-router
在任意 vue 文件中导入一个 vant 的组件
复现环境
VS Code 1.89.1
Vue - Official 2.0.28
设备/浏览器
No response
The text was updated successfully, but these errors were encountered: