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, }, },