From fe7d03d95ef3c5b33d17c2addfc8261a22e26f59 Mon Sep 17 00:00:00 2001 From: tianpan <13871284459@163.com> Date: Mon, 4 Jul 2022 13:54:53 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9Battery=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: tianpan <13871284459@163.com> --- .../main/js/default/common/component/LVBattery/LVBattery.js | 3 +++ 1 file changed, 3 insertions(+) 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 61a4eb7..56880ae 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(); -- Gitee