// 多种配置
{
title: (_, type) => {
if (type === 'table') {
return '商户名称';
}
return '商户'; // 搜索框label
},
hideInSearch: false,
hideInForm: false,
hideInTable: false,
align: 'center',
dataIndex: 'name',
renderText: (val) => val || '-',
}
//搜索栏 下拉选择 valueType: 'select',
{
title: '运营中心',
dataIndex: 'merchantId',
valueType: 'select',
fieldProps: {
options: operateOption, // 动态变量项
},
hideInTable: true // 列表隐藏
},
// 搜索栏 时间区间 valueType: 'dateRange',
{
title: '合同签订日期',
dataIndex: 'contractDate',
valueType: 'dateRange',
hideInTable: true // 列表隐藏
},
{
title: '品牌名称',
dataIndex: 'brandName',
fixed: 'left',
width: 250,
hideInSearch: true, // 搜索栏 隐藏
},
// 下拉选项 枚举 valueEnum
{
title: '合同状态',
dataIndex: 'contractStatus',
align: 'center',
valueEnum: statusOptionEnum,
width: 200,
},
// 操作 valueType: 'option',
{
title: '操作',
dataIndex: 'option',
valueType: 'option',
render: (_, record) => [
<a
key="view"
onClick={() => {
setCurrentRow(record);
setViewVisible(true);
}}
>
查看
</a>,
<a
key="del"
onClick={() => {
requestDel(record.id);
}}
>
删除
</a>,
],
},