I use 'watch' in the component, just like:
watch: {
config:{
handler: function(){
this.colorAnalysis = this.$props.config;
},
deep: true,
immediate: true
},
It can work, but show message below:
Declaration emit for this file requires using private name 'handler'. An explicit type annotation may unblock declaration emit.
I can not figure out what's the problem, and how to prevent this situation. Please give me some directions.Thanks.
I do not figure out the reason. But when I change format to:
watch: {
config() {
this.colorAnalysis = this.$props.config;
},
}
the message disappeared!