fix(textarea): align input style and length behavior - #6888
Open
zhangpaopao0609 wants to merge 2 commits into
Open
fix(textarea): align input style and length behavior#6888zhangpaopao0609 wants to merge 2 commits into
zhangpaopao0609 wants to merge 2 commits into
Conversation
zhangpaopao0609
requested review from
Cat1007,
PengYYYYY,
Wesley-0808,
chaishi,
liweijie0812,
uyarn and
zydemail
as code owners
August 8, 2026 10:39
Contributor
|
Size Change: 0 B Total Size: 21.4 kB ℹ️ View Unchanged
|
Contributor
|
Size Change: 0 B Total Size: 3.55 kB ℹ️ View Unchanged
|
Contributor
|
Size Change: 0 B Total Size: 74.9 kB ℹ️ View Unchanged
|
Collaborator
TDesign Component Site Preview Open
|
commit: |
Contributor
|
Size Change: +300 B (+0.03%) Total Size: 960 kB 📦 View Changed
ℹ️ View Unchanged
|
Collaborator
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
Refs #6846
本 PR 仅处理 issue 中已经确认的第 1、3、5 点;第 2、4 点继续在原 issue 中讨论 API 语义和高度优先级,因此这里不使用
Fixes,避免提前关闭 issue。💡 需求背景和解决方案
value配合maxcharacter截断时,状态仍统一通过setInnerValue发出更新;DOM 对账只修正原生值,不再直接写 prop-backed readonly ref,避免 Vue readonly 警告和重复状态写入。normalizeStyle统一解析字符串、对象和数组形式的style,再以命令式方式合并到原生<textarea>;内部 autosize/rows 样式保持更高优先级,并清理已经移除的样式属性。这里刻意不把 autosize 样式放入 render 依赖,避免高度重算触发重渲染并覆盖输入法 composition 期间尚未提交的 DOM 值。maxlength计数器改用 Unicode 字符长度,与useLengthLimit的限制判断和onValidate保持一致,emoji 不再按两个 UTF-16 code unit 计数。新增回归测试覆盖:受控截断无 readonly 警告、字符串/对象 style、autosize 高度重算时保留 composition 输入,以及 emoji maxlength 计数一致性。
验证结果:
📝 更新日志
tdesign-vue-next
maxlength计数不一致的问题@tdesign-vue-next/chat
@tdesign-vue-next/nuxt
@tdesign-vue-next/auto-import-resolver
☑️ 请求合并前的自查清单