当前位置:网站首页>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>

边栏推荐
- 壁仞科技研究院前沿技术文章精选
- debug和release的区别
- ScriptableObject
- HMS core unified scanning service
- Examples of time (calculation) total tools: start time and end time of this year, etc
- 【爬虫】数据提取之xpath
- 微软禁用IE浏览器后,打开IE浏览器闪退解决办法
- Redis introduction complete tutorial: List explanation
- Qt加法计算器(简单案例)
- The initial trial is the cross device model upgrade version of Ruijie switch (taking rg-s2952g-e as an example)
猜你喜欢

EditPlus--用法--快捷键/配置/背景色/字体大小

实战模拟│JWT 登录认证

Why does infographic help your SEO

Docker镜像的缓存特性和Dockerfile

Solution record of jamming when using CAD to move bricks in high configuration notebook

Redis getting started complete tutorial: hash description

可观测|时序数据降采样在Prometheus实践复盘

CTF竞赛题解之stm32逆向入门

字体设计符号组合多功能微信小程序源码

CTF competition problem solution STM32 reverse introduction
随机推荐
uniapp 除了数字,其他输入无效
A complete tutorial for getting started with redis: redis usage scenarios
为什么信息图会帮助你的SEO
MP advanced operation: time operation, SQL, querywapper, lambdaquerywapper (condition constructor) quick filter enumeration class
【爬虫】数据提取之JSONpath
Intelligence test to see idioms guess ancient poems wechat applet source code
【图论】拓扑排序
Redis introduction complete tutorial: Collection details
实战模拟│JWT 登录认证
Selected cutting-edge technical articles of Bi Ren Academy of science and technology
ETCD数据库源码分析——处理Entry记录简要流程
香港珠宝大亨,22亿“抄底”佐丹奴
可观测|时序数据降采样在Prometheus实践复盘
OSEK standard ISO_ 17356 summary introduction
【剑指offer】1-5题
QT addition calculator (simple case)
Redis introduction complete tutorial: detailed explanation of ordered collection
推荐收藏:跨云数据仓库(data warehouse)环境搭建,这货特别干!
Redis:Redis的事务
时间 (计算)总工具类 例子: 今年开始时间和今年结束时间等