标签:order this lock lse 封装 else data splay rgb
<li class="number-li"><span class="sub" @click="substract">-</span><span ref="changs" class="num1">{{num}}</span><span class="ad" @click="add">+</span></li>
css:
.number-li span {
display: inline-block;
border: 2px solid rgba(0, 0, 0, 0.1);
width: 25px;
}
.sub{
text-align:center;
}
.num1{
text-align:center;
width: 25px;
height: 25px;
border: 2px solid rgba(0, 0, 0, 0.1);
}
.ad{
text-align:center;
}
data: substract(){
if(this.num<=1)
{
return
}else{
this.num--
}
},add(){
if(this.num>=10)
{
return
}else{
this.num++
}
}
标签:order this lock lse 封装 else data splay rgb
原文地址:https://www.cnblogs.com/huanhuan55/p/9741982.html