Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: 修复textarea清楚按钮遮挡问题 #1214

Merged
merged 1 commit into from
Jun 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading