houzhongjian
2024-11-27 fd13b0017518273406ee1a9906c07d079e4a9ac4
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
  }
}