provincelist(newVal){ var eidtCty = window.localStorage.citycode; var newCty = JSON.stringify(eidtCty.substring(0,eidtCty.length-1));
newVal.forEach((v,i)=>{ var forCty = JSON.stringify(v.provinceName) if(forCty.indexOf(newCty) != -1){ console.log(123) /* this.isdialog = true;
this.alertarea() */
}
})
}forCty是"北京""河北""上海""山东"newCty是"北京"需求是 newCty里的城市 如果不在forCty范围内则执行操作 如果在范围内就不执行操作 这个应该咋判断 求助大佬
添加回答
举报
0/150
提交
取消