mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
fix(DatetimePicker): can't change when filter when empty array (#4973)
This commit is contained in:
parent
aa0dfe8808
commit
e5bcf2409a
@ -11,16 +11,16 @@ export function times(n: number, iteratee: (index: number) => any[]) {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getTrueValue(value: string | undefined): number | undefined {
|
export function getTrueValue(value: string | undefined): number {
|
||||||
if (!value) {
|
if (!value) {
|
||||||
return;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
while (isNaN(parseInt(value, 10))) {
|
while (isNaN(parseInt(value, 10))) {
|
||||||
if (value.length > 1) {
|
if (value.length > 1) {
|
||||||
value = value.slice(1);
|
value = value.slice(1);
|
||||||
} else {
|
} else {
|
||||||
return;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user