Open Kingwl opened 5 years ago
Translation of this issue:
Existing Component no
Component Name TSX
Description The type definition of element is nearly not working now
ping:// @island205
more explanation?
This is a solution for adapting type checking in vue tsx.
That is useful(necessary) to a tsx user 🌚
We use tsx too ( use the same library with Kingwl ), I should wrap the components with tsx.ofType api ( provided by library above ). Unfortunately I found there are a lot of wrong interfaces in element's types. ElRow for example, gutter is optional but there is no '?' in the type file
@duxinxiao 能方便看下你们写的例子吗....我在项目里面使用的时候找不到name
你好,虽然问题已经很久了,可能你也用不上了,我还是说下吧,我是重新创建了对element-ui的声明文件,如
class Badge extends Vue {
constructor(props: { [index in keyof ElBadge]?: ElBadge[index]; }&{ children?: VNode|string })
}
此种方式来对element-ui进行tsx下属性的效验,理论上可以支持任意版本
我整合了一个对element-ui的全部组件的属性声明文件,放到了https://github.com/maskletter/tenp-tsxvue/blob/master/element-ui/index.d.ts中
可以直接下载此文件,放在src目录下即可
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Existing Component
否
Component Name
tsx
Description
The type definition of element is nearly not working now 🤷🏻♂️
https://github.com/wonderful-panda/vue-tsx-support