Comparing version 0.3.0 to 0.3.1
@@ -19,3 +19,3 @@ { | ||
}, | ||
"version": "0.3.0" | ||
"version": "0.3.1" | ||
} |
module.exports = (function () { | ||
var Store = { | ||
data() { | ||
data: function() { | ||
return { | ||
@@ -11,3 +11,3 @@ __ctx: null, | ||
methods: { | ||
set(key, val) { | ||
set: function(key, val) { | ||
this.$set('data.' + key, val); | ||
@@ -18,7 +18,7 @@ | ||
get(key) { | ||
get: function(key) { | ||
return this.$get('data.' + key); | ||
}, | ||
clr(key) { | ||
clr: function(key) { | ||
this.$set('data.' + key, undefined); | ||
@@ -29,12 +29,16 @@ | ||
run(key) { | ||
run: function(key) { | ||
var args = Array.prototype.slice.call(arguments, 1); | ||
return this.$get('data.' + key).apply(this.__ctx, args); | ||
this.$get('data.' + key).apply(this.__ctx, args); | ||
return this; | ||
}, | ||
watch(key, cb) { | ||
watch: function(key, cb) { | ||
this.$watch('data.' + key, function (newVal, oldVal) { | ||
cb.call(this.__ctx, newVal, oldVal); | ||
}); | ||
return this; | ||
} | ||
@@ -51,3 +55,3 @@ } | ||
$store: { | ||
get () { | ||
get: function() { | ||
store.__ctx = this; | ||
@@ -54,0 +58,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5277
45