// 去空
for (let i = 0; i < this.workshopNameList.length; i++) {
if (this.workshopNameList[i] === ' ' || this.workshopNameList[i] === null || typeof (this.workshopNameList[i]) === 'undefined') {
this.workshopNameList.splice(i, 1)
i = i - 1
}
// 去重
for (let j = i + 1; j < this.workshopNameList; j++) {
if (this.workshopNameList[i] === this.workshopNameList[j]) {
this.workshopNameList.splice(j, 1)
j--
}
}
}
去空去重
最新推荐文章于 2024-07-11 15:29:37 发布