Skip to content
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

在tsx类型中使用小程序原生第三方组件和插件,报错,类型“JSX.IntrinsicElements”上不存在属性“calendar”。 #45

Open
kiana-god opened this issue Jan 18, 2021 · 5 comments

Comments

@kiana-god
Copy link

根据官网的使用方式,进行引入使用。能正常使用,但是这边使用的是index.tsx 格式的文件进行书写。就报类型“JSX.IntrinsicElements”上不存在属性“calendar”。 这个问题

@kiana-god
Copy link
Author

image
请问怎么处理

@drizzlesconsin
Copy link

// global.d.ts
declare namespace JSX {
  interface IntrinsicElements {
    calendar: any;
  }
}

目前似乎只能这样

@kiana-god
Copy link
Author

// global.d.ts
declare namespace JSX {
  interface IntrinsicElements {
    calendar: any;
  }
}

目前似乎只能这样

这个要怎么使用呢。。😢

@KanChaiShaoXia
Copy link

也可以在上面加一行 @ts-ignore 跳过检查

image

@kiana-god
Copy link
Author

也可以在上面加一行 @ts-ignore 跳过检查

image

也可以在上面加一行@ ts-ignore跳过检查

图像

非常感谢,这也是一种方式!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants