Skip to content

v-model.trim not working as expected #1803

Answered by luo0412
pzgz asked this question in Q&A
Discussion options

You must be logged in to vote

感觉这种应该封装一个自定义的指令 v-trim,和组件库没啥关系,网上抄的还蛮好用的...

https://codesandbox.io/s/flamboyant-tamas-n0z7ei

<a-input v-trim v-model="val" />

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by hehehai
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #1772 on October 29, 2022 14:17.