(table, colIndex)
| 315 | } |
| 316 | |
| 317 | function addColumnRight(table, colIndex) { |
| 318 | Array.from(table.rows).forEach((row, rowIdx) => { |
| 319 | const cell = row.insertCell(colIndex + 1); |
| 320 | if (rowIdx === 0 && row.children[colIndex] && row.children[colIndex].tagName === 'TH') { |
| 321 | const th = document.createElement('th'); |
| 322 | th.style.cssText = 'padding: 12px; border: 1px solid #e5e7eb; background: #f8fafc; font-weight: 600; text-align: left; color: #374151;'; |
| 323 | th.textContent = '新列'; |
| 324 | row.replaceChild(th, cell); |
| 325 | } else { |
| 326 | cell.style.cssText = 'padding: 12px; border: 1px solid #e5e7eb; color: #374151; min-height: 20px;'; |
| 327 | } |
| 328 | }); |
| 329 | } |
| 330 | |
| 331 | function deleteRow(table, rowIndex) { |
| 332 | table.deleteRow(rowIndex); |
no outgoing calls
no test coverage detected