From 606779f2b7e4cbbf4b2b17718c50b531c72ce376 Mon Sep 17 00:00:00 2001 From: 24kycj <1637269896@qq.com> Date: Sun, 21 Sep 2025 08:30:16 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E8=83=BD=E9=87=8F=E6=9D=A1?= =?UTF-8?q?=E6=95=B0=E5=80=BC=E5=A4=84=E7=90=86=E5=B9=B6=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E8=B0=83=E8=AF=95=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 添加parseNumericValue方法处理科学计数法、带符号和逗号格式的数值 - 优化EnergyBar组件的数值计算,支持各种数值格式 - 更新safePercent和getRibbonPercent方法使用新的数值解析 - 添加调试日志用于监控刷新时间和工作状态变化 - 解决合并冲突,保留能量条优化功能 --- src/renderer/components/main.vue | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/renderer/components/main.vue b/src/renderer/components/main.vue index dc6a39c..2bebd0a 100644 --- a/src/renderer/components/main.vue +++ b/src/renderer/components/main.vue @@ -1143,6 +1143,7 @@ export default { this.doingWorkStatus = false }, 10000) this.timer2 = setInterval(this.getPrintData, this.refreshTime2) + console.log(this.refreshTime1,this.refreshTime2) }, beforeDestroy() { this.stopTimer() @@ -1153,7 +1154,6 @@ export default { return row.AssUuid ? 'ass-row' : '' }, safePercent(value, total) { - console.log(value, total) // 处理科学计数法、带符号和逗号的数值 const v = this.parseNumericValue(value) const t = this.parseNumericValue(total) @@ -1816,7 +1816,6 @@ export default { return isFinite(num) ? num : 0 }, getRibbonPercent(current, total) { - console.log('current, total', current, total) // 处理科学计数法、带符号和逗号的数值 const c = this.parseNumericValue(current) const t = this.parseNumericValue(total) @@ -1988,11 +1987,13 @@ export default { }, watch: { hasDoingWork: { - handler() { + handler(val) { + console.log('hasDoingWork changed:', val) if (this.hasDoingWork) { this.intervalTime = parseInt(this.refreshTime1) clearInterval(this.timer1) this.timer1 = setInterval(this.initData, this.intervalTime) + console.log('hasDoingWork', this.intervalTime) } else { this.intervalTime = parseInt(this.refreshTime2) clearInterval(this.timer1)