/** * Props 表:手写维护,保持和组件定义同步。 * * 只列对外承诺的 props;内部实现用的字段不写进来。 */ export type PropRow = { name: string type: string required?: boolean defaultValue?: string desc: string } export function PropsTable({ rows }: { rows: PropRow[] }) { return (
| 属性 | 类型 | 默认值 | 说明 |
|---|---|---|---|
{row.name}
{row.required === true && ' *'}
|
{row.type}
|
{row.defaultValue ?? '—'} | {row.desc} |