export default [ { title: "可编辑表格", screenshot: require("./__screenshots__/protable.png"), schema: { componentName: "BlEditableProTable", props: { "tableData": { "result": [ { id: 624748504, title: '活动名称一', readonly: '活动名称一', decs: '这个活动真好玩', state: 'open', created_at: '2020-05-26T09:42:56Z', update_at: '2020-05-26T09:42:56Z', }, { id: 624691229, title: '活动名称二', readonly: '活动名称二', decs: '这个活动真好玩', state: 'closed', created_at: '2020-05-26T08:19:22Z', update_at: '2020-05-26T08:19:22Z', }, ], "total": 2 }, "columns": [ { title: '活动名称', dataIndex: 'title', tooltip: '只读,使用form.getFieldValue获取不到值', formItemProps: (form, { rowIndex }) => { return { rules: rowIndex > 1 ? [{ required: true, message: '此项为必填项' }] : [], }; }, // 第一行不允许编辑 editable: (text, record, index) => { return index !== 0; }, width: '15%', }, { title: '活动名称二', dataIndex: 'readonly', tooltip: '只读,使用form.getFieldValue可以获取到值', readonly: true, width: '15%', }, { title: '状态', key: 'state', dataIndex: 'state', valueType: 'select', valueEnum: { all: { text: '全部', status: 'Default' }, open: { text: '未解决', status: 'Error', }, closed: { text: '已解决', status: 'Success', }, }, }, { title: '描述', dataIndex: 'decs', fieldProps: (from, { rowKey, rowIndex }) => { if (from.getFieldValue([rowKey || '', 'title']) === '不好玩') { return { disabled: true, }; } if (rowIndex > 9) { return { disabled: true, }; } return {}; }, }, { title: '活动时间', dataIndex: 'created_at', valueType: 'date', }, ], "columnActionName": "操作", "columnActionButtonWidth": 170, "lockRowType": "right", "columnButtonNum": 2, "columnButtonWidth": 140, "columnButtons": [ { "btnName": "修改", "btnType": "link" }, { "btnName": "删除", "btnType": "link" } ], "tableControlButtonNum": 3, "tableControlButtonWidth": 140, "tableControlButtons": [ { "btnName": "新增", "btnType": 1 }, { "btnName": "修改", "btnType": 1 }, { "btnName": "删除", "btnType": 1 } ], "isPage": true, "isBordered": true } } } ];