11
WXL
2025-07-05 616d4a1b45ac9e1442a5541e21c8c755cde2c78f
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
  }
}