diff --git a/components/apolloTable/component/Cell.tsx b/components/apolloTable/component/Cell.tsx index 54d4d3eeaf48ebeca508b0c0475b1ecea9903a83..c873ab3b6cc6dd632fae20438939fd7469ef4985 100644 --- a/components/apolloTable/component/Cell.tsx +++ b/components/apolloTable/component/Cell.tsx @@ -60,7 +60,7 @@ const Cell = (props: CellProps) => { } }; - const turnIntoEditStatus = (data:any) => { + const turnIntoEditStatus = (data: any) => { setStatus('edit'); if (typeof onEmitMsg === 'function') { onEmitMsg({ ...data, status: EDIT_STATUS.EDITING }); @@ -80,9 +80,10 @@ const Cell = (props: CellProps) => { return; } let temp: CellDataProps[] = []; - cellData && cellData.map((item: CellDataProps) => { - temp.push({ text: item.text, value: item.value }); - }); + cellData && + cellData.map((item: CellDataProps) => { + temp.push({ text: item.text, value: item.value }); + }); if (temp.length === 0) { temp = emptyModel; } @@ -132,8 +133,8 @@ const Cell = (props: CellProps) => { const { current = 1, pageSize = 20 } = paginationConfig || {}; // 构造序号 const getIndex = () => { - if(typeof showIndex === 'function'){ - return showIndex(props) + if (typeof showIndex === 'function') { + return showIndex(props); } return (current - 1) * pageSize + rowIndex + 1; }; @@ -196,9 +197,7 @@ const Cell = (props: CellProps) => { /> )} - { - renderFirstLeft&&renderFirstLeft({record}) - } + {renderFirstLeft && renderFirstLeft({ record })} ); }; @@ -225,7 +224,7 @@ const Cell = (props: CellProps) => { } else { detailConfig = config[String(columnType)] || config['1']; } - if(Number(columnType)===8){ + if (Number(columnType) === 8) { empty = false; } const DetailComp: any = detailConfig.detailComp; @@ -243,12 +242,17 @@ const Cell = (props: CellProps) => {