import Vue from "vue"; const arrDiff = function(x,y) { let clone = x.slice(0); for (let i = 0; i < y.length; i++) { let temp = y[i]; for (let j = 0; j < clone.length; j++) { // 普通数组 (temp === clone[j]) if (temp.id === clone[j].id) { clone.splice(j, 1); } } } return arrDiff(clone); } export default arrDiff;