提交 cb8d3d00 编写于 作者: D dolymood

docs(create-api): add all config doc

上级 1bf0e04e
......@@ -69,6 +69,19 @@ __Notice:__ All componnets which used `createAPI` must be registered by `Vue.use
1. If `eventValue` is not a string value, then use `eventValue` as the event handler.
1. If `eventValue` is a string value, then use the caller's `eventValue` property value as the event handler.
After 1.10.0+, you can set [all avaliable properties in Vue](https://vuejs.org/v2/guide/render-function.html#The-Data-Object-In-Depth), but you need to add prefix `$`, eg:
```js
this.$createAaBb({
$attrs: {
id: 'id'
},
$class: {
'my-class': true
}
})
```
**The Returned value `instance`:**
`instance` is a instantiated Vue component.
......
......@@ -68,6 +68,19 @@ __注:__ 所有通过 `createAPI` 实现的通过 API 的形式调用的自定
1. 如果 `eventValue` 是非字符串,则直接取配置的 `eventValue` 作为值
1. 如果 `eventValue` 是字符串,则直接获取当前实例上下文对应的 `eventValue` 的值
1.10.0 版本以后 `config` 中可以设置 Vue 支持的所有的[配置值](https://vuejs.org/v2/guide/render-function.html#The-Data-Object-In-Depth),但是必须要加 `$`,例如:
```js
this.$createAaBb({
$attrs: {
id: 'id'
},
$class: {
'my-class': true
}
})
```
**返回值 `instance`:**
`instance` 就是组件实例。
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册