element [Bug Report] 【el-input-number】The value that should not be entered is undefined

q8l4jmvw  于 3个月前  发布在  其他
关注(0)|答案(2)|浏览(90)

Element UI version

2.14.1

OS/Browsers version

chrome8.0

Vue version

2.6.12

https://jsfiddle.net/3sfty1zk/1/

Steps to reproduce

Clear the content, do not enter any value, and then leave the input box

I am very happy to participate in the open source of element,
but I may need your help, because I am not sure about some of the specifications of our element

What is Expected?

I expect to display the minimum value by default when there is no content in the input box

What is actually happening?

When the input box has no content, the value bound to v-model becomes undefined

iq3niunx

iq3niunx1#

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

5cg8jx4n

5cg8jx4n2#

<el-input-number
  @change="val => val === undefined && (num = 0)"
  v-model="num"
/>

相关问题