indicator-ui 0.0.97 → 0.0.99

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -10376,7 +10376,13 @@ function PageSwitcher({ curPage = 1, numPage, next, prev, onChange, smallVersion
10376
10376
  if (numPage <= 7) {
10377
10377
  return Array.from({ length: numPage }, (_, i) => i + 1);
10378
10378
  }
10379
- if (curPage <= 2 || curPage >= numPage - 1) {
10379
+ if (curPage === 3) {
10380
+ return [1, 2, 3, 4, '...', numPage - 1, numPage];
10381
+ }
10382
+ else if (curPage === numPage - 2) {
10383
+ return [1, 2, '...', numPage - 3, numPage - 2, numPage - 1, numPage];
10384
+ }
10385
+ if (curPage < 2 || curPage > numPage - 1) {
10380
10386
  return [1, 2, 3, '...', numPage - 2, numPage - 1, numPage];
10381
10387
  }
10382
10388
  return [1, '...', curPage - 1, curPage, curPage + 1, '...', numPage];