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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy