()
| 55 | } |
| 56 | |
| 57 | function setLogsSummary() { |
| 58 | const from = logsState.total === 0 ? 0 : ((logsState.page - 1) * logsState.pageSize + 1); |
| 59 | const to = Math.min(logsState.total, logsState.page * logsState.pageSize); |
| 60 | el.summary.textContent = `共 ${logsState.total} 条,当前 ${from}-${to}`; |
| 61 | el.pageInfo.textContent = `第 ${logsState.page} 页`; |
| 62 | el.prevPageBtn.disabled = logsState.page <= 1; |
| 63 | el.nextPageBtn.disabled = to >= logsState.total; |
| 64 | } |
| 65 | |
| 66 | function renderLogs(rows) { |
| 67 | if (!Array.isArray(rows) || rows.length === 0) { |
no outgoing calls
no test coverage detected