antd的ProColumns设置不可编辑状态的三种方法
方法
1、editable: false方法
const columns: ProColumns<any>[] = [
{
title: '数量',
dataIndex: 'number',
editable: false,
},
];
2、readonly: true方法
const columns: ProColumns<any>[] = [
{
title: '数量',
dataIndex: 'number',
readonly: true,
},
];
3、renderFormItem方法
const columns: ProColumns<any>[] = [
{
title: '数量',
dataIndex: 'number',
renderFormItem: () => {
return <Input disabled/>
}
},
];
效果
前两种方法:

第三种方法:

未设置前效果:
