var str = arr.join(',')
console.log(str) // 1,2,3,4,5,6
您好。希望可以帮助到你!
<van-calendar
poppable="{{ false }}"
show-confirm="{{ false }}"
formatter="{{ formatter }}"
class="calendar"
show-title="{{ false }}"
show-subtitle="{{ false }}"
>
</van-calendar>
onLoad(options){
this.CalendarShow()
}
CalendarShow() {
let _this=this
var data = {}
data.formatter = this.dayFormatter
// 渲染日历
this.setData({formatter: function (day) {
let month = day.date.getMonth() + 1
let date = day.date.getDate()
for(let i of list){
if(month ===i.month){
if (date === i.day) {
day.bottomInfo = '余票'+i.stock+'张'
}
}
}
return day
} })
},
<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条)