From 04efaa71fe6ba395affb335eb983b66fb148bb07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=94=B0=E6=94=80?= <13871284459@163.com> Date: Thu, 30 Jun 2022 07:53:48 +0000 Subject: [PATCH] =?UTF-8?q?=E7=BB=99Battery.js=E5=8A=A0=E5=85=A5=E6=B3=A8?= =?UTF-8?q?=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../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..e6ab11e 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