From 68085f74e838358263aaa2c2191d2b0529ce1151 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E4=B8=B9?= <> Date: Wed, 18 Sep 2024 13:08:42 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/index.vue | 176 +++++++++++++++++++++++++++++++++--------------- 1 file changed, 120 insertions(+), 56 deletions(-) diff --git a/pages/index.vue b/pages/index.vue index c0847a8..36db014 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -74,9 +74,7 @@ - - E0000104 @@ -95,7 +93,6 @@ (12) - @@ -113,7 +110,20 @@ + + + + + + + + (12) +
+
+
@@ -161,7 +171,6 @@ - @@ -323,58 +332,7 @@ margin-bottom: 10px; } - // 信号 - .signal { - position: relative; - display: flex; - align-items: flex-end; - height: 17px; - - .bar { - width: 2px; - background-color: #999; - border-radius: 2px; - margin-right: 2px; - } - - .bar:nth-child(1) { - height: 4px; - background-color: #e60012; - } - - .bar:nth-child(2) { - height: 7px; - background-color: #e60012; - } - - .bar:nth-child(3) { - height: 10px; - background-color: #ffa200; - } - - .bar:nth-child(4) { - height: 13px; - background-color: #39ac4f; - } - - .bar:nth-child(5) { - height: 16px; - background-color: #39ac4f; - } - - .bar-no { - position: absolute; - left: -2px; - bottom: 3px; - - .u-icon__icon { - font-weight: bold; - font-size: 18rpx !important; - } - } - } - - + } } @@ -417,4 +375,110 @@ } } + // 信号 + .signal { + position: relative; + display: flex; + align-items: flex-end; + height: 17px; + + .bar { + width: 2px; + background-color: #999; + border-radius: 2px; + margin-right: 2px; + } + + .bar:nth-child(1) { + height: 4px; + } + + .bar:nth-child(2) { + height: 7px; + + } + + .bar:nth-child(3) { + height: 10px; + + } + + .bar:nth-child(4) { + height: 13px; + + } + + .bar:nth-child(5) { + height: 16px; + + } + + .bar.red { + background-color: #e60012; + } + + .bar.orange { + background-color: #ffa200; + } + + .bar.green { + background-color: #39ac4f; + } + + .bar-no { + position: absolute; + left: -2px; + bottom: 3px; + + ::v-deep.u-icon__icon { + font-weight: bold; + font-size: 18rpx !important; + } + } + } + + // 电池 + .battery-container { + position: relative; + width: 30px; + height: 12px; + background-color: #fff; + border-radius: 4px; + } + + .battery-level { + position: absolute; + top: 0; + bottom: 0; + left: 0; + width: 100%; + background-color: #4CAF50; + border-radius: 4px; + transition: width 0.5s; + } + + /* 不同的电量级别 */ + .battery-level-100 { + width: 100%; + } + + .battery-level-80 { + width: 80%; + } + + .battery-level-60 { + width: 60%; + } + + .battery-level-40 { + width: 40%; + } + + .battery-level-20 { + width: 20%; + } + + .battery-level-0 { + width: 0%; + } \ No newline at end of file