From 0aa1c9ee02814ec278bc784b2ac31747ca99eb1a Mon Sep 17 00:00:00 2001 From: "1181364@qq.com" Date: Mon, 29 May 2023 18:33:28 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9C=B0=E5=9B=BE=E6=89=93=E7=82=B9=EF=BC=8C?= =?UTF-8?q?=E9=BC=A0=E6=A0=87=E7=A7=BB=E5=85=A5=E6=A0=87=E7=82=B9=E4=B8=8A?= =?UTF-8?q?=E5=B1=95=E7=A4=BA=E5=86=85=E5=AE=B9=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/dashboard/components/HomeMap.vue | 29 ++++++++++++++-------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/src/views/dashboard/components/HomeMap.vue b/src/views/dashboard/components/HomeMap.vue index accd7f6..aba1f92 100644 --- a/src/views/dashboard/components/HomeMap.vue +++ b/src/views/dashboard/components/HomeMap.vue @@ -129,17 +129,24 @@ trigger: 'item', backgroundColor: '#242429cc', formatter: function (params) { - const value = (params.value + '').split('.') - var valueStr = value[0].replace( - /(\d{1,3})(?=(?:\d{3})+(?!\d))/g, - '$1,' - ) - return ( - params.name + - '
仓库数量: ' + - valueStr + - '个' - ) + if (params.componentType == "series") { + const value = (params.value + '').split('.') + var valueStr = value[0].replace( + /(\d{1,3})(?=(?:\d{3})+(?!\d))/g, + '$1,' + ) + return ( + params.name + + '
仓库数量: ' + + valueStr + + '个' + ) + } else { + return ( + params.name + ) + } + } }, dataZoom: {