var str = arr.join(',')
console.log(str) // 1,2,3,4,5,6
您好。漏并如希望蔽纳可以帮助到你!
<view>{{min}}:{{sec}}</view>//计时器,cycleTime为豪秒数
timerSec(cycleTime) {
var that = this
let intervalsec = null //倒计时函数陵巧
intervalsec = setInterval(function() {
cycleTime--
吵汪枣 that.setData({
min: parseInt(cycleTime / 60) <10 ? '升拆0' + parseInt(cycleTime / 60) : parseInt(cycleTime / 60),
sec: (cycleTime % 60) <10 ? '0' + (cycleTime % 60) : (cycleTime % 60),
})
if (cycleTime == 0) {
clearInterval(intervalsec)
}
}, 1000)
},
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)