From d0c8d945ff1fc3e222a0904837e5876c374fa1df Mon Sep 17 00:00:00 2001 From: xuan Date: Wed, 4 Jan 2023 10:06:47 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9E=20fix(=E8=B4=AD=E7=89=A9=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2):=20=E4=BF=AE=E5=A4=8D=E8=B4=AD=E7=89=A9=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E6=97=A0=E6=B3=95=E9=80=89=E4=B8=AD=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/counter/index.tsx | 2 +- src/pages/shopping/components/shoppingCartItem/index.tsx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/counter/index.tsx b/src/components/counter/index.tsx index e28250b..d4cf18f 100644 --- a/src/components/counter/index.tsx +++ b/src/components/counter/index.tsx @@ -69,7 +69,7 @@ const Counter = ({ minNum = 0, maxNum = 10000, step = 1, digits = 0, defaultNum } num_res = num_res < minNum ? minNum : num_res setValue(num_res) - onClickBtn?.(parseFloat(num_res)) + onClickBtn?.(parseFloat(String(num_res))) } // 检查数据 diff --git a/src/pages/shopping/components/shoppingCartItem/index.tsx b/src/pages/shopping/components/shoppingCartItem/index.tsx index 1fc5274..bb99f58 100644 --- a/src/pages/shopping/components/shoppingCartItem/index.tsx +++ b/src/pages/shopping/components/shoppingCartItem/index.tsx @@ -285,14 +285,14 @@ const ShoppingCartItem: FC = (props) => { } }, [itemData, multipleSelection, colorStore]) // 更新当前客户的多选项 - const updatePurchaserMultipleSelection = (purchaserId, payload, operationType: OperationType, goodsId: number) => { + const updatePurchaserMultipleSelection = (purchaserId: number, payload: Goods, operationType: OperationType, goodsId: number) => { if (operationType === 'add') { dispatch({ type: ShoppingDispatchType.UPDATE_CHANGED_CHECKBOX, data: { purchaserId, multipleSelection: { - ...colorStore?.[purchaserId].multipleSelection, + ...colorStore?.[purchaserId]?.multipleSelection, [goodsId]: payload, }, },