Skip to content

Commit 8c7ee32

Browse files
author
Evan You
committed
Release-v0.7.4
1 parent 212990a commit 8c7ee32

File tree

5 files changed

+39
-39
lines changed

5 files changed

+39
-39
lines changed

bower.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vue",
3-
"version": "0.7.3",
3+
"version": "0.7.4",
44
"main": "dist/vue.js",
55
"description": "Simple, Fast & Composable MVVM for building interative interfaces",
66
"authors": ["Evan You <[email protected]>"],

component.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vue",
3-
"version": "0.7.3",
3+
"version": "0.7.4",
44
"main": "src/main.js",
55
"author": "Evan You <[email protected]>",
66
"description": "Simple, Fast & Composable MVVM for building interative interfaces",

dist/vue.js

+34-34
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
VueJS v0.7.3
2+
VueJS v0.7.4
33
(c) 2014 Evan You
44
License: MIT
55
*/
@@ -2265,7 +2265,9 @@ module.exports = Directive
22652265
});
22662266
require.register("vue/src/exp-parser.js", function(exports, require, module){
22672267
var utils = require('./utils'),
2268-
hasOwn = Object.prototype.hasOwnProperty
2268+
hasOwn = Object.prototype.hasOwnProperty,
2269+
stringSaveRE = /"(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*'/g,
2270+
stringRestoreRE = /"(\d+)"/g
22692271

22702272
// Variable extraction scooped from https://github.com/RubyLouvre/avalon
22712273

@@ -2388,6 +2390,8 @@ module.exports = {
23882390
}
23892391
vars = utils.unique(vars)
23902392
var accessors = '',
2393+
has = utils.hash(),
2394+
strings = [],
23912395
// construct a regex to extract all valid variable paths
23922396
// ones that begin with "$" are particularly tricky
23932397
// because we can't use \b for them
@@ -2396,16 +2400,35 @@ module.exports = {
23962400
vars.map(escapeDollar).join('|') +
23972401
")[$\\w\\.]*\\b", 'g'
23982402
),
2399-
body = ('return ' + exp).replace(pathRE, function (path) {
2400-
// keep track of the first char
2401-
var c = path.charAt(0)
2402-
path = path.slice(1)
2403-
var val = 'this.' + getRel(path, compiler) + path
2404-
accessors += val + ';'
2405-
// don't forget to put that first char back
2406-
return c + val
2407-
})
2403+
body = ('return ' + exp)
2404+
.replace(stringSaveRE, saveStrings)
2405+
.replace(pathRE, replacePath)
2406+
.replace(stringRestoreRE, restoreStrings)
24082407
body = accessors + body
2408+
2409+
function saveStrings (str) {
2410+
var i = strings.length
2411+
strings[i] = str
2412+
return '"' + i + '"'
2413+
}
2414+
2415+
function replacePath (path) {
2416+
// keep track of the first char
2417+
var c = path.charAt(0)
2418+
path = path.slice(1)
2419+
var val = 'this.' + getRel(path, compiler) + path
2420+
if (!has[path]) {
2421+
accessors += val + ';'
2422+
has[path] = 1
2423+
}
2424+
// don't forget to put that first char back
2425+
return c + val
2426+
}
2427+
2428+
function restoreStrings (str, i) {
2429+
return strings[i]
2430+
}
2431+
24092432
return makeGetter(body, exp)
24102433
}
24112434
}
@@ -2808,10 +2831,6 @@ module.exports = {
28082831
this.el.innerHTML = utils.toText(value)
28092832
},
28102833

2811-
visible: function (value) {
2812-
this.el.style.visibility = value ? '' : 'hidden'
2813-
},
2814-
28152834
show: function (value) {
28162835
var el = this.el,
28172836
target = value ? '' : 'none',
@@ -2833,27 +2852,8 @@ module.exports = {
28332852
this.lastVal = value
28342853
}
28352854
}
2836-
},
2837-
2838-
style: {
2839-
bind: function () {
2840-
this.arg = convertCSSProperty(this.arg)
2841-
},
2842-
update: function (value) {
2843-
this.el.style[this.arg] = value
2844-
}
28452855
}
2846-
}
28472856

2848-
/**
2849-
* convert hyphen style CSS property to Camel style
2850-
*/
2851-
var CONVERT_RE = /-(.)/g
2852-
function convertCSSProperty (prop) {
2853-
if (prop.charAt(0) === '-') prop = prop.slice(1)
2854-
return prop.replace(CONVERT_RE, function (m, char) {
2855-
return char.toUpperCase()
2856-
})
28572857
}
28582858
});
28592859
require.register("vue/src/directives/if.js", function(exports, require, module){

dist/vue.min.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vue",
3-
"version": "0.7.3",
3+
"version": "0.7.4",
44
"author": {
55
"name": "Evan You",
66
"email": "[email protected]",

0 commit comments

Comments
 (0)