feat: support multi-line field descriptions#113
Open
RavenHogWarts wants to merge 2 commits into
Open
Conversation
将描述字段的输入框从单行 input 改为多行 textarea,支持换行显示。调整样式以适配新的 输入框类型,包括移除悬停效果、调整对齐方式 为 flex-start、添加透明背景和垂直调整大小 功能。同时在表单项标签样式中添加 pre-wrap 以正确显示换行符。
修改表单项和操作设置的样式以改进长文本的 换行行为。在 CpsFormItem 中添加 word-break 和 overflow-wrap 属性以确保 长文本正确换行。在 CpsFormAction 中将 white-space 从 nowrap 改为 normal,并添加 相同的换行属性以支持多行文本显示。同时 调整 box-shadow 的格式以提高代码可读性。
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.
closed #111
变更说明
1. 字段描述支持多行输入
描述输入框由单行
<input>改为<textarea>,支持换行和多行文本编辑,默认 2 行高度。2. 长文本溢出修复
form--CpsFormItemInfoDescription):添加white-space: pre-wrap、word-break: break-all、overflow-wrap: break-word,长文本自动换行不再溢出容器form--CpsFormActionRemarkText):white-space: nowrap改为white-space: normal,并添加相同的断词规则改动文件
DescriptionSetting.tsx:<input>→<textarea rows={2}>DescriptionSetting.css:适配 textarea 样式CpsFormItem.css:描述文本添加换行和断词规则CpsFormAction.css:备注文本修复溢出