Take all the data from the array according to a certain field

    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

Mar.22,2021

datalist.filter(item=>item.time === '2018-06-24')
< hr >

this is how vue is written. Datalist is the total data requested, and searchTime is the time of Filter. (make sure that the time format in the requested data is the same as), filterData, and then listen to searchTime and datalist, to change the value of filterData

.
computed:{
    filterData:function(){
        this.datalist.filter(item => this.searchTime == '' ? item.time === this.searchTime : true)
    }
},

datalist.find(v=>v.time===yourTime)

do you mean that Filter returns array data according to a condition?
you can consider the Filter condition processing of the array.


let datalist = [
    {
       'title':'1',
       'time':'2018-06-24'
    },
    {
        'title':'2',
        'time':'2018-06-24'
    },
    {
        'title':'3',
        'time':'2018-06-29'
    }]
datalist = datalist.filter(d => d.time === '2018-06-24')
console.log(datalist)

filter

Menu