From 5b82c8c6080fe8d9d1417067fbd933ed4f67957a Mon Sep 17 00:00:00 2001 From: Eiinu Date: Thu, 20 Jun 2024 18:27:59 +0800 Subject: [PATCH] =?UTF-8?q?fix(input,=20textarea):=20=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E5=8F=AA=E8=AF=BB=E7=A6=81=E7=94=A8=E5=B1=9E=E6=80=A7=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E9=80=BB=E8=BE=91=20(#3104)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/packages/__VUE/input/input.taro.vue | 4 ++-- src/packages/__VUE/inputnumber/input-number.taro.vue | 4 ++-- src/packages/__VUE/searchbar/index.taro.vue | 4 ++-- src/packages/__VUE/textarea/textarea.taro.vue | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/packages/__VUE/input/input.taro.vue b/src/packages/__VUE/input/input.taro.vue index 9dde73e88a..625ba98c7b 100644 --- a/src/packages/__VUE/input/input.taro.vue +++ b/src/packages/__VUE/input/input.taro.vue @@ -14,8 +14,8 @@ :style="styles" :maxlength="maxLength ? maxLength : undefined" :placeholder="placeholder" - :disabled="disabled" - :readonly="readonly" + :disabled="disabled ? disabled : undefined" + :readonly="readonly ? readonly : undefined" :value="modelValue" :format-trigger="formatTrigger" :autofocus="autofocus ? true : undefined" diff --git a/src/packages/__VUE/inputnumber/input-number.taro.vue b/src/packages/__VUE/inputnumber/input-number.taro.vue index b684f84b45..7594ccaeae 100644 --- a/src/packages/__VUE/inputnumber/input-number.taro.vue +++ b/src/packages/__VUE/inputnumber/input-number.taro.vue @@ -20,8 +20,8 @@ :min="min" :max="max" :style="{ width: pxCheck(inputWidth), height: pxCheck(buttonSize) }" - :disabled="disabled" - :readonly="readonly" + :disabled="disabled ? disabled : undefined" + :readonly="readonly ? readonly : undefined" :value="modelValue" @input="change" @blur="blur" diff --git a/src/packages/__VUE/searchbar/index.taro.vue b/src/packages/__VUE/searchbar/index.taro.vue index 9ea8d18418..b64e47f373 100644 --- a/src/packages/__VUE/searchbar/index.taro.vue +++ b/src/packages/__VUE/searchbar/index.taro.vue @@ -17,8 +17,8 @@ :placeholder="placeholder || translate('placeholder')" :value="modelValue" :confirm-type="confirmType" - :disabled="disabled" - :readonly="readonly" + :disabled="disabled ? disabled : undefined" + :readonly="readonly ? readonly : undefined" :style="styleSearchbar" :cursor-spacing="cursorSpacing" @click="clickInput" diff --git a/src/packages/__VUE/textarea/textarea.taro.vue b/src/packages/__VUE/textarea/textarea.taro.vue index 8696456cbd..65900f4c9f 100644 --- a/src/packages/__VUE/textarea/textarea.taro.vue +++ b/src/packages/__VUE/textarea/textarea.taro.vue @@ -6,7 +6,7 @@ :class="['nut-textarea__textarea', env == 'ALIPAY' && 'nut-textarea__ali']" :style="styles" :rows="rows" - :disabled="disabled || readonly" + :disabled="(disabled || readonly) ? (disabled || readonly) : undefined" :value="modelValue" :show-count="false" :maxlength="maxLength ? maxLength : -1"