ElemeFE / element

A Vue.js 2.0 UI Toolkit for Web
https://element.eleme.io/
MIT License
54.1k stars 14.64k forks source link

[bug report] the El input regular expression can only be used after a number. Two way binding is invalid after typing. #21047

Open yh17838 opened 3 years ago

yh17838 commented 3 years ago

Element UI version

2.15.2

OS/Browsers version

Windows 10

Vue version

2.6.13

Reproduction Link

https://elementui.github.io/issue-generator/#/zh-CN

Steps to reproduce

What is Expected?

改善双向绑定。

What is actually happening?

改善双向绑定。

element-bot commented 3 years ago

Translation of this issue:

Element UI version

2.15.2

OS/Browsers version

Windows 10

Vue version

2.6.13

Reproduction Link

https://elementui.github.io/issue-generator/#/zh -CN

Steps to reproduce

<el-input style=\"width: 50%;\" v-model=\"form.heartCount\" oninput=\"value=value.replace(/[^\d]/g,'')\">

What is Expected?

Improve bidirectional binding.

What is actually happening?

Improve bidirectional binding.