[ts]
Type '{ pagination: { total: number; pageSize: number; defaultPageSize: number; showSizeChanger: true; ...' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<Table<{}>> & Readonly<{ children?: ReactNode; }> &...'.
Type '{ pagination: { total: number; pageSize: number; defaultPageSize: number; showSizeChanger: true; ...' is not assignable to type 'Readonly<TableProps<{}>>'.
Types of property 'columns' are incompatible.
Type '({ title: string; dataIndex: string; key: string; fixed: boolean; width: number; } | { title: str...' is not assignable to type 'ColumnProps<{}>[]'.
Type '{ title: string; dataIndex: string; key: string; fixed: boolean; width: number; } | { title: stri...' is not assignable to type 'ColumnProps<{}>'.
Type '{ title: string; dataindex: string; fixed: string; key: string; render: (text: any, record: any) ...' is not assignable to type 'ColumnProps<{}>'.
Types of property 'fixed' are incompatible.
Type 'string' is not assignable to type 'boolean | "left" | "right"'.
(JSX attribute) bordered: true
解决方案:
1.columns=[{fixed:'left'} as ColumnProps]
2.columns: [
{ title: 'xxx', dataIndex: 'xxx', fixed: 'left' as 'left', // cast fixed }, ]