加入百分比符号

This commit is contained in:
2026-02-02 10:53:13 +08:00
parent 21fa6ef70f
commit a43690930b
2 changed files with 2 additions and 1 deletions

View File

@@ -263,6 +263,7 @@ Math.round((memoryValue / maxMemory) * 100),
);// 使用micro.js的图表功能创建仪表盘 );// 使用micro.js的图表功能创建仪表盘
mw.chart.createGauge(mw.$("#memory-gauge"), percentage, 100, { mw.chart.createGauge(mw.$("#memory-gauge"), percentage, 100, {
label: "内存使用率", label: "内存使用率",
percent: true,
color: color:
percentage > 80 percentage > 80
? "#e74c3c" ? "#e74c3c"

View File

@@ -59,7 +59,7 @@ const MicroWeb={$:t=>document.querySelector(t),$$:t=>document.querySelectorAll(t
top: ${o/2.5}px; top: ${o/2.5}px;
font-size: ${o/7}px; font-size: ${o/7}px;
font-weight: bold;"> font-weight: bold;">
${e} ${e}${i.percent?"%":""}
<div style="font-size: ${o/10}px; color: #666;"> <div style="font-size: ${o/10}px; color: #666;">
${i.label||""} ${i.label||""}
</div> </div>