修改
This commit is contained in:
@@ -75,7 +75,7 @@ export default {
|
||||
target: this.totalData.targetValue,
|
||||
thb: this.totalData.thb,
|
||||
// ...rawData,
|
||||
flag: this.getRateFlag(this.totalData.completed) // 新增flag字段
|
||||
flag: this.totalData.completed // 新增flag字段
|
||||
};
|
||||
}
|
||||
},
|
||||
@@ -94,10 +94,6 @@ export default {
|
||||
* @param {number} rate 完成率(原始值,如89代表89%)
|
||||
* @returns {0|1} flag值
|
||||
*/
|
||||
getRateFlag(rate) {
|
||||
if (isNaN(rate) || rate === null || rate === undefined) return 0;
|
||||
return +(rate >= 100 || rate === 0); // + 号将布尔值转为数字(true→1,false→0)
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user