computed: {
//数据筛选
searchData: function () {
let search = this.searchValue;
//console.log(this.nodeList);
if (search) {
return this.nodeList.filter(function (product) {
return Object.keys(product).some(function (key) {
//这里注意全部全部转换为小写以后搜索的内容也要全部转为小写
return String(product[key]).toLowerCase().indexOf(search.toLowerCase()) > -1
})
})
}
return this.nodeList;
},
有兴趣的朋友可以去看我的源代码
https://github.com/nuls-io/explorer_2.0