当前位置:网站首页>El input limit can only input the specified number
El input limit can only input the specified number
2022-07-28 16:28:00 【Hi Mei】
1. el-input Limit can only enter positive integers
oninput="value=value.replace(/^(0+)|[^\d]+/g,'')"
Replacement code added to el-input in
<el-input
style="width:80px;"
@change="update(item)"
oninput="value=value.replace(/^(0+)|[^\d]+/g,'')"
v-model="item.quantity"
placeholder=" Please enter the purchase quantity "
></el-input>
2. el-input Only positive numbers and two decimal places can be entered
oninput="value= value.match(/\d+(\.\d{0,2})?/) ? value.match(/\d+(\.\d{0,2})?/)[0] : ''"
Replacement code added to el-input in
<el-input
style="width:80px;"
oninput="value= value.match(/\d+(\.\d{0,2})?/) ? value.match(/\d+(\.\d{0,2})?/)[0] : ''"
@change="update(item)"
v-model="item.freight"
placeholder=" Please enter the freight "
></el-input>
边栏推荐
- Practical development tutorial of software problem repair tracking system (Part 1)
- 食品安全 | 这两类瓜果宜改善便秘 孕妇人群尤其建议
- flashfxp 530 User cannot log in. ftp
- R language uses ggpairs function of ggally package to visualize pairwise relationship graph of grouping multivariable, set alpha parameter to change image transparency, diagonal continuous variable de
- QT QString详解
- Rosen's QT journey 102 listmodel
- Redis series 4: sentinel (sentinel mode) with high availability
- PHP about problems such as memory overflow timeout caused by large amount of data exporting or traversing data
- ANSYS二次开发 - MFC界面调用ADPL文件
- HyperMesh运行脚本文件的几种方法
猜你喜欢

Detectron2 installation and testing

LabVIEW LINX Toolkit控制Arduino设备(拓展篇—1)

加速投资的小红书,“病急乱投医”?

食品安全 | 这两类瓜果宜改善便秘 孕妇人群尤其建议

RF module wireless transceiver rf63u chip application data transmission and infrastructure network

Common problems and precautions of remote serial port server (adapter) uart/i2c/1-wire/spi PS304

在vs code上配置Hypermesh二次开发环境

Is MySQL query limit 1000,10 as fast as limit 10? If I want to page, what should I do?

Redis系列4:高可用之Sentinel(哨兵模式)

KubeEdge发布云原生边缘计算威胁模型及安全防护技术白皮书
随机推荐
我在上海偶遇数字凤凰#坐标徐汇美罗城
Automatic conversion and cast
I came across Digital Phoenix coordinate Xuhui Meiluo city in Shanghai
Numpy ndarray learning < I > Foundation
leetcode 题目
A program for judging the result of cyclic input
Remote serial port server (adapter) UART to 1-wire application
About standard IO buffers
Writing of factorial
解决电脑恶意广告弹窗的思路
一小时内学会Abaqus脚本编程秘籍
el-input限制只能输入规定的数
R语言ggplot2可视化绘制线图(line plot)、使用gghighlight包突出高亮线图中满足组合判断条件的线图(satisfies both condition A and B)
ffmpeg获取首帧
flashfxp 530 User cannot log in. ftp
QT packaging
百度编辑器ueditor,编辑内容过多时,工具栏不可见,不方便编辑或上传问题
Let's learn the game of beating hamsters
Rosen's QT journey 101 models and views in QT quick
ANSA二次开发 - 界面开发工具介绍