Skip to content

Commit 9ae70db

Browse files
authored
correct misleading content about render function (#552)
* add usage that pass setup function to defineComponent * correct misleading content about render function
1 parent b846b8d commit 9ae70db

File tree

1 file changed

+4
-14
lines changed

1 file changed

+4
-14
lines changed

src/guide/render-function.md

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -296,26 +296,16 @@ render() {
296296

297297
#### Event Modifiers
298298

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

301301
For example:
302302

303303
```javascript
304304
render() {
305305
return Vue.h('input', {
306-
onClick: {
307-
handler: this.doThisInCapturingMode,
308-
capture: true
309-
},
310-
onKeyup: {
311-
handler: this.doThisOnce,
312-
once: true
313-
},
314-
onMouseover: {
315-
handler: this.doThisOnceInCapturingMode,
316-
once: true,
317-
capture: true
318-
},
306+
onClickCapture: this.doThisInCapturingMode,
307+
onKeyupOnce: this.doThisOnce,
308+
onMouseoverOnceCapture: this.doThisOnceInCapturingMode,
319309
})
320310
}
321311
```

0 commit comments

Comments
 (0)