element中el-input输入框校验(vue项目)
1、只能输入数字和小数点
<el-input
v-model="ipValue"
placeholder="请输入"
class="input-host"
@input="
ipValue = ipValue.replace(/[^0-9.]/g,'')
"
/>
2、只能输入数字
<el-input
v-model="ipValue"
placeholder="请输入"
class="input-host"
@input="
ipValue = ipValue.replace(/[^\d]/g,'')
"
/>
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。