Can I $watch whole $data but except some properties?
See original GitHub issueSee 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?
Issue Analytics
- State:
- Created 9 years ago
- Comments:8 (1 by maintainers)
Top Results From Across the Web
Ignore some properties in a deep watch for VueJs
I considered creating a computed property to watch that doesn't include the isSelected field but that seems like a lot of overhead to...
Read more >Is there a way of getting all data attributes except one?
i want to send a post axios request with all my data attributes except for one (as it is a very big array...
Read more >Introduction to tables
In an Access database, table properties are attributes of a table that affect the appearance or behavior of the table as a whole....
Read more >[UA→GA4] Comparing metrics: Google Analytics 4 vs ...
Your UA reports may be excluding data based on filters. GA4 properties currently do not support these filters. Pageviews. In general, Pageviews should...
Read more >FAQ: Creating variables recording properties of the other ...
egen, count() by() is also often useful but is a little less general in application, so we will concentrate here on total(). total()...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
http://jsfiddle.net/QdHrN/7/
@asip , the key problem:
addcalculate
is an async function in my case.