Skip to content

Commit

Permalink
fix(input, textarea): 修改只读禁用属性设置逻辑 (jd-opensource#3104)
Browse files Browse the repository at this point in the history
  • Loading branch information
eiinu authored Jun 20, 2024
1 parent 487cf1f commit 5b82c8c
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/packages/__VUE/input/input.taro.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions src/packages/__VUE/inputnumber/input-number.taro.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions src/packages/__VUE/searchbar/index.taro.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion src/packages/__VUE/textarea/textarea.taro.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 5b82c8c

Please sign in to comment.