dongyukun
2025-04-29 3b627eaf25ea7b9e0923ac650417019c3f94c7cf
1
2
3
4
5
6
7
8
export const setIndex = (reserveIndex: boolean, index: number, size: number, current: number) => {
  const newIndex = index + 1
  if (reserveIndex) {
    return size * (current - 1) + newIndex
  } else {
    return newIndex
  }
}