Skip to content

feat: support multi-line field descriptions#113

Open
RavenHogWarts wants to merge 2 commits into
vran-dev:masterfrom
RavenHogWarts:feat/description-input-textarea-multiline
Open

feat: support multi-line field descriptions#113
RavenHogWarts wants to merge 2 commits into
vran-dev:masterfrom
RavenHogWarts:feat/description-input-textarea-multiline

Conversation

@RavenHogWarts
Copy link
Copy Markdown
Collaborator

closed #111

变更说明

1. 字段描述支持多行输入

描述输入框由单行 <input> 改为 <textarea>,支持换行和多行文本编辑,默认 2 行高度。

2. 长文本溢出修复

  • 表单字段描述(form--CpsFormItemInfoDescription):添加 white-space: pre-wrapword-break: break-alloverflow-wrap: break-word,长文本自动换行不再溢出容器
  • 动作备注文本(form--CpsFormActionRemarkText):white-space: nowrap 改为 white-space: normal,并添加相同的断词规则

改动文件

  • DescriptionSetting.tsx<input><textarea rows={2}>
  • DescriptionSetting.css:适配 textarea 样式
  • CpsFormItem.css:描述文本添加换行和断词规则
  • CpsFormAction.css:备注文本修复溢出

将描述字段的输入框从单行 input 改为多行
textarea,支持换行显示。调整样式以适配新的
输入框类型,包括移除悬停效果、调整对齐方式
为 flex-start、添加透明背景和垂直调整大小
功能。同时在表单项标签样式中添加 pre-wrap
以正确显示换行符。
修改表单项和操作设置的样式以改进长文本的
换行行为。在 CpsFormItem 中添加
word-break 和 overflow-wrap 属性以确保
长文本正确换行。在 CpsFormAction 中将
white-space 从 nowrap 改为 normal,并添加
相同的换行属性以支持多行文本显示。同时
调整 box-shadow 的格式以提高代码可读性。
@RavenHogWarts RavenHogWarts requested a review from vran-dev April 11, 2026 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FR]: 字段的描述扩展功能

1 participant