Skip to content

Commit b3a43ee

Browse files
hylinyyx990803
authored andcommitted
textarea with v-pre should skip compile (vuejs#3202)
1 parent a683e0f commit b3a43ee

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/compiler/compile.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,10 @@ function compileElement (el, options) {
326326
// textarea treats its text content as the initial value.
327327
// just bind it as an attr directive for value.
328328
if (el.tagName === 'TEXTAREA') {
329+
// a textarea which has v-pre attr should skip complie.
330+
if (getAttr(el, 'v-pre') !== null) {
331+
return skip
332+
}
329333
var tokens = parseText(el.value)
330334
if (tokens) {
331335
el.setAttribute(':value', tokensToExp(tokens))

0 commit comments

Comments
 (0)