Commit be4f22ef authored by zhangwenshuai's avatar zhangwenshuai

修改展开逻辑

parent cf013df5
......@@ -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 {
......
......@@ -340,6 +340,7 @@ export default class AirTable extends Component<TableProps, TableState> {
emitChangeCell,
paginationConfig,
showIndex,
showExpand,
emptyPlaceholder,
cellEditable,
rowSelection,
......@@ -402,6 +403,7 @@ export default class AirTable extends Component<TableProps, TableState> {
columns={columns}
paginationConfig={paginationConfig}
showIndex={position === 'right' ? false : showIndex}
showExpand={showExpand}
emptyPlaceholder={emptyPlaceholder}
cellEditable={cellEditable}
rowSelection={position === 'right' ? false : rowSelection}
......
......@@ -67,6 +67,7 @@ class AirTable extends React.Component<CommonProps, CommonState> {
operateConfig,
paginationConfig,
showIndex,
showExpand,
emptyPlaceholder,
cellEditable,
rowHeight,
......@@ -108,6 +109,7 @@ class AirTable extends React.Component<CommonProps, CommonState> {
sortConfig={sortConfig}
paginationConfig={paginationConfig}
showIndex={showIndex}
showExpand={showExpand}
emptyPlaceholder={emptyPlaceholder}
cellEditable={cellEditable}
rowHeight={rowHeight}
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment