if set min and max, checked must use props 'activeChange',
This commit is contained in:
mo.duan 2019-09-06 18:07:38 +08:00
parent d56bc97007
commit 9a125fdbca
2 changed files with 3 additions and 3 deletions

View file

@ -73,7 +73,7 @@
:parser="value => value.replace('%', '')"></InputNumber>
</div>
<div style="margin-top: 10px">
<InputNumber :min="18" v-model="value4" style="width: 200px" :precision='2' ></InputNumber>
<InputNumber :min="100" :max="3000" v-model="value4" style="width: 200px" :active-change="false"></InputNumber>
</div>
</div>
</template>

View file

@ -220,7 +220,6 @@
if (this.disabled || this.readonly) {
return false;
}
const targetVal = Number(e.target.value);
let val = Number(this.currentValue);
const step = Number(this.step);
@ -257,7 +256,8 @@
if (val && !isNaN(this.precision)) val = Number(Number(val).toFixed(this.precision));
const {min, max} = this;
if (val!==null) {
// #6245
if ( val!==null && !this.activeChange ) {
if (val > max) {
val = max;
} else if (val < min) {