vue 隐藏display_vue.js实现显示与隐藏,求助

目前第一次点击切换class已经完成,不知道下面怎么写了,求大神帮帮忙

*{margin:0;padding:0;}

.box{

width:500px;

margin:0 auto;

height:400px;

display: flex;

align-items: center;

justify-content: space-around;

position: relative;

}

.box li{

width:100px;

height:100px;

border-radius: 50%;

line-height:100px;

text-align:center;

list-style: none

}

.complte{

background: green;

display: none;

}

.record-again{

background: #aaa;

display: none;

}

.red{

background: red

}

.yellow:{

background: yellow

}

.green{

background: green

}

.play{

background: #000;

border:1px solid #fff;

}

switch

已经录制{{seconds}}秒

重录上传

var demo = new Vue({

el:'.box',

data:{

seconds:0,

classes:['red','yellow','green'],

currentClass:"",

index:0,

},

methods:{

record:function() {

var self = this;

setInterval(function() {

if(self.index>self.classes.length) {

self.index = 0

}

self.index++;

self.currentClass = self.classes[self.index];

},500)

}

}

})

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值