当被监听的数据发生变化是,函数被执行
created() { this.$watch("Withdrawals", function (newValue, oldValue) { if(this.Withdrawals==false){ console.log("123") } }) }
data(){ return{ Withdrawals:false } }
created() { this.$watch("Withdrawals", function (newValue, oldValue) { if(this.Withdrawals==false){ console.log("123") } }) }
data(){ return{ Withdrawals:false } }
转载于:https://www.cnblogs.com/learnoffs/p/8023674.html