result:['1','2','3','1']
this.result = this.result.filter((item, index) => {
return this.result.indexOf(item, 0) === index;
});
// console.log(this.result); 输出'1','2','3'
result:['1','2','3','1']
this.result = this.result.filter((item, index) => {
return this.result.indexOf(item, 0) === index;
});
// console.log(this.result); 输出'1','2','3'