arco-design-vue icon indicating copy to clipboard operation
arco-design-vue copied to clipboard

Textarea component style improvement

Open Kigoal opened this issue 4 years ago • 4 comments

基本信息

the Textarea content overlaps with the prompt

现有案例

预期解决问题

额外补充

image

Kigoal avatar Nov 22 '21 08:11 Kigoal

@Kigoal 这个问题在开发的时候也遇到了,目前想到的方法是给这个尾部单独放到一行,这样的话会影响到现在的展示方式和单行时的展示效果。不知道有没有什么更好的处理方式

flsion avatar Nov 23 '21 06:11 flsion

@Kigoal 这个问题在开发的时候也遇到了,目前想到的方法是给这个尾部单独放到一行,这样的话会影响到现在的展示方式和单行时的展示效果。不知道有没有什么更好的处理方式

临时先给 show-word-limit 增加一个 悬浮/阴影/渐变 这类的遮罩如何?我看主流软件基本都是单独占一行,飞书的输入框也是这样处理,针对单行时特殊处理过,多行时直接单独一行。

Kigoal avatar Nov 24 '21 03:11 Kigoal

恩,阴影遮罩也是个方案,这个我们和设计讨论一下,确定下处理的方法

flsion avatar Nov 26 '21 03:11 flsion

@Kigoal #1546 有实现一个 demo 样式(目前 2.35.0 也是可以使用的) image image

<a-textarea
      class="custom-textarea"
      placeholder="Please enter something"
      default-value="This is the contents of the textarea. This is the contents of the textarea. This is the contents of the textarea. This is the contents of the textarea. This is the contents of the textarea. This is the contents of the textarea. This is the contents of the textarea."
      :max-length="280"
      show-word-limit
/>
.custom-textarea {
  padding-bottom: 22px;
}
.custom-textarea textarea {
  resize: none;
}

hehehai avatar Aug 21 '22 13:08 hehehai