ElemeFE / ElemeFE/element

[Feature Request] tsx support

Open
#19,305 2 comments 0 reactions 0 assignees View on GitHub
stale
Dominant language
Vue
Stars
54k
Forks
14.4k
PR merge metrics
No merged PRs in 30d

Description

### Existing Component

### Component Name
Mainly to add tsx support

### Description
Does not include functional plugins and bug fixes, Mainly to expand .d.ts to make element-ui better use in tsx

Just to provide some reference for those who use in tsx, Make the element-ui tag have better code inspection in tsx, and attribute prompt function

> This is one of the code snippets

```ts
import Vue from 'vue'
import 'element-ui'
import 'Vue'
import { ElButton } from 'element-ui/types/button'
declare module 'element-ui' {
class Button extends Vue {
constructor(props: { [index in keyof ElButton]?: ElButton[index]; }&{ children?: VNode|string })
}
}

```
I integrated an attribute declaration file containing all tags,You can view all the declaration files here

[https://github.com/maskletter/tenp-tsxvue/blob/master/element-ui/index.d.ts](https://github.com/maskletter/tenp-tsxvue/blob/master/element-ui/index.d.ts)

Just download it and put it in the project directory

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.