let keys = Object.keys(data); if (data.length > 6) { data = data.slice(0, 6); } data.reverse(); 转载于:https://www.cnblogs.com/aisiqi-love/p/10155545.html