From c7a7a1da76c8efdbe8c7fb2a8803bec1cac73f4f Mon Sep 17 00:00:00 2001 From: Vincent Cantin Date: Tue, 13 Jun 2017 14:38:07 +0800 Subject: [PATCH 1/2] Makes a feature more obvious to the reader ... following an issue that I encountered. https://github.com/vuejs/vue/issues/5870#issuecomment-308016696 --- src/v2/guide/render-function.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/v2/guide/render-function.md b/src/v2/guide/render-function.md index 43accc7266..a2c4d26634 100644 --- a/src/v2/guide/render-function.md +++ b/src/v2/guide/render-function.md @@ -106,15 +106,16 @@ createElement( }, // {String | Array} - // Children VNodes. Optional. + // Children VNodes, built using createElement(), + // or simply using strings to get 'text VNodes'. Optional. [ - createElement('h1', 'hello world'), + 'Some text comes first.', + createElement('h1', 'A headline'), createElement(MyComponent, { props: { - someProp: 'foo' + someProp: 'foobar' } - }), - 'bar' + }) ] ) ``` From 16054b885e7541dab183be561a547379643f6707 Mon Sep 17 00:00:00 2001 From: Vincent Cantin Date: Wed, 14 Jun 2017 13:45:04 +0800 Subject: [PATCH 2/2] Added some missing commas --- src/v2/guide/render-function.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/v2/guide/render-function.md b/src/v2/guide/render-function.md index a2c4d26634..762ba66903 100644 --- a/src/v2/guide/render-function.md +++ b/src/v2/guide/render-function.md @@ -167,7 +167,7 @@ One thing to note: similar to how `v-bind:class` and `v-bind:style` have special directives: [ { name: 'my-custom-directive', - value: '2' + value: '2', expression: '1 + 1', arg: 'foo', modifiers: { @@ -182,7 +182,7 @@ One thing to note: similar to how `v-bind:class` and `v-bind:style` have special }, // The name of the slot, if this component is the // child of another component - slot: 'name-of-slot' + slot: 'name-of-slot', // Other special top-level properties key: 'myKey', ref: 'myRef'