Skip to content

Commit fc7c7fa

Browse files
committed
fix: 超最大最小值设置
1 parent 51451b7 commit fc7c7fa

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/packages/inputnumber/inputnumber.taro.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ export const InputNumber: FunctionComponent<
140140
negative ? onMinus?.(e) : onPlus?.(e)
141141

142142
const shouldOverBoundary = calcNextValue(
143-
shadowValue,
143+
bound(Number(shadowValue), Number(min), Number(max)),
144144
step,
145145
negative ? -1 : 1
146146
)

src/packages/inputnumber/inputnumber.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ export const InputNumber: FunctionComponent<
137137
negative ? onMinus?.(e) : onPlus?.(e)
138138

139139
const shouldOverBoundary = calcNextValue(
140-
shadowValue,
140+
bound(Number(shadowValue), Number(min), Number(max)),
141141
step,
142142
negative ? -1 : 1
143143
)

0 commit comments

Comments
 (0)