From f182ded513187449be873ffe05ded92330a07989 Mon Sep 17 00:00:00 2001 From: Lei OT Date: Tue, 10 Sep 2024 13:57:36 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BA=A7=E5=93=81=E7=AE=A1=E7=90=86:=20?= =?UTF-8?q?=E7=BC=96=E8=BE=91:=20=E6=8E=A8=E8=8D=90=E6=8C=87=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/products/Detail/ProductInfoForm.jsx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/views/products/Detail/ProductInfoForm.jsx b/src/views/products/Detail/ProductInfoForm.jsx index 16259c2..7c55328 100644 --- a/src/views/products/Detail/ProductInfoForm.jsx +++ b/src/views/products/Detail/ProductInfoForm.jsx @@ -256,11 +256,11 @@ function getFields(props) { style={{ width: '100%' }} labelInValue={false} options={[ - { value: '1', label: 'Top 1' }, - { value: '2', label: 'Top 2' }, - { value: '3', label: 'Top 3' }, - { value: '4', label: '4' }, - { value: '5', label: '5' }, + { value: 1, label: 'Top 1' }, + { value: 2, label: 'Top 2' }, + { value: 3, label: 'Top 3' }, + { value: 4, label: '4' }, + { value: 5, label: '5' }, ]} /> , @@ -376,7 +376,7 @@ const formValuesMapper = (values) => { ], 'dept': { key: 'dept_id', transform: (value) => (typeof value === 'string' ? value : value?.value || value?.key || '') }, 'open_weekdays': { key: 'open_weekdays', transform: (value) => (Array.isArray(value) ? value.join(',') : value) }, - 'recommends_rate': { key: 'recommends_rate', transform: (value) => (typeof value === 'string' ? value : value?.value || value?.key || '') }, + 'recommends_rate': { key: 'recommends_rate', transform: (value) => ((typeof value === 'string' || typeof value === 'number') ? value : value?.value || value?.key || '') }, // 'lgc_details': [ // { // key: 'lgc_details',