소스 검색

dont remove v-cloak during compile

Evan You 11 년 전
부모
커밋
c1f24e4e5c
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. 3 1
      src/instance/compile.js

+ 3 - 1
src/instance/compile.js

@@ -102,7 +102,9 @@ exports._compileAttrs = function (node) {
     if (attrName.indexOf(config.prefix) === 0) {
       dirName = attrName.slice(config.prefix.length)
       if (registry[dirName]) {
-        node.removeAttribute(attrName)
+        if (dirName !== 'cloak') {
+          node.removeAttribute(attrName)
+        }
         dirs.push({
           name: dirName,
           value: attr.value