Commit d3abd04f authored by GuanHua's avatar GuanHua

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

parent cf16d47b
......@@ -85,6 +85,8 @@ const RecommendCommodity: React.FC<RecommendCommodityProps> = (props: RecommendC
console.log(val, Number(val))
if (Number(val) < 0) {
newProps[key] = 1
} else if (val.indexOf('.')) {
newProps[key] = val.split('.')[0]
}
}
......@@ -193,7 +195,7 @@ const RecommendCommodity: React.FC<RecommendCommodityProps> = (props: RecommendC
(manageWay === 1 || manageWay === 2) && (
<div className={styles['RecommendCommodity-box']}>
<div className={styles['RecommendCommodity-box-label']}>展示数量</div>
<InputNumber style={{ width: '100%' }} key={`${selectedKey}-num`} min={1} defaultValue={num} onBlur={(e) => _onChangeByKey(e.target.value, 'num')} />
<InputNumber precision={0} style={{ width: '100%' }} key={`${selectedKey}-num`} min={1} defaultValue={num} onBlur={(e) => _onChangeByKey(e.target.value, 'num')} />
</div>
)
}
......
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