diff --git a/examples/docs/en-US/input-number.md b/examples/docs/en-US/input-number.md index 6e70818232..f3a5b3cda8 100644 --- a/examples/docs/en-US/input-number.md +++ b/examples/docs/en-US/input-number.md @@ -121,7 +121,7 @@ Allows you to define incremental steps. ::: :::tip -The value of `precision` must be a positive integer and should not be less than the decimal places of `step`. +The value of `precision` must be a non negative integer and should not be less than the decimal places of `step`. ::: ### Size diff --git a/examples/docs/es/input-number.md b/examples/docs/es/input-number.md index 70619d4ee7..90d58b35ca 100644 --- a/examples/docs/es/input-number.md +++ b/examples/docs/es/input-number.md @@ -121,7 +121,7 @@ Le permite definir el nivel de incremento de los saltos. ::: :::tip -The value of `precision` must be a positive integer and should not be less than the decimal places of `step`. +The value of `precision` must be a non negative integer and should not be less than the decimal places of `step`. ::: ### Tamaño diff --git a/examples/docs/zh-CN/input-number.md b/examples/docs/zh-CN/input-number.md index 10c9ef1d3f..26566440a4 100644 --- a/examples/docs/zh-CN/input-number.md +++ b/examples/docs/zh-CN/input-number.md @@ -120,7 +120,7 @@ ::: :::tip -`precision` 的值必须是一个正整数,并且不能小于 `step` 的小数位数。 +`precision` 的值必须是一个非负整数,并且不能小于 `step` 的小数位数。 ::: ### 尺寸 diff --git a/packages/form/src/form-item.vue b/packages/form/src/form-item.vue index f5fa7f5a4a..23f9ee77d1 100644 --- a/packages/form/src/form-item.vue +++ b/packages/form/src/form-item.vue @@ -120,19 +120,16 @@ } return parent; }, - fieldValue: { - cache: false, - get() { - const model = this.form.model; - if (!model || !this.prop) { return; } + fieldValue() { + const model = this.form.model; + if (!model || !this.prop) { return; } - let path = this.prop; - if (path.indexOf(':') !== -1) { - path = path.replace(/:/, '.'); - } - - return getPropByPath(model, path, true).v; + let path = this.prop; + if (path.indexOf(':') !== -1) { + path = path.replace(/:/, '.'); } + + return getPropByPath(model, path, true).v; }, isRequired() { let rules = this.getRules(); diff --git a/packages/input/src/input.vue b/packages/input/src/input.vue index 948c59e6b9..9a52954a3c 100644 --- a/packages/input/src/input.vue +++ b/packages/input/src/input.vue @@ -203,7 +203,7 @@ }, watch: { - 'value'(val, oldValue) { + value(val, oldValue) { this.setCurrentValue(val); } }, @@ -283,10 +283,8 @@ if (this.isOnComposition && value === this.valueBeforeComposition) return; this.currentValue = value; if (this.isOnComposition) return; - this.$nextTick(_ => { - this.resizeTextarea(); - }); - if (this.validateEvent) { + this.$nextTick(this.resizeTextarea); + if (this.validateEvent && this.currentValue === this.value) { this.dispatch('ElFormItem', 'el.form.change', [value]); } },