diff --git a/components/apolloTable/component/Cell.tsx b/components/apolloTable/component/Cell.tsx index d1a8fb4a9da7924a6716dc49484265f3d86f077f..96c5f8e87dd1e4292a43afa20df6e33a53018a89 100644 --- a/components/apolloTable/component/Cell.tsx +++ b/components/apolloTable/component/Cell.tsx @@ -27,6 +27,7 @@ const Cell = (props: CellProps) => { rowIndex, paginationConfig, showIndex, + showExpand, emptyPlaceholder, cellEditable, rowSelection, @@ -45,7 +46,6 @@ const Cell = (props: CellProps) => { renderEditCell, cellRenderProps, readOnlyFlag, - showExpand, } = columnConfig; const [status, setStatus] = useState('detail'); @@ -174,9 +174,9 @@ const Cell = (props: CellProps) => { } onClick={() => { // 不可编辑状态 - // if (!cellEditable || readOnlyFlag || (dynamicCellConfigDTO && dynamicCellConfigDTO.readonlyFlag)) { - // return false; - // } + if (!cellEditable || readOnlyFlag || (dynamicCellConfigDTO && dynamicCellConfigDTO.readonlyFlag)) { + return false; + } if (selectedCell === `${position}_${cellKey}`) { setStatus('edit'); } else { diff --git a/components/apolloTable/component/Table.tsx b/components/apolloTable/component/Table.tsx index a93c99a4088054bef1482f9bdaafa8ab0298d6d2..41fcdadeed929f52c8406f5cf8cd7f1079c7a37f 100644 --- a/components/apolloTable/component/Table.tsx +++ b/components/apolloTable/component/Table.tsx @@ -340,6 +340,7 @@ export default class AirTable extends Component { emitChangeCell, paginationConfig, showIndex, + showExpand, emptyPlaceholder, cellEditable, rowSelection, @@ -402,6 +403,7 @@ export default class AirTable extends Component { columns={columns} paginationConfig={paginationConfig} showIndex={position === 'right' ? false : showIndex} + showExpand={showExpand} emptyPlaceholder={emptyPlaceholder} cellEditable={cellEditable} rowSelection={position === 'right' ? false : rowSelection} diff --git a/components/apolloTable/component/index.tsx b/components/apolloTable/component/index.tsx index eb6d3f76d521e86875b4efbed632cb21bc9a2520..559db752de45c9b9839a346585ceb0e4dc7b0c6f 100644 --- a/components/apolloTable/component/index.tsx +++ b/components/apolloTable/component/index.tsx @@ -67,6 +67,7 @@ class AirTable extends React.Component { operateConfig, paginationConfig, showIndex, + showExpand, emptyPlaceholder, cellEditable, rowHeight, @@ -108,6 +109,7 @@ class AirTable extends React.Component { sortConfig={sortConfig} paginationConfig={paginationConfig} showIndex={showIndex} + showExpand={showExpand} emptyPlaceholder={emptyPlaceholder} cellEditable={cellEditable} rowHeight={rowHeight} diff --git a/components/apolloTable/component/interface.tsx b/components/apolloTable/component/interface.tsx index 25ec7d0fa0f4963b89bc440d97824bf7afdc9eb3..04c331ace4ac3c3ae158fd472dd02ec768153a54 100644 --- a/components/apolloTable/component/interface.tsx +++ b/components/apolloTable/component/interface.tsx @@ -62,6 +62,7 @@ export interface TableProps extends LoadConfigProps { sortConfig?: any; paginationConfig?: any; showIndex?: boolean; + showExpand?: Function; emptyPlaceholder?: string; cellEditable?: boolean; rowHeight?: number; @@ -116,6 +117,7 @@ export interface CellProps { hasFixed?: boolean; paginationConfig?: any; showIndex?: boolean; + showExpand?: Function; emptyPlaceholder?: string; cellEditable?: boolean; rowSelection?: any;