Skip to content

Commit cc5f98a

Browse files
author
Evan You
committed
use proper version of gulp-component for build...
1 parent 4479c4b commit cc5f98a

File tree

3 files changed

+20
-7
lines changed

3 files changed

+20
-7
lines changed

dist/vue.js

+16-3
Original file line numberDiff line numberDiff line change
@@ -1184,7 +1184,7 @@ CompilerProto.compileNode = function (node) {
11841184
prefix = config.prefix + '-'
11851185
// parse if has attributes
11861186
if (attrs && attrs.length) {
1187-
var attr, isDirective, exps, exp, directive
1187+
var attr, isDirective, exps, exp, directive, dirname
11881188
// loop through all attributes
11891189
i = attrs.length
11901190
while (i--) {
@@ -1200,7 +1200,8 @@ CompilerProto.compileNode = function (node) {
12001200
j = exps.length
12011201
while (j--) {
12021202
exp = exps[j]
1203-
directive = Directive.parse(attr.name.slice(prefix.length), exp, this, node)
1203+
dirname = attr.name.slice(prefix.length)
1204+
directive = Directive.parse(dirname, exp, this, node)
12041205
if (directive) {
12051206
this.bindDirective(directive)
12061207
}
@@ -1216,7 +1217,9 @@ CompilerProto.compileNode = function (node) {
12161217
}
12171218
}
12181219

1219-
if (isDirective) node.removeAttribute(attr.name)
1220+
if (isDirective && dirname !== 'cloak') {
1221+
node.removeAttribute(attr.name)
1222+
}
12201223
}
12211224
}
12221225
// recursively compile childNodes
@@ -2911,6 +2914,7 @@ function reset () {
29112914
});
29122915
require.register("vue/src/directives/index.js", function(exports, require, module){
29132916
var utils = require('../utils'),
2917+
config = require('../config'),
29142918
transition = require('../transition')
29152919

29162920
module.exports = {
@@ -2956,6 +2960,15 @@ module.exports = {
29562960
this.lastVal = value
29572961
}
29582962
}
2963+
},
2964+
2965+
cloak: {
2966+
bind: function () {
2967+
var el = this.el
2968+
this.compiler.observer.once('hook:ready', function () {
2969+
el.removeAttribute(config.prefix + '-cloak')
2970+
})
2971+
}
29592972
}
29602973

29612974
}

0 commit comments

Comments
 (0)