From 55ca15bdc63ba0a5b1da6b40f89dd49b2dd99335 Mon Sep 17 00:00:00 2001 From: jialin Date: Thu, 5 Sep 2024 12:03:19 +0800 Subject: [PATCH] style: editable cell input width --- .../seal-table/components/seal-column.tsx | 94 ++++++++++--------- 1 file changed, 48 insertions(+), 46 deletions(-) diff --git a/src/components/seal-table/components/seal-column.tsx b/src/components/seal-table/components/seal-column.tsx index 9757fa98..2f154fff 100644 --- a/src/components/seal-table/components/seal-column.tsx +++ b/src/components/seal-table/components/seal-column.tsx @@ -40,7 +40,7 @@ const SealColumn: React.FC = (props) => { if (isEditing && editable) { return valueType === 'number' ? ( { @@ -69,60 +69,62 @@ const SealColumn: React.FC = (props) => { 'cell-right': align === 'right' })} > - {renderContent()} - {editable && ( - <> - {isEditing ? ( - <> + + {renderContent()} + {editable && ( + + {isEditing ? ( + <> + + + + + + + + ) : ( + {intl.formatMessage({ id: 'common.button.edit' })} + {title} + + } > - - - - - ) : ( - - {intl.formatMessage({ id: 'common.button.edit' })} - {title} - - } - > - - - )} - - )} + )} + + )} + ); };