Przeglądaj źródła

dont remove v-cloak during compile

Evan You 11 lat temu
rodzic
commit
c1f24e4e5c
1 zmienionych plików z 3 dodań i 1 usunięć
  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