diff --git a/entry/src/main/js/default/common/component/LVBattery/LVBattery.js b/entry/src/main/js/default/common/component/LVBattery/LVBattery.js index 61a4eb762b2b55f2735793d55ccf09f40d2614f0..56880ae1c2df54ed81fbeb30b8c5b5ac7b61db82 100644 --- a/entry/src/main/js/default/common/component/LVBattery/LVBattery.js +++ b/entry/src/main/js/default/common/component/LVBattery/LVBattery.js @@ -90,6 +90,7 @@ export default { this.isNotAnim = false }, + //绘制头部 drawHead(ctx) { ctx.fillStyle = this.controller.getViewColor() ctx.beginPath(); @@ -99,6 +100,7 @@ export default { ctx.closePath(); ctx.fill() }, + //绘制身体 drawBody(ctx) { ctx.beginPath(); ctx.strokeStyle = this.controller.getViewColor() @@ -112,6 +114,7 @@ export default { ctx.lineTo(this.rectFBody.left, this.rectFBody.top + this.mBodyCorner) ctx.stroke(); }, + //绘制身体中的数值 drawValue(ctx) { this.rectFBodyValue.top = this.rectFBodyValue.bottom - (this.rectFBodyValue.bottom - this.rectFBody.top - this.mBatterySpace) * this.controller.getAnimValue() ctx.beginPath();