dongyukun
2025-04-29 6b77bf1b01c29954f21c2b287cccbe08aa1373fe
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
  }
}