mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-04-06 03:58:05 +08:00
[bugfix] Stepper: should filter invalid input (#1599)
This commit is contained in:
parent
71962b2fb1
commit
02ac38fa60
@ -77,6 +77,7 @@ VantComponent({
|
|||||||
|
|
||||||
// limit value range
|
// limit value range
|
||||||
range(value) {
|
range(value) {
|
||||||
|
value = String(value).replace(/[^0-9.-]/g, '');
|
||||||
return Math.max(Math.min(this.data.max, value), this.data.min);
|
return Math.max(Math.min(this.data.max, value), this.data.min);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user