From 6a5db231aeba2a4b2e9f8b82925f89f2081f9b83 Mon Sep 17 00:00:00 2001 From: wangtao23 Date: Fri, 1 Jul 2016 13:20:35 +0800 Subject: [PATCH] textarea with v-pre should skip compile --- src/compiler/compile.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/compiler/compile.js b/src/compiler/compile.js index b2f91c8120c..c53967dd52d 100644 --- a/src/compiler/compile.js +++ b/src/compiler/compile.js @@ -326,6 +326,10 @@ function compileElement (el, options) { // textarea treats its text content as the initial value. // just bind it as an attr directive for value. if (el.tagName === 'TEXTAREA') { + // a textarea which has v-pre attr should skip complie. + if (getAttr(el, 'v-pre') !== null) { + return skip + } var tokens = parseText(el.value) if (tokens) { el.setAttribute(':value', tokensToExp(tokens))