docs: upgrade README

This commit is contained in:
Amour1688 2020-07-29 12:37:37 +08:00
parent d19a593080
commit 881ea9ec84
2 changed files with 37 additions and 8 deletions

View File

@ -26,15 +26,29 @@ npm install @ant-design-vue/babel-plugin-jsx -D
### 参数
* transformOn
#### transformOn
Type: `boolean`
Default: `false`
`on: { click: xx }` 转成 `onClick: xxx`
* compatibleProps
#### optimize
兼容大多数 Vue 2 的写法Vue 3 中,把所有属性都改成了顶级属性,意味这不需要再传递 propsattrs 这些属性。
Type: `boolean`
开启这个参数意味着对 { attrs, props, on } 做了兼容处理,但是所有的属性外层都会有 `compatibleProps` 方法
Default: `false`
是否开启优化. 如果你对 Vue 3 不太熟悉,不建议打开
#### isCustomElement
Type: `(tag: string) => boolean`
Default: `undefined`
自定义元素
## 表达式

View File

@ -26,14 +26,29 @@ Then add the plugin to .babelrc:
### options
* transformOn
#### transformOn
Type: `boolean`
Default: `false`
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