Skip to content

Commit

Permalink
use proper version of gulp-component for build...
Browse files Browse the repository at this point in the history
  • Loading branch information
Evan You committed Feb 11, 2014
1 parent 4479c4b commit cc5f98a
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 7 deletions.
19 changes: 16 additions & 3 deletions dist/vue.js
Original file line number Diff line number Diff line change
Expand Up @@ -1184,7 +1184,7 @@ CompilerProto.compileNode = function (node) {
prefix = config.prefix + '-'
// parse if has attributes
if (attrs && attrs.length) {
var attr, isDirective, exps, exp, directive
var attr, isDirective, exps, exp, directive, dirname
// loop through all attributes
i = attrs.length
while (i--) {
Expand All @@ -1200,7 +1200,8 @@ CompilerProto.compileNode = function (node) {
j = exps.length
while (j--) {
exp = exps[j]
directive = Directive.parse(attr.name.slice(prefix.length), exp, this, node)
dirname = attr.name.slice(prefix.length)
directive = Directive.parse(dirname, exp, this, node)
if (directive) {
this.bindDirective(directive)
}
Expand All @@ -1216,7 +1217,9 @@ CompilerProto.compileNode = function (node) {
}
}

if (isDirective) node.removeAttribute(attr.name)
if (isDirective && dirname !== 'cloak') {
node.removeAttribute(attr.name)
}
}
}
// recursively compile childNodes
Expand Down Expand Up @@ -2911,6 +2914,7 @@ function reset () {
});
require.register("vue/src/directives/index.js", function(exports, require, module){
var utils = require('../utils'),
config = require('../config'),
transition = require('../transition')

module.exports = {
Expand Down Expand Up @@ -2956,6 +2960,15 @@ module.exports = {
this.lastVal = value
}
}
},

cloak: {
bind: function () {
var el = this.el
this.compiler.observer.once('hook:ready', function () {
el.removeAttribute(config.prefix + '-cloak')
})
}
}

}
Expand Down
Loading

0 comments on commit cc5f98a

Please sign in to comment.