比如把这段antd的table column描述代码放到另一个单独的ts文件里就会报错无法编译render中的jsx语法
export const column: TableColumnType<any>[] = [
...,
{
title: 'operation',
dataIndex: 'operation',
render: (_, record: { key: React.Key }) => (
<Typography.Link>
Edit
</Typography.Link>
),
},
]
这种情况有没有解决方法?
我的解决方法是另新建一个
renderTsx.tsx
文件然后在ts文件里import这个方法
有没有别的不用import的方法?