Merge pull request #4040 from zhyc9de/feat-crud.selected

feat: CURD 支持显示已选择条数
This commit is contained in:
RUNZE LU 2022-04-14 14:08:09 +08:00 committed by GitHub
commit e5c3dcfe66
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 4 deletions

View File

@ -37,7 +37,7 @@ register('de-DE', {
'CRUD.exportExcel': 'In Excel exportieren', 'CRUD.exportExcel': 'In Excel exportieren',
'CRUD.fetchFailed': 'Fehler beim Abrufen', 'CRUD.fetchFailed': 'Fehler beim Abrufen',
'CRUD.filter': 'Filtern', 'CRUD.filter': 'Filtern',
'CRUD.selected': 'Ausgewählte Elemente: ', 'CRUD.selected': 'Ausgewählte {{total}} Elemente: ',
'CRUD.invalidArray': '"data.items" muss ein Array sein', 'CRUD.invalidArray': '"data.items" muss ein Array sein',
'CRUD.invalidData': '"data" ist leer', 'CRUD.invalidData': '"data" ist leer',
'CRUD.loadMore': 'Weitere laden', 'CRUD.loadMore': 'Weitere laden',

View File

@ -34,7 +34,7 @@ register('en-US', {
'CRUD.exportExcel': 'Export Excel', 'CRUD.exportExcel': 'Export Excel',
'CRUD.fetchFailed': 'Fetch failed', 'CRUD.fetchFailed': 'Fetch failed',
'CRUD.filter': 'Filter', 'CRUD.filter': 'Filter',
'CRUD.selected': 'selected items: ', 'CRUD.selected': 'selected {{total}} items: ',
'CRUD.invalidArray': 'data.items must be an array', 'CRUD.invalidArray': 'data.items must be an array',
'CRUD.invalidData': 'data is empty', 'CRUD.invalidData': 'data is empty',
'CRUD.loadMore': 'Load more', 'CRUD.loadMore': 'Load more',

View File

@ -37,7 +37,7 @@ register('zh-CN', {
'CRUD.exportExcel': '导出 Excel', 'CRUD.exportExcel': '导出 Excel',
'CRUD.fetchFailed': '获取失败', 'CRUD.fetchFailed': '获取失败',
'CRUD.filter': '筛选', 'CRUD.filter': '筛选',
'CRUD.selected': '已选', 'CRUD.selected': '已选{{total}}条:',
'CRUD.invalidArray': 'data.items 必须是数组', 'CRUD.invalidArray': 'data.items 必须是数组',
'CRUD.invalidData': '返回数据格式不正确data 没有数据', 'CRUD.invalidData': '返回数据格式不正确data 没有数据',
'CRUD.loadMore': '加载更多', 'CRUD.loadMore': '加载更多',

View File

@ -1993,7 +1993,9 @@ export default class CRUD extends React.Component<CRUDProps, any> {
return ( return (
<div className={cx('Crud-selection')}> <div className={cx('Crud-selection')}>
<div className={cx('Crud-selectionLabel')}>{__('CRUD.selected')}</div> <div className={cx('Crud-selectionLabel')}>
{__('CRUD.selected', {total: store.selectedItems.length})}
</div>
{store.selectedItems.map((item, index) => ( {store.selectedItems.map((item, index) => (
<div key={index} className={cx(`Crud-value`)}> <div key={index} className={cx(`Crud-value`)}>
<span <span