`${w}${table_width_unit === 'percent' ? '%' : 'px'}`).join(' '),
width: `${table_width}${table_width_unit === 'percent' ? '%' : 'px'}`
}}
>
{rows.map((row, rowIdx) =>
row.cells.map((cell, colIdx) => (
handleCellUpdate(rowIdx, colIdx, updates)}
/>
))
)}
);
};
```
### 5.2 单元格编辑
```tsx
// src/components/Editor/TableCell.tsx
interface TableCellProps {
cell: TableCell;
onUpdate: (updates: Partial