Skip to content

render-function.md — tick consistency #956

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Jun 22, 2017
14 changes: 7 additions & 7 deletions src/v2/guide/render-function.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ createElement(
},

// {String | Array}
// Children VNodes, built using createElement(),
// Children VNodes, built using `createElement()`,
// or simply using strings to get 'text VNodes'. Optional.
[
'Some text comes first.',
Expand Down Expand Up @@ -148,16 +148,16 @@ One thing to note: similar to how `v-bind:class` and `v-bind:style` have special
domProps: {
innerHTML: 'baz'
},
// Event handlers are nested under "on", though
// modifiers such as in v-on:keyup.enter are not
// Event handlers are nested under `on`, though
// modifiers such as in `v-on:keyup.enter` are not
// supported. You'll have to manually check the
// keyCode in the handler instead.
on: {
click: this.clickHandler
},
// For components only. Allows you to listen to
// native events, rather than events emitted from
// the component using vm.$emit.
// the component using `vm.$emit`.
nativeOn: {
click: this.nativeClickHandler
},
Expand Down Expand Up @@ -366,7 +366,7 @@ You can access static slot contents as Arrays of VNodes from [`this.$slots`](../

``` js
render: function (createElement) {
// <div><slot></slot></div>
// `<div><slot></slot></div>`
return createElement('div', this.$slots.default)
}
```
Expand All @@ -375,7 +375,7 @@ And access scoped slots as functions that return VNodes from [`this.$scopedSlots

``` js
render: function (createElement) {
// <div><slot :text="msg"></slot></div>
// `<div><slot :text="msg"></slot></div>`
return createElement('div', [
this.$scopedSlots.default({
text: this.msg
Expand All @@ -390,7 +390,7 @@ To pass scoped slots to a child component using render functions, use the `scope
render (createElement) {
return createElement('div', [
createElement('child', {
// pass scopedSlots in the data object
// pass `scopedSlots` in the data object
// in the form of { name: props => VNode | Array<VNode> }
scopedSlots: {
default: function (props) {
Expand Down