Skip to content

Commit

Permalink
fix(input-number): 修复输入时未触发 change 事件问题 (#2903)
Browse files Browse the repository at this point in the history
close #2880
  • Loading branch information
yi-boide committed Jan 31, 2024
1 parent 1789bb3 commit 3519d58
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/packages/__VUE/inputnumber/index.taro.vue
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ export default create({
const change = (event: Event) => {
const input = event.target as HTMLInputElement;
emit('update:modelValue', input.value, event);
emit('change', input.value, event);
};
const emitChange = (value: string | number, event: Event) => {
let output_value: number | string = fixedDecimalPlaces(value);
Expand Down
1 change: 1 addition & 0 deletions src/packages/__VUE/inputnumber/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ export default create({
const change = (event: Event) => {
const input = event.target as HTMLInputElement;
emit('update:modelValue', input.value, event);
emit('change', input.value, event);
};
const emitChange = (value: string | number, event: Event) => {
let output_value: number | string = fixedDecimalPlaces(value);
Expand Down

0 comments on commit 3519d58

Please sign in to comment.