data() {
return {
datalist:[
{
"title":"1"
"time":"2018-06-24"
},
{
"title":"2"
"time":"2018-06-24"
},
{
"title":"3"
"time":"2018-06-29"
}],
}
},
clickDay(data) {
var a = data.split("/");
var curData = a[0] + "-" + (a[1] < 10 ? "0":"") + a[1]+"-"+ (a[2] < 10 ? "0":"")+a[2];
//console.log(curData);
},
each click, the value of curData is different, then compare the time value in datalist, if the same, render the current data, click which to render which data