From ba8de0f96587d6b045748cb0d18aa906c05b1dac Mon Sep 17 00:00:00 2001 From: caill <815519168@qq.com> Date: Mon, 8 Jan 2024 16:18:21 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/modules/home/left/left.vue | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/pages/modules/home/left/left.vue b/src/pages/modules/home/left/left.vue index 814795e..b097c1e 100644 --- a/src/pages/modules/home/left/left.vue +++ b/src/pages/modules/home/left/left.vue @@ -645,8 +645,9 @@ export default { seriesData.push({name: e.materialCode, value: e.qty}) seriesName.push({name: e.materialCode}) }) - let total = this.inventory.reduce((a, b) => { - return a + Number(b.value) + let total = 0 + this.inventory.map(e => { + total = total + e.qty }, 0) let option = { color: colors, @@ -666,7 +667,7 @@ export default { subtext: total, textAlign: 'center', textStyle: { - fontSize: 16, + fontSize: 14, lineHeight: 20, color: '#A8C3E6', fontFamily: 'SourceHanSansCN-Regular'