BUG分析表格
// import { ProFormInstance } from '@ant-design/pro-form'; import React, { ForwardedRef, forwardRef, useEffect, useRef, useState } from 'react'; import ContentCard from '@/components/ContentCard'; import { ActionType, EditableProTable, ProColumns } from '@ant-design/pro-table'; import ProForm, { ProFormTextArea } from '@ant-design/pro-form'; import './index.less';
export type BugFormRef = {
getApplicationFormValue?: () => any;
validateApplicationForm: () => Promise
interface Props {
ref?: ForwardedRef
const datas = [ {
key: 0,
title: '新增BUG总数',
totals: '1',
s: '0',
a: '1',
b: '0',
c: '0',
}, {
key: 1,
title: 'PEN BUG总数',
totals: '0',
s: '0',
a: '0',
b: '0',
c: '0',
},
];
const BugAnalysis: React.FC
const columns: ProColumns[] = [ { title: 'BUG等级', dataIndex: 'title', align: 'center', mergeCells: true, }, { title: '总数', dataIndex: 'totals', align: 'center', readonly: true, }, { title: 'S', dataIndex: 's', align: 'center', readonly: true, }, { title: 'A', dataIndex: 'a', align: 'center', readonly: true, }, { title: 'B', dataIndex: 'b', align: 'center', readonly: true, }, { title: 'C', dataIndex: 'c', align: 'center', readonly: true, }, { title: 'BUG分析', dataIndex: 'bug', align: 'center', readonly: true, }, ];
useEffect(() => {
setEditableRowKeys(datas?.map((item: any) => item.id));
setData([...datas]);
}, []);
return (
${startIndex}-${endIndex}-0-0] = [startIndex, endIndex, 0, 0];
}
prevTitle = title;
startIndex = index;
}
endIndex = index;
});
if (prevTitle !== null && endIndex > startIndex) {
mergedCells[${startIndex}-${endIndex}-0-0] = [startIndex, endIndex, 0, 0];
}
return mergedCells;
}}
/>
</ContentCard>
); }); export default BugAnalysis;
原文地址: https://www.cveoy.top/t/topic/qm22 著作权归作者所有。请勿转载和采集!