Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

autosize的多行输入框样式异常 #2505

Closed
yuzhenqiang opened this issue Feb 24, 2022 · 4 comments
Closed

autosize的多行输入框样式异常 #2505

yuzhenqiang opened this issue Feb 24, 2022 · 4 comments
Labels
bug Something isn't working

Comments

@yuzhenqiang
Copy link

TuSimple/naive-ui version (版本)

2.25.5

Vue version (Vue 版本)

3.2.31

Browser and its version (浏览器及其版本)

Chrome(98.0.4758.102)

System and its version (系统及其版本)

MacOS(12.2.1)

Node version (Node 版本)

Reappearance link (重现链接)

https://codesandbox.io/s/goofy-germain-ucjqct?file=/src/Demo.vue

Reappearance steps (重现步骤)

文本框内容超过一行时

Expected results (期望的结果)

内容在多行文本框内正常显示

Actual results (实际的结果)

n-input__textarea-el 宽度溢出,导致内容溢出

Remarks (补充说明)

@github-actions github-actions bot added the untriaged need to sort label Feb 24, 2022
@xxf512
Copy link

xxf512 commented Feb 24, 2022

这个我也碰到了,好像是加了autosize 这个属性 就会这样子,去掉就正常了

@yuzhenqiang
Copy link
Author

这个我也碰到了,好像是加了autosize 这个属性 就会这样子,去掉就正常了

但我们需要autosize

@Sepush Sepush added bug Something isn't working and removed untriaged need to sort labels Feb 24, 2022
@07akioni
Copy link
Collaborator

07akioni commented Feb 25, 2022

image

image

是个 bug,应该是因为 right 对于 textarea 不生效导致的,得换个实现

@07akioni
Copy link
Collaborator

这个事情从根源上讲是为了做滚动条效果才搞出来的,是因为滚动监听区域和滚动条区域不一致闹出来的问题。

目前临时修正了一下,长久的解决方案还是得把 scrollbar 几个内部组件拆开,通过 context 绑定。

<scrollbar>
  <textarea>
  </textarea>
  <textarea-suffix />
  <vertical-rail />
  <horizontal-rail />
</scrollbar>

jaulz pushed a commit to jaulz/naive-ui that referenced this issue Mar 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants