Skip to content

Commit

Permalink
fix: 修复textarea清楚按钮遮挡问题 (#1214)
Browse files Browse the repository at this point in the history
  • Loading branch information
rayhomie authored Jun 21, 2024
1 parent 2885679 commit 297f532
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 3 deletions.
2 changes: 1 addition & 1 deletion compiled/alipay/src/Input/Textarea/index.axml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<textarea
enableNative="{{ enableNative }}"
name="{{ name }}"
class="ant-textarea-content"
class="ant-textarea-content {{ allowClear ? 'ant-textarea-content-clear' : '' }}"
disabled="{{ disabled }}"
value="{{ state.value || '' }}"
placeholder="{{ placeholder }}"
Expand Down
3 changes: 3 additions & 0 deletions compiled/alipay/src/Input/Textarea/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
text-align: left;
color: @input-item-color;
background: @COLOR_CARD;
&-clear {
padding-right: 34 * @rpx;
}
}

&-clear {
Expand Down
2 changes: 1 addition & 1 deletion compiled/wechat/src/Input/Textarea/index.wxml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<textarea
enableNative="{{ enableNative }}"
name="{{ name }}"
class="ant-textarea-content"
class="ant-textarea-content {{ allowClear ? 'ant-textarea-content-clear' : '' }}"
disabled="{{ disabled }}"
value="{{ state.value || '' }}"
placeholder="{{ placeholder }}"
Expand Down
3 changes: 3 additions & 0 deletions compiled/wechat/src/Input/Textarea/index.wxss
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
color: #333333;
background: #ffffff;
}
.ant-textarea-content-clear {
padding-right: 17px;
}
.ant-textarea-clear {
position: absolute;
top: 0;
Expand Down
4 changes: 3 additions & 1 deletion src/Input/Textarea/index.axml.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ export default (
<Textarea
enableNative={enableNative}
name={name}
class="ant-textarea-content"
class={`ant-textarea-content ${
allowClear ? 'ant-textarea-content-clear' : ''
}`}
disabled={disabled}
value={state.value || ''}
placeholder={placeholder}
Expand Down
3 changes: 3 additions & 0 deletions src/Input/Textarea/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
text-align: left;
color: @input-item-color;
background: @COLOR_CARD;
&-clear {
padding-right: 34 * @rpx;
}
}

&-clear {
Expand Down

0 comments on commit 297f532

Please sign in to comment.