Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 3f13daa

Browse files
termosachrisvfritz
authored andcommitted
Clarify the compilation example (vuejs#749)
Add output for staticRenderFns, so it appears more clearly.
1 parent 90168c2 commit 3f13daa

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

‎src/v2/guide/render-function.md‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -546,6 +546,7 @@ You may be interested to know that Vue's templates actually compile to render fu
546546
<pre><code>{{ result.render }}</code></pre>
547547
<label>staticRenderFns:</label>
548548
<pre v-for="(fn, index) in result.staticRenderFns"><code>_m({{ index }}): {{ fn }}</code></pre>
549+
<pre v-if="!result.staticRenderFns.length"><code>{{ result.staticRenderFns }}</code></pre>
549550
</div>
550551
<div v-else>
551552
<label>Compilation Error:</label>
@@ -558,7 +559,9 @@ new Vue({
558559
data: {
559560
templateText: '\
560561
<div>\n\
561-
<h1>I\'m a template!</h1>\n\
562+
<header>\n\
563+
<h1>I\'m a template!</h1>\n\
564+
</header>\n\
562565
<p v-if="message">\n\
563566
{{ message }}\n\
564567
</p>\n\
@@ -605,7 +608,7 @@ console.error = function (error) {
605608
}
606609
#vue-compile-demo textarea {
607610
width: 100%;
608-
611+
font-family: monospace;
609612
}
610613
</style>
611614
{% endraw %}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /