Skip to content

Commit

Permalink
fix(input-number): 修复 iOS 下输入小数点后清空输入框的问题 (#2704)
Browse files Browse the repository at this point in the history
close #2664
  • Loading branch information
Formulaaa authored Dec 15, 2023
1 parent 160de20 commit 6c6f383
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/packages/__VUE/inputnumber/index.taro.vue
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export default create({
};
const change = (event: Event) => {
const input = event.target as HTMLInputElement;
emit('update:modelValue', Number(input.value), event);
emit('update:modelValue', input.value, event);
};
const emitChange = (value: string | number, event: Event) => {
let output_value: number | string = fixedDecimalPlaces(value);
Expand Down
4 changes: 3 additions & 1 deletion src/packages/__VUE/inputnumber/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@ export default create({
};
const change = (event: Event) => {
const input = event.target as HTMLInputElement;
emit('update:modelValue', input.valueAsNumber, event);
emit('update:modelValue', input.value, event);
};
const emitChange = (value: string | number, event: Event) => {
let output_value: number | string = fixedDecimalPlaces(value);
Expand Down Expand Up @@ -154,6 +155,7 @@ export default create({
}
return value;
};
watch(
() => [props.max, props.min],
() => {
Expand Down

0 comments on commit 6c6f383

Please sign in to comment.