From 8a34f768517fceb03a5d4168b5f4034089ce9ad7 Mon Sep 17 00:00:00 2001 From: MartialBE Date: Wed, 15 May 2024 04:19:01 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix:=20fix=20web=20price=20accur?= =?UTF-8?q?acy?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/views/Pricing/component/util.js | 5 ++++- web/src/views/Pricing/single.js | 8 ++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/web/src/views/Pricing/component/util.js b/web/src/views/Pricing/component/util.js index 3ff0f0d8..1db766d7 100644 --- a/web/src/views/Pricing/component/util.js +++ b/web/src/views/Pricing/component/util.js @@ -7,5 +7,8 @@ export function ValueFormatter(value) { if (value == null) { return ''; } - return `$${parseFloat(value * 0.002).toFixed(4)} / ¥${parseFloat(value * 0.014).toFixed(4)}`; + if (value === 0) { + return '免费'; + } + return `$${parseFloat(value * 0.002).toFixed(6)} / ¥${parseFloat(value * 0.014).toFixed(6)}`; } diff --git a/web/src/views/Pricing/single.js b/web/src/views/Pricing/single.js index 7263c64e..f6dd90b2 100644 --- a/web/src/views/Pricing/single.js +++ b/web/src/views/Pricing/single.js @@ -192,8 +192,8 @@ const Single = ({ ownedby, prices, reloadData }) => { field: 'type', sortable: true, headerName: '类型', - flex: 1, - minWidth: 220, + flex: 0.5, + minWidth: 100, type: 'singleSelect', valueOptions: priceType, editable: true, @@ -203,8 +203,8 @@ const Single = ({ ownedby, prices, reloadData }) => { field: 'channel_type', sortable: true, headerName: '供应商', - flex: 1, - minWidth: 220, + flex: 0.5, + minWidth: 100, type: 'singleSelect', valueOptions: ownedby, editable: true,