mirror of
https://github.com/vuejs/babel-plugin-jsx.git
synced 2025-02-12 00:10:25 +08:00
docs: upgrade README
This commit is contained in:
parent
d19a593080
commit
881ea9ec84
@ -26,15 +26,29 @@ npm install @ant-design-vue/babel-plugin-jsx -D
|
|||||||
|
|
||||||
### 参数
|
### 参数
|
||||||
|
|
||||||
* transformOn
|
#### transformOn
|
||||||
|
|
||||||
|
Type: `boolean`
|
||||||
|
|
||||||
|
Default: `false`
|
||||||
|
|
||||||
把 `on: { click: xx }` 转成 `onClick: xxx`
|
把 `on: { click: xx }` 转成 `onClick: xxx`
|
||||||
|
|
||||||
* compatibleProps
|
#### optimize
|
||||||
|
|
||||||
兼容大多数 Vue 2 的写法,Vue 3 中,把所有属性都改成了顶级属性,意味这不需要再传递 props,attrs 这些属性。
|
Type: `boolean`
|
||||||
|
|
||||||
开启这个参数意味着对 { attrs, props, on } 做了兼容处理,但是所有的属性外层都会有 `compatibleProps` 方法
|
Default: `false`
|
||||||
|
|
||||||
|
是否开启优化. 如果你对 Vue 3 不太熟悉,不建议打开
|
||||||
|
|
||||||
|
#### isCustomElement
|
||||||
|
|
||||||
|
Type: `(tag: string) => boolean`
|
||||||
|
|
||||||
|
Default: `undefined`
|
||||||
|
|
||||||
|
自定义元素
|
||||||
|
|
||||||
## 表达式
|
## 表达式
|
||||||
|
|
||||||
|
@ -26,14 +26,29 @@ Then add the plugin to .babelrc:
|
|||||||
|
|
||||||
### options
|
### options
|
||||||
|
|
||||||
* transformOn
|
#### transformOn
|
||||||
|
|
||||||
|
Type: `boolean`
|
||||||
|
|
||||||
|
Default: `false`
|
||||||
|
|
||||||
transform `on: { click: xx }` to `onClick: xxx`
|
transform `on: { click: xx }` to `onClick: xxx`
|
||||||
* compatibleProps
|
|
||||||
|
|
||||||
compatible with Vue 2.x
|
#### optimize
|
||||||
|
|
||||||
`{ props, on = {}, attrs, ...rest }` will be transformed to `{ ...props, ...attrs, ...transformOn(on), ...rest }`
|
Type: `boolean`
|
||||||
|
|
||||||
|
Default: `false`
|
||||||
|
|
||||||
|
enable optimization or not. It's not recommended to enable it If you are not familiar with Vue 3.
|
||||||
|
|
||||||
|
#### isCustomElement
|
||||||
|
|
||||||
|
Type: `(tag: string) => boolean`
|
||||||
|
|
||||||
|
Default: `undefined`
|
||||||
|
|
||||||
|
configuring custom elements
|
||||||
|
|
||||||
## Syntax
|
## Syntax
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user