array auto slice
array auto slice
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice
let selectedIndex = 0;
for (let i = 0; i < dateList.length; i++) {
if (dateList[i].ticketGroupId === selectedId) {
log(`selectedId index`, i)
selectedIndex = i;
break;
}
}
const tempArr = dateList;
const list = this.listShaper(tempArr.slice(selectedIndex, selectedIndex + 4));
本文首发于博客园,作者:xgqfrms,原文链接:https://www.cnblogs.com/xgqfrms/p/12692983.html
未经授权禁止转载,违者必究!