mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-05-05 05:29:26 +08:00
Merge branch 'main' into refactor/remove-rowKey
This commit is contained in:
commit
302b159010
@ -70,6 +70,15 @@ const subTableContainer = css`
|
|||||||
.ant-table-thead .ant-table-cell {
|
.ant-table-thead .ant-table-cell {
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
}
|
}
|
||||||
|
.ant-pagination {
|
||||||
|
position: absolute;
|
||||||
|
right: 0px;
|
||||||
|
bottom: 0px;
|
||||||
|
}
|
||||||
|
.ant-table-footer {
|
||||||
|
margin-top: 10px;
|
||||||
|
background: inherit;
|
||||||
|
}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
const tableClassName = css`
|
const tableClassName = css`
|
||||||
@ -252,37 +261,39 @@ export const SubTable: any = observer(
|
|||||||
locale={{
|
locale={{
|
||||||
emptyText: <span> {field.editable ? t('Please add or select record') : t('No data')}</span>,
|
emptyText: <span> {field.editable ? t('Please add or select record') : t('No data')}</span>,
|
||||||
}}
|
}}
|
||||||
|
footer={() => (
|
||||||
|
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}>
|
||||||
|
{field.editable && (
|
||||||
|
<Space
|
||||||
|
style={{
|
||||||
|
gap: 15,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{allowAddnew !== false && (
|
||||||
|
<Action.Link
|
||||||
|
useAction={useSubTableAddNewProps}
|
||||||
|
title={
|
||||||
|
<Space style={{ gap: 2 }} className="nb-sub-table-addNew">
|
||||||
|
<PlusOutlined /> {t('Add new')}
|
||||||
|
</Space>
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
{allowSelectExistingRecord && (
|
||||||
|
<Action.Link
|
||||||
|
useAction={useSubTableSelectProps}
|
||||||
|
title={
|
||||||
|
<Space style={{ gap: 2 }}>
|
||||||
|
<ZoomInOutlined /> {t('Select record')}
|
||||||
|
</Space>
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
</Space>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
/>
|
/>
|
||||||
{field.editable && (
|
|
||||||
<Space
|
|
||||||
style={{
|
|
||||||
position: 'relative',
|
|
||||||
bottom: '0',
|
|
||||||
gap: 15,
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{allowAddnew !== false && (
|
|
||||||
<Action.Link
|
|
||||||
useAction={useSubTableAddNewProps}
|
|
||||||
title={
|
|
||||||
<Space style={{ gap: 2 }} className="nb-sub-table-addNew">
|
|
||||||
<PlusOutlined /> {t('Add new')}
|
|
||||||
</Space>
|
|
||||||
}
|
|
||||||
/>
|
|
||||||
)}
|
|
||||||
{allowSelectExistingRecord && (
|
|
||||||
<Action.Link
|
|
||||||
useAction={useSubTableSelectProps}
|
|
||||||
title={
|
|
||||||
<Space style={{ gap: 2 }}>
|
|
||||||
<ZoomInOutlined /> {t('Select record')}
|
|
||||||
</Space>
|
|
||||||
}
|
|
||||||
/>
|
|
||||||
)}
|
|
||||||
</Space>
|
|
||||||
)}
|
|
||||||
</SubFormProvider>
|
</SubFormProvider>
|
||||||
</FormActiveFieldsProvider>
|
</FormActiveFieldsProvider>
|
||||||
</CollectionRecordProvider>
|
</CollectionRecordProvider>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user