Vue中针对某一列进行搜索

get_table_data() {
      // 将 search 和 值都改为大写来进行对比
      let search = this.search.toLowerCase()
      if (search) {
       return this.tableData.filter((data) => {
        return Object.keys(data).some((key) => {
         if (key == 'station_name') {
          return data[key].toLowerCase().indexOf(search) > -1
         }
        })
       })
      }
      return this.tableData
     },
原文地址:https://www.cnblogs.com/lyt520/p/15064357.html