From 45083090e938b5700e8ae14666789cd3cf954b37 Mon Sep 17 00:00:00 2001 From: yeyang <746659424@qq.com> Date: Sat, 27 May 2023 20:37:27 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A5=20delete?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/common/common.js | 8 ++++---- model/State.js | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/common/common.js b/lib/common/common.js index 804ce40..f7405e0 100644 --- a/lib/common/common.js +++ b/lib/common/common.js @@ -95,10 +95,10 @@ export default new class newCommon { if (typeof format === 'string') { format = format - .replaceAll('dd', day) - .replaceAll('hh', timeObj.hour) - .replaceAll('mm', timeObj.minute) - .replaceAll('ss', timeObj.second) + .replace(/dd/g, day) + .replace(/hh/g, timeObj.hour) + .replace(/mm/g, timeObj.minute) + .replace(/ss/g, timeObj.second) return format } diff --git a/model/State.js b/model/State.js index 4ee2f8d..2fd57ea 100644 --- a/model/State.js +++ b/model/State.js @@ -303,8 +303,8 @@ export default new class { vendor, temperatureGpu, utilizationGpu, memoryTotal, memoryUsed, powerDraw } = graphics - temperatureGpu &&= temperatureGpu + '℃' - powerDraw &&= powerDraw + 'W' + temperatureGpu && (temperatureGpu = temperatureGpu + '℃') + powerDraw && (powerDraw = powerDraw + 'W') return { ...this.Circle(utilizationGpu / 100), inner: Math.round(utilizationGpu) + '%',