当前位置:网站首页>The input of uniapp is invalid except for numbers
The input of uniapp is invalid except for numbers
2022-07-04 23:22:00 【Your beauty fascinates me】
<template>
<view>
<input type="number"class="tl-price-input" placeholder=" Please enter a number 1" v-model="number" >
<input type="number" class="tl-price-input" placeholder=" Please enter a number 2" v-model="data.number" >
</view>
</template>
<script>
export default {
data() {
return {
number:'',
data:{
number:'',
}
};
},
computed:{
newFun(){
console.log(this.data.number,this.number," data ");
if(!Number(this.number)){
this.number=parseFloat(this.number);
}
if(!Number(this.data.number)){
this.data.number=parseFloat(this.data.number);
}
}
},
onLoad() {
}
}
</script>
<style lang="scss">
/* Price search input box */
input, button {
border: none;
outline: none;
}
.tl-price-input{
margin:10px auto;
width: 80%;
border: 1px solid #ccc;
padding: 7px 0;
background: #F4F4F7;
border-radius: 3px;
padding-left:5px;
-webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
-webkit-transition: border-color ease-in-out .15s,-webkit-box-shadow ease-in-out .15s;
-o-transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s
}
.tl-price-input:focus{
border-color: #66afe9;
outline: 0;
-webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);
box-shadow: inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)
}
.ant-btn {
line-height: 1.499;
position: relative;
display: inline-block;
font-weight: 400;
white-space: nowrap;
text-align: center;
background-image: none;
border: 1px solid transparent;
-webkit-box-shadow: 0 2px 0 rgba(0,0,0,0.015);
box-shadow: 0 2px 0 rgba(0,0,0,0.015);
cursor: pointer;
-webkit-transition: all .3s cubic-bezier(.645, .045, .355, 1);
transition: all .3s cubic-bezier(.645, .045, .355, 1);
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
-ms-touch-action: manipulation;
touch-action: manipulation;
height: 32px;
padding: 0 15px;
font-size: 14px;
border-radius: 4px;
color: rgba(0,0,0,0.65);
background-color: #fff;
border-color: #d9d9d9;
}
.ant-btn-primary {
color: #fff;
background-color: #1890ff;
border-color: #1890ff;
text-shadow: 0 -1px 0 rgba(0,0,0,0.12);
-webkit-box-shadow: 0 2px 0 rgba(0,0,0,0.045);
box-shadow: 0 2px 0 rgba(0,0,0,0.045);
}
.ant-btn-red {
color: #fff;
background-color: #FF5A44;
border-color: #FF5A44;
text-shadow: 0 -1px 0 rgba(0,0,0,0.12);
-webkit-box-shadow: 0 2px 0 rgba(0,0,0,0.045);
box-shadow: 0 2px 0 rgba(0,0,0,0.045);
}
</style>
边栏推荐
- ICML 2022 || 3DLinker: 用于分子链接设计的E(3)等变变分自编码器
- Pict generate orthogonal test cases tutorial
- Redis getting started complete tutorial: Geo
- The initial trial is the cross device model upgrade version of Ruijie switch (taking rg-s2952g-e as an example)
- uniapp 除了数字,其他输入无效
- [graph theory] topological sorting
- Tweenmax emoticon button JS special effect
- 高通WLAN框架学习(30)-- 支持双STA的组件
- SHP data making 3dfiles white film
- 香港珠宝大亨,22亿“抄底”佐丹奴
猜你喜欢
A complete tutorial for getting started with redis: hyperloglog
Font design symbol combination multifunctional wechat applet source code
可观测|时序数据降采样在Prometheus实践复盘
Observable time series data downsampling practice in Prometheus
P2181 对角线和P1030 [NOIP2001 普及组] 求先序排列
【剑指offer】1-5题
香港珠宝大亨,22亿“抄底”佐丹奴
Redis introduction complete tutorial: client communication protocol
MariaDB's Galera cluster application scenario -- multi master and multi active databases
S32 design studio for arm 2.2 quick start
随机推荐
French scholars: the explicability of counter attack under optimal transmission theory
解决无法通过ssh服务远程连接虚拟机
位运算符讲解
法国学者:最优传输理论下对抗攻击可解释性探讨
【爬虫】数据提取之JSONpath
Tweenmax emoticon button JS special effect
[graph theory] topological sorting
P2181 对角线和P1030 [NOIP2001 普及组] 求先序排列
heatmap. JS picture hotspot heat map plug-in
JS 3D explosive fragment image switching JS special effect
ECS settings SSH key login
Ffmpeg quick clip
Excel shortcut keys - always add
The initial arrangement of particles in SPH (solved by two pictures)
时间 (计算)总工具类 例子: 今年开始时间和今年结束时间等
MySQL数据库备份与恢复--mysqldump命令
A complete tutorial for getting started with redis: redis usage scenarios
debug和release的区别
ffmpeg快速剪辑
Examples of time (calculation) total tools: start time and end time of this year, etc