vue连个数组对比

      let Ids = this.houseList.map(item => item.houseId);
      let arr = new Array();
      this.projectOptions.forEach((item, index) => {
        if (!Ids.includes(item.id)) {
          arr.push(item);
        }
      });
      this.projectOptions = arr;

  使用 .map 和  .includes 配合使用

原文地址:https://www.cnblogs.com/lucky-jun/p/14872992.html