diff --git a/src/packages/__VUE/inputnumber/index.taro.vue b/src/packages/__VUE/inputnumber/index.taro.vue index bb60d98753..c1b7925cd2 100644 --- a/src/packages/__VUE/inputnumber/index.taro.vue +++ b/src/packages/__VUE/inputnumber/index.taro.vue @@ -111,6 +111,7 @@ export default create({ return value > Number(props.min) && !props.disabled; }; const reduce = (event: Event) => { + if (props.disabled) return; emit('reduce', event); let output_value = Number(props.modelValue) - Number(props.step); if (reduceAllow() && output_value >= Number(props.min)) { @@ -121,6 +122,7 @@ export default create({ } }; const add = (event: Event) => { + if (props.disabled) return; emit('add', event); let output_value = Number(props.modelValue) + Number(props.step); if (addAllow() && output_value <= Number(props.max)) { diff --git a/src/packages/__VUE/inputnumber/index.vue b/src/packages/__VUE/inputnumber/index.vue index f19088854c..bab765659d 100644 --- a/src/packages/__VUE/inputnumber/index.vue +++ b/src/packages/__VUE/inputnumber/index.vue @@ -92,7 +92,6 @@ export default create({ }; const change = (event: Event) => { const input = event.target as HTMLInputElement; - emit('update:modelValue', input.value, event); }; const emitChange = (value: string | number, event: Event) => { @@ -155,7 +154,6 @@ export default create({ } return value; }; - watch( () => [props.max, props.min], () => {