feat(textarea): add clearable styles and docs - #2613
Closed
LiamFan16-mikasa wants to merge 1 commit into
Closed
Conversation
16 tasks
Collaborator
|
谢谢参与犀牛鸟活动,综合实现的视觉效果和代码逻辑,决定采纳 #2583 继续推进 |
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.
close #2566
🤔 这个 PR 的性质是?
🔗 相关 Issue
本 PR 是 #2566 的跨框架公共样式与文档补充部分,配合 Vue3 侧组件逻辑一起解决该 issue。
配套的 Vue3 侧实现(clearable 属性、onClear 事件、单元测试、demo)见:Tencent/tdesign-vue-next#6785
💡 需求背景和解决方案
实现内容:
.t-textarea--clearable、.t-textarea__clear样式clearable示例入口,由框架仓库提供对应 demo 实现核心改进点与优化:
样式方案对齐现有 Input clearable 的视觉语言,但显隐逻辑不同:Input 通过 CSS 的
opacity/visibility配合:hover控制显隐,Textarea 框架侧(Vue3)是通过 JS 判断鼠标悬浮状态来控制图标渲染,因此 common 侧样式只处理图标的定位和颜色,不额外做显隐动画,避免逻辑重复。效果展示:

📝 更新日志
tdesign-common
☑️ 请求合并前的自查清单