element [bug report] when v-model.trim is used for El input, spaces cannot be entered between words. Before and after spaces should be removed in the blur event of input

j9per5c4  于 5个月前  发布在  其他
关注(0)|答案(7)|浏览(55)

Element UI version

2.13.1

OS/Browsers version

window10/80.0.3987.163(正式版本)

Vue version

3.0.0-alpha.12

https://codepen.io/pen/?&editable=true=https%3A%2F%2Felement.eleme.cn%2F2.13%2F

Steps to reproduce

  1. el-input的v-model添加修饰符.trim
  2. 无法输入空格
    3.需要先打出文字,再移动光标到文字中间敲空格

What is Expected?

应该是在输入框blur后去掉前后空格

What is actually happening?

无法输入空格,要先打出文字后再往中间敲空格

kr98yfug

kr98yfug1#

Translation of this issue:

Element UI version

2.13.1

OS/Browsers version

Windows10 / 80.0.3987.163 (official version)

Vue version

3.0.0-alpha.12

https://codepen.io/pen/?&editable=true=https%3A%2F%2Felement.eleme.cn%2F2.13%2F

Steps to reproduce

  1. Add modifier.trim to V-model of El input
  2. Cannot enter space
  3. You need to type the text first, and then move the cursor to the middle of the text to type a space

What is Expected?

Should be in the input box blur after removing the space before and after

What is actually happening?

You can't enter spaces. Type text first and then type spaces in the middle

zlhcx6iw

zlhcx6iw2#

我也遇到这问题,希望尽快解决下,特难受这输入体验

ymdaylpp

ymdaylpp3#

希望官方能解决下这个输入体验的问题。

e0bqpujr

e0bqpujr5#

+1 This prevents me from upgrading from 2.4.8

0ejtzxu1

0ejtzxu16#

大哥们,最后怎么解决这个问题。用到这个功能的地方太多了,如果一个个改,麻烦死了

qfe3c7zg

qfe3c7zg7#

我自己写了个指令v-input-trim来处理, https://www.npmjs.com/package/v-input-trim 当然还是希望官方可以直接在根源修复问题

相关问题