Skip to content

Commit

Permalink
Release-v0.8.1
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Feb 2, 2014
1 parent a1bee31 commit f4a691a
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 20 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vue",
"version": "0.8.0",
"version": "0.8.1",
"main": "dist/vue.js",
"description": "Simple, Fast & Composable MVVM for building interative interfaces",
"authors": ["Evan You <[email protected]>"],
Expand Down
2 changes: 1 addition & 1 deletion component.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vue",
"version": "0.8.0",
"version": "0.8.1",
"main": "src/main.js",
"author": "Evan You <[email protected]>",
"description": "Simple, Fast & Composable MVVM for building interative interfaces",
Expand Down
29 changes: 14 additions & 15 deletions dist/vue.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
VueJS v0.8.0
VueJS v0.8.1
(c) 2014 Evan You
License: MIT
*/
Expand Down Expand Up @@ -1315,10 +1315,7 @@ CompilerProto.defineProp = function (key, binding) {
CompilerProto.defineExp = function (key, binding) {
var getter = ExpParser.parse(key, this)
if (getter) {
var value = binding.isFn
? getter
: { $get: getter }
this.markComputed(binding, value)
this.markComputed(binding, getter)
this.exps.push(binding)
}
}
Expand All @@ -1329,10 +1326,8 @@ CompilerProto.defineExp = function (key, binding) {
CompilerProto.defineComputed = function (key, binding, value) {
this.markComputed(binding, value)
var def = {
get: binding.value.$get
}
if (binding.value.$set) {
def.set = binding.value.$set
get: binding.value.$get,
set: binding.value.$set
}
Object.defineProperty(this.vm, key, def)
}
Expand All @@ -1342,15 +1337,19 @@ CompilerProto.defineComputed = function (key, binding, value) {
* so its getter/setter are bound to proper context
*/
CompilerProto.markComputed = function (binding, value) {
binding.value = value
binding.isComputed = true
// bind the accessors to the vm
if (!binding.isFn) {
binding.value = {
$get: utils.bind(value.$get, this.vm)
if (binding.isFn) {
binding.value = value
} else {
if (typeof value === 'function') {
value = { $get: value }
}
if (value.$set) {
binding.value.$set = utils.bind(value.$set, this.vm)
binding.value = {
$get: utils.bind(value.$get, this.vm),
$set: value.$set
? utils.bind(value.$set, this.vm)
: undefined
}
}
// keep track for dep parsing later
Expand Down
4 changes: 2 additions & 2 deletions dist/vue.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vue",
"version": "0.8.0",
"version": "0.8.1",
"author": {
"name": "Evan You",
"email": "[email protected]",
Expand Down

0 comments on commit f4a691a

Please sign in to comment.