Fixed #537 - The 'disabled' option has no effect on InputNumber

pull/548/head
mertsincan 2020-10-09 12:04:44 +03:00
parent 583aaa1b6d
commit b83486be97
1 changed files with 28 additions and 12 deletions

View File

@ -304,18 +304,26 @@ export default {
this.handleOnInput(event, currentValue, newValue);
},
onUpButtonMouseDown(event) {
if (!this.$attrs.disabled) {
this.$refs.input.$el.focus();
this.repeat(event, null, 1);
event.preventDefault();
}
},
onUpButtonMouseUp() {
if (!this.$attrs.disabled) {
this.clearTimer();
}
},
onUpButtonMouseLeave() {
if (!this.$attrs.disabled) {
this.clearTimer();
}
},
onUpButtonKeyUp() {
if (!this.$attrs.disabled) {
this.clearTimer();
}
},
onUpButtonKeyDown(event) {
if (event.keyCode === 32 || event.keyCode === 13) {
@ -323,18 +331,26 @@ export default {
}
},
onDownButtonMouseDown(event) {
if (!this.$attrs.disabled) {
this.$refs.input.$el.focus();
this.repeat(event, null, -1);
event.preventDefault();
}
},
onDownButtonMouseUp() {
if (!this.$attrs.disabled) {
this.clearTimer();
}
},
onDownButtonMouseLeave() {
if (!this.$attrs.disabled) {
this.clearTimer();
}
},
onDownButtonKeyUp() {
if (!this.$attrs.disabled) {
this.clearTimer();
}
},
onDownButtonKeyDown(event) {
if (event.keyCode === 32 || event.keyCode === 13) {