From 782b7f6dffa77aebf00e657969094f347989339c Mon Sep 17 00:00:00 2001 From: wangguoqing Date: Wed, 19 Oct 2022 18:47:27 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=9E=E7=8E=B0=E7=BB=84=E4=BB=B6=E9=9A=8F?= =?UTF-8?q?=E5=AE=B9=E5=99=A8=E8=87=AA=E9=80=82=E5=BA=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/battery/battery-styles.ts | 15 ++++++++------- src/components/battery/battery.ts | 12 +++++------- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/src/components/battery/battery-styles.ts b/src/components/battery/battery-styles.ts index b94a4aa..77bea0f 100644 --- a/src/components/battery/battery-styles.ts +++ b/src/components/battery/battery-styles.ts @@ -1,12 +1,13 @@ import {css, CSSResult} from 'lit' export const sharedStyles: CSSResult = css` - .holder { - position: relative; - width: var(--battery-width, 100%); - height: 0; - padding: 0; - padding-bottom: 35.4%; - } + // .holder { + // position: relative; + // width: var(--battery-width, 100%); + // height: 0; + // padding: 0; + // padding-bottom: 35.4%; + // } + .container { display: flex; position: absolute; diff --git a/src/components/battery/battery.ts b/src/components/battery/battery.ts index 99fe8c5..2ae1da0 100644 --- a/src/components/battery/battery.ts +++ b/src/components/battery/battery.ts @@ -92,13 +92,11 @@ export class StarBattery extends LitElement { render() { return html` -
-
-
- ${Math.round(this.percent)} - % - -
+
+
+ ${Math.round(this.percent)} + % +
` }