Commit c814a9bd authored by GuanHua's avatar GuanHua

fix: 店铺装修显示商品数量小数点输入

parent d3abd04f
......@@ -82,11 +82,10 @@ const RecommendCommodity: React.FC<RecommendCommodityProps> = (props: RecommendC
}
if (key === 'num') {
console.log(val, Number(val))
if (Number(val) < 0) {
newProps[key] = 1
} else if (val.indexOf('.')) {
newProps[key] = val.split('.')[0]
newProps[key] = Math.round(Number(val))
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment