From 0a1cc7b8971689413997ca9a851c2b67e88cdae9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tu=C4=9F=C3=A7e=20K=C3=BC=C3=A7=C3=BCko=C4=9Flu?= Date: Thu, 21 Apr 2022 10:54:13 +0300 Subject: [PATCH] Fixed #2469 - InputNumber new readonly attribute --- api-generator/components/inputnumber.js | 6 ++++++ src/components/inputnumber/InputNumber.d.ts | 4 ++++ src/components/inputnumber/InputNumber.vue | 22 +++++++++++++++++++-- src/views/inputnumber/InputNumberDoc.vue | 6 ++++++ 4 files changed, 36 insertions(+), 2 deletions(-) diff --git a/api-generator/components/inputnumber.js b/api-generator/components/inputnumber.js index a26c001661..6cfaf9a735 100644 --- a/api-generator/components/inputnumber.js +++ b/api-generator/components/inputnumber.js @@ -131,6 +131,12 @@ const InputNumberProps = [ default: "true", description: "Determines whether the input field is empty." }, + { + name: "readonly", + type: "boolean", + default: "false", + description: "When present, it specifies that an input field is read-only." + }, { name: "inputStyle", type: "any", diff --git a/src/components/inputnumber/InputNumber.d.ts b/src/components/inputnumber/InputNumber.d.ts index a5aa33d31a..4e6d3f0dae 100755 --- a/src/components/inputnumber/InputNumber.d.ts +++ b/src/components/inputnumber/InputNumber.d.ts @@ -133,6 +133,10 @@ export interface InputNumberProps { * Default value is true. */ allowEmpty?: boolean | undefined; + /** + * When present, it specifies that an input field is read-only. + */ + readonly?: boolean | undefined; /** * Inline style of the input field. */ diff --git a/src/components/inputnumber/InputNumber.vue b/src/components/inputnumber/InputNumber.vue index 03774246ad..2732188b1c 100755 --- a/src/components/inputnumber/InputNumber.vue +++ b/src/components/inputnumber/InputNumber.vue @@ -1,6 +1,6 @@