Merge pull request #2058 from SergioCrisostomo/add-readonly

Add readonly prop to input-number
This commit is contained in:
Aresn 2017-10-10 20:20:49 -05:00 committed by GitHub
commit 9271ce9d42

View file

@ -25,6 +25,7 @@
@blur="blur"
@keydown.stop="keyDown"
@change="change"
:readonly="readonly"
:name="name"
:value="precisionValue">
</div>
@ -97,6 +98,10 @@
type: Boolean,
default: false
},
readonly: {
type: Boolean,
default: false
},
name: {
type: String
},
@ -183,7 +188,7 @@
this.changeStep('down', e);
},
changeStep (type, e) {
if (this.disabled) {
if (this.disabled || this.readonly) {
return false;
}