mirror of
https://github.com/ant-design/ant-design.git
synced 2025-01-18 22:36:31 +08:00
make sure count compare as number
This commit is contained in:
parent
da6662562b
commit
bd0eb34487
@ -64,7 +64,7 @@ class ScrollNumber extends Component<ScrollNumberProps, ScrollNumberState> {
|
||||
const currentDigit = getNumberArray(this.state.count)[i];
|
||||
const lastDigit = getNumberArray(this.lastCount)[i];
|
||||
// 同方向则在同一侧切换数字
|
||||
if (this.state.count! > this.lastCount!) {
|
||||
if (Number(this.state.count) > Number(this.lastCount)) {
|
||||
if (currentDigit >= lastDigit) {
|
||||
return 10 + num;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user