(data, currentPage, pageSize)
| 72 | |
| 73 | // 首先声明分页相关的工具函数 |
| 74 | const getPagedData = (data, currentPage, pageSize) => { |
| 75 | const start = (currentPage - 1) * pageSize; |
| 76 | const end = start + pageSize; |
| 77 | return data.slice(start, end); |
| 78 | }; |
| 79 | |
| 80 | // 在 return 语句之前,先处理过滤和分页逻辑 |
| 81 | const filteredModels = models.filter((model) => { |
no outgoing calls
no test coverage detected