-
Notifications
You must be signed in to change notification settings - Fork 95
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
引入elementUi的部分 #14
Comments
same issue.. |
declare global {
namespace JSX {
interface Element extends VNode{
// 'el-form': ElForm
}
interface ElementClass extends Vue {}
interface IntrinsicElements{
[elem: string]: any;
}
}
} 我尝试使用tsx来写Vue,ts静态检查找不到elementUI可以使用上面这种方式来声明 |
在src 目录下 shims-tsx.d.ts 但是它并没有生效 |
|
@webtianjia 请问有最小重现的repo么 |
declare module 'vue/types/vue' {
interface Vue {
$Message: any,
$Modal: any
}
} 这段代码加到d.ts里面了么 |
@Debiancc 已经可以了 ,我安装了 |
@ws456999 这种workaround只是骗过tsc的静态检查,有什么办法可以让element-ui的types直接委托过来吗 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
我在main.ts 引入了elementUi,使用时却找不到他的方法
The text was updated successfully, but these errors were encountered: