From cb48683863cafdf6ec7f0118285344bec22e33d0 Mon Sep 17 00:00:00 2001 From: Sergio Crisostomo Date: Tue, 10 Oct 2017 10:04:37 +0200 Subject: [PATCH] Add readonly prop to input-number --- src/components/input-number/input-number.vue | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/components/input-number/input-number.vue b/src/components/input-number/input-number.vue index dd713b0d..d11634d7 100644 --- a/src/components/input-number/input-number.vue +++ b/src/components/input-number/input-number.vue @@ -25,6 +25,7 @@ @blur="blur" @keydown.stop="keyDown" @change="change" + :readonly="readonly" :name="name" :value="precisionValue"> @@ -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; }