//删除的方法 deteleObject(obj) { var uniques = []; var stringify = {}; for (var i = 0; i < obj.length; i++) { var keys = Object.keys(obj[i]); keys.sort(function(a, b) { return (Number(a) - Number(b)); }); var str = ''; for (var j = 0; j < keys.length; j++) { str += JSON.stringify(keys[j]); str += JSON.stringify(obj[i][keys[j]]); } if (!stringify.hasOwnProperty(str)) { uniques.push(obj[i]); stringify[str] = true; } } uniques = uniques; return uniques; }, //使用的方法 changeCols(){ this.arr = [ { label: "所属企业1", prop: "tenantFullName", flag: "1" }, { label: "所属企业2", prop: "tenantFullName", flag: "1" } { label: "所属企业", prop: "tenantFullName", flag: "1" } { label: "所属企业", prop: "tenantFullName", flag: "1" } ] this.arr = this.deteleObject(this.arr ); console.log(this.arr) }