remaxjs / remax

使用真正的 React 构建跨平台小程序
https://remaxjs.github.io/remax/
MIT License
4.57k stars 364 forks source link

2.9版本remax集成vant typescrip语法报错 #1574

Open ToBeAnotherYou opened 3 years ago

ToBeAnotherYou commented 3 years ago
  1. 按照vant官网配置了typescript的支持还是报错 JSX 元素类型“VantButton”不具有任何构造签名或调用签名
yesmeck commented 3 years ago

能给个重现 demo 吗?

ToBeAnotherYou commented 3 years ago

能给个重现demo吗?

https://gitee.com/panfuhao96/wechat-applet/invite_link?invite=885af9973ff845971990a5109ac6d3ab32a7563a535d66c9b7993663152babc51b32302754496b375f318cd36bbddc3a

这个gitee地址邀请

ToBeAnotherYou commented 3 years ago

编译是没有报错的,就是写代码的时候会提示语法错误

lee88688 commented 3 years ago

你是不是导入的dist下面的代码,dist下面代码做了类型注释文件,但是没有任何内容,因此TypeScript会报错。我是自己写的类型定义。

haobarry commented 2 years ago

你是不是导入的dist下面的代码,dist下面代码做了类型注释文件,但是没有任何内容,因此TypeScript会报错。我是自己写的类型定义。

不导入dist还能导入啥?

watsonhaw5566 commented 2 years ago

你是不是导入的dist下面的代码,dist下面代码做了类型注释文件,但是没有任何内容,因此TypeScript会报错。我是自己写的类型定义。

不导入dist还能导入啥? @haobarry 试着安装一下 vant mini typing https://github.com/fanhaoyuan/vant-weapp-typings

haobarry commented 2 years ago

你是不是导入的dist下面的代码,dist下面代码做了类型注释文件,但是没有任何内容,因此TypeScript会报错。我是自己写的类型定义。

不导入dist还能导入啥? @haobarry 试着安装一下 vant mini typing https://github.com/fanhaoyuan/vant-weapp-typings

好的 谢了