Commit 9e738a85 authored by hetech's avatar hetech Committed by GitHub

Input: not trigger form validation when input (#12260)

* Input: not trigger validation when input

* InputNumber: update docs
parent b1be1f4c
...@@ -121,7 +121,7 @@ Allows you to define incremental steps. ...@@ -121,7 +121,7 @@ Allows you to define incremental steps.
::: :::
:::tip :::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 ### Size
......
...@@ -121,7 +121,7 @@ Le permite definir el nivel de incremento de los saltos. ...@@ -121,7 +121,7 @@ Le permite definir el nivel de incremento de los saltos.
::: :::
:::tip :::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 ### Tamaño
......
...@@ -120,7 +120,7 @@ ...@@ -120,7 +120,7 @@
::: :::
:::tip :::tip
`precision` 的值必须是一个整数,并且不能小于 `step` 的小数位数。 `precision` 的值必须是一个非负整数,并且不能小于 `step` 的小数位数。
::: :::
### 尺寸 ### 尺寸
......
...@@ -120,19 +120,16 @@ ...@@ -120,19 +120,16 @@
} }
return parent; return parent;
}, },
fieldValue: { fieldValue() {
cache: false, const model = this.form.model;
get() { if (!model || !this.prop) { return; }
const model = this.form.model;
if (!model || !this.prop) { return; }
let path = this.prop; let path = this.prop;
if (path.indexOf(':') !== -1) { if (path.indexOf(':') !== -1) {
path = path.replace(/:/, '.'); path = path.replace(/:/, '.');
}
return getPropByPath(model, path, true).v;
} }
return getPropByPath(model, path, true).v;
}, },
isRequired() { isRequired() {
let rules = this.getRules(); let rules = this.getRules();
......
...@@ -203,7 +203,7 @@ ...@@ -203,7 +203,7 @@
}, },
watch: { watch: {
'value'(val, oldValue) { value(val, oldValue) {
this.setCurrentValue(val); this.setCurrentValue(val);
} }
}, },
...@@ -283,10 +283,8 @@ ...@@ -283,10 +283,8 @@
if (this.isOnComposition && value === this.valueBeforeComposition) return; if (this.isOnComposition && value === this.valueBeforeComposition) return;
this.currentValue = value; this.currentValue = value;
if (this.isOnComposition) return; if (this.isOnComposition) return;
this.$nextTick(_ => { this.$nextTick(this.resizeTextarea);
this.resizeTextarea(); if (this.validateEvent && this.currentValue === this.value) {
});
if (this.validateEvent) {
this.dispatch('ElFormItem', 'el.form.change', [value]); this.dispatch('ElFormItem', 'el.form.change', [value]);
} }
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment