computed: {
//复合肥钾含量
'compoundFertilizer2.potassiumTotal':{
get(val){
if(!Number(val.compoundFertilizer2.potassiumTotal)){
return parseFloat(val.compoundFertilizer2.potassiumTotal);
}else{
if(val.compoundFertilizer2.potassiumTotal<=100 && val.compoundFertilizer2.potassiumTotal>0){
this.potassiumTotalchangeVal=val.compoundFertilizer2.potassiumTotal;
}
if(val.compoundFertilizer2.potassiumTotal>100 || val.compoundFertilizer2.potassiumTotal<0){
this.compoundFertilizer2.potassiumTotal=this.potassiumTotalchangeVal;
return this.potassiumTotalchangeVal;
}
}
}
},
}
vue计算监听事件的高级设计
最新推荐文章于 2024-09-19 18:19:08 发布