为什么37行的结果是0而不是-1呢?
data() {
return {
title: 'Hello',
arr:['123','12','345'],
att:''
}
},
methods: {
sdf(){
for(let item of this.arr){
console.log(this.att);//
console.log(item.indexOf(this.att));//0
}
}
},