Browse Source

remove v-cloak for conditional compiles (fix #1028)

Evan You 10 năm trước cách đây
mục cha
commit
90cdcdb57f
1 tập tin đã thay đổi với 4 bổ sung1 xóa
  1. 4 1
      src/directive.js

+ 4 - 1
src/directive.js

@@ -52,7 +52,10 @@ var p = Directive.prototype
  */
 
 p._bind = function (def) {
-  if (this.name !== 'cloak' && this.el && this.el.removeAttribute) {
+  if (
+    (this.name !== 'cloak' || this.vm._isCompiled) &&
+    this.el && this.el.removeAttribute
+  ) {
     this.el.removeAttribute(config.prefix + this.name)
   }
   if (typeof def === 'function') {