feat(textarea): support clearable styles#2583
Open
AriaLEntropy wants to merge 2 commits into
Open
Conversation
This was referenced Jul 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤔 这个 PR 的性质是?
🔗 相关 Issue
#2566
关联框架实现 PR:
💡 需求背景和解决方案
1、Textarea 当前缺少与 Input 一致的可清空能力。用户在输入多行文本后,需要通过手动选择或删除内容完成清空,操作成本较高。
2、本 PR 在 common 侧补充 Textarea clearable 的公共样式和文档示例入口,为 Vue / React 等框架实现提供统一视觉基础。
实现内容:
.t-textarea--clearable、.t-textarea__clear、.t-textarea__clear--visible样式clearable示例入口,由各框架仓库提供对应 demo 实现样式方案对齐现有 Input clearable 的视觉语言。由于 Textarea 不具备 Input 的 suffix 区域,无法直接复用 Input suffix 布局,因此在 Textarea 中补充 clearable modifier,用于处理清除图标定位与文本避让。
效果展示:
📝 更新日志
feat(Textarea): 支持 clearable 可清空样式
本条 PR 不需要纳入 Changelog
☑️ 请求合并前的自查清单