Skip to content

Commit 008e692

Browse files
committed
update(doc): create-api en doc
1 parent 108bd04 commit 008e692

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

document/components/docs/en-US/create-api.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,10 @@ This module exports a function called `createAPI` with which you can invoke the
1313

1414
- Usage:
1515

16-
- This method will add a method which is named `$create{camelize(Component.name)}` to Vue's prototype, so you can instantiate the Vue component by `const instance = this.$createAaBb(config, [renderFn])` in other components. The instantiated component's template content will be attached to `body` element.The parameters of the `$createAaBb`
16+
- This method will add a method which is named `$create{camelize(Component.name)}` to Vue's prototype, so you can instantiate the Vue component by `const instance = this.$createAaBb(config, [renderFn, single])` in other components. The instantiated component's template content will be attached to `body` element.The parameters of the `$createAaBb`
1717
- `{Object} config` It will be passed to the component as its props except the events in `events`(It will transform by default, eg: If `events` has value `['click']`, then the prop `onClick` will be treated as component's event and not component's props).
1818
- `{Function} [renderFn]` Optional, used to generate the VNode child node in the slot scene in general.
19+
- `{Boolean} [single]` Optional, whether the instantiated component is a singleton or not. If two parameters are provided and the `renderFn`'s type is not function, then the `single` value is the sencond parameter's value.
1920
- The return of the method `instance` is a instantiated Vue component,and the `remove` method will be **attached** to this instance.You can invoke the `remove` method to destroy the component and detach the component's content from `body` element.
2021

2122
- Example:

0 commit comments

Comments
 (0)