-
-
Notifications
You must be signed in to change notification settings - Fork 33.8k
Closed
Description
See the code here:
new Vue({
el: '#x',
data: {
prop1 : '',
prop2 : '',
...
result : ''
},
ready: function(){
this.$watch('$data', function(){
this.load(function( xx ){
// # This will cause '$data change' again, then do 'load' again, infinity looping...
this.result = xx;
// /
// So, can I watch the whole $data but except the 'result'?
});
});
},
methods: {
load: function( callback ){
var self = this;
doSomeAsync(function( xx ){
callback.call(self, xx);
});
}
}
});
Did I use it in the right way?
Metadata
Metadata
Assignees
Labels
No labels