当前位置:网站首页>The input input box of H5 page pops up the numeric keypad, which needs to support decimal points
The input input box of H5 page pops up the numeric keypad, which needs to support decimal points
2022-07-25 14:25:00 【LILEILEILOVE】
<input :type='inputType' :pattern='inputPattern' v-model='inputValue'>
data(){
return {
inputType:"tel",
inputPattern:'[0-9.]*'
}
}
created(){
switch(this.getDeviceType()){
case:'android':
this.inputType = 'tel'
this.inputPattern = '[0-9.]*'
break;
case:"ios":
default:
this.inputType = "number"
this.inputPattern = "number"
break;
}
}
getDeviceType(){
const userAgent = navigator.userAgent.toLowerCase();
return (userAgent.indexOf('android')>-1 || userAgent.indexOf('Android')>-1)?'android':'ios'
}
// stay pc End cannot enter decimal point . Only mobile devices can
边栏推荐
- Opencv video tracking "suggestions collection"
- D2. Chopping Carrots (Hard Version) (每日一题)
- IDEA报错 Failed to determine a suitable driver class
- Educational Codeforces Round 132 (Rated for Div. 2) C,D+AC自动机
- Detailed explanation of Telnet remote login AAA mode [Huawei ENSP]
- Paddlenlp之UIE关系抽取模型【高管关系抽取为例】
- Summary of some problems about left value and right value [easy to understand]
- Interpretation of featdepth self-monitoring model for monocular depth estimation (Part 2) -- use of openmmlab framework
- Easy entry natural language processing series 12 hidden Markov models
- SSM framework integration, simple case
猜你喜欢

Mongodb source code deployment and configuration

The security market has entered a trillion era, and the security B2B online mall platform has been accurately connected to deepen the enterprise development path

Mysql表的操作

PHP website design ideas

CDA level Ⅰ 2021 new version simulation question 1 (with answers)
![Depth estimation self-monitoring model monodepth2 paper summary and source code analysis [theoretical part]](/img/22/17250eabf067b5b1b9b71e6e0ff14e.png)
Depth estimation self-monitoring model monodepth2 paper summary and source code analysis [theoretical part]

swiper 一侧或两侧露出一小部分

实现一个家庭安防与环境监测系统(二)

maya建模练习

The supply chain collaborative management system, a new "engine" of digitalization in machinery manufacturing industry, helps enterprises' refined management to a new level
随机推荐
CDA level Ⅰ 2021 new version simulation question 2 (with answers)
基于PaddleOCR开发uni-app离线身份证识别插件
PT100 temperature measurement circuit diagram (AD590 typical temperature measurement circuit)
Throwing OutOfMemoryError “Could not allocate JNI Env“
Polymorphism and interface
Leetcode 205. isomorphic string (2022.07.24)
【cartographer_ros】八: 官方Demo参数配置和效果
Realize a family security and environmental monitoring system (II)
应用实践:Paddle分类模型大集成者[PaddleHub、Finetune、prompt]
Numpy basic package for data analysis
为什么中建、中铁都需要这本证书?究竟是什么原因?
GameFramework制作游戏(一)
结构体大小
51单片机学习笔记(2)
Keys and scan based on redis delete keys with TTL -1
快速搭建Dobbo小Demo
网络安全应急响应技术实战指南(奇安信)
Deep understanding of pytorch distributed parallel processing tool DDP -- starting from bugs in engineering practice
CDA level1 multi topic selection
Reverse Integer