Skip to content

Commit

Permalink
correct misleading content about render function (#552)
Browse files Browse the repository at this point in the history
* add usage that pass setup function to defineComponent

* correct misleading content about render function
  • Loading branch information
unbyte committed Sep 26, 2020
1 parent b846b8d commit 9ae70db
Showing 1 changed file with 4 additions and 14 deletions.
18 changes: 4 additions & 14 deletions src/guide/render-function.md
Original file line number Diff line number Diff line change
Expand Up @@ -296,26 +296,16 @@ render() {

#### Event Modifiers

For the `.passive`, `.capture`, and `.once` event modifiers, Vue offers object syntax of the handler:
For the `.passive`, `.capture`, and `.once` event modifiers, they can be concatenated after event name using camel case.

For example:

```javascript
render() {
return Vue.h('input', {
onClick: {
handler: this.doThisInCapturingMode,
capture: true
},
onKeyup: {
handler: this.doThisOnce,
once: true
},
onMouseover: {
handler: this.doThisOnceInCapturingMode,
once: true,
capture: true
},
onClickCapture: this.doThisInCapturingMode,
onKeyupOnce: this.doThisOnce,
onMouseoverOnceCapture: this.doThisOnceInCapturingMode,
})
}
```
Expand Down

0 comments on commit 9ae70db

Please sign in to comment.