element [Feature Request] tsx support

hyrbngr7  于 5个月前  发布在  其他
关注(0)|答案(2)|浏览(60)

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

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

Just download it and put it in the project directory

2jcobegt

2jcobegt1#

Translation of this issue:

Existing Component

no

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

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
5lhxktic

5lhxktic2#

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.

相关问题