✨ feat(tables): add "No Results" empty state for all table components
Add consistent empty state handling across all table components to improve user experience when search/filter results are empty. Changes: - Import Empty component and IllustrationNoResult/IllustrationNoResultDark from @douyinfe/semi-ui - Add empty prop to Table components with "搜索无结果" message - Support both light and dark theme illustrations - Apply internationalization support for empty state text Affected files: - web/src/components/table/MjLogsTable.js - web/src/components/table/LogsTable.js - web/src/components/table/ChannelsTable.js - web/src/components/table/RedemptionsTable.js - web/src/components/table/TaskLogsTable.js - web/src/components/table/TokensTable.js - web/src/components/table/UsersTable.js - web/src/components/table/ModelPricing.js This ensures consistent UX across all table components when no data matches the current search or filter criteria.
This commit is contained in:
@@ -17,14 +17,19 @@ import {
|
||||
Tabs,
|
||||
TabPane,
|
||||
Dropdown,
|
||||
Empty
|
||||
} from '@douyinfe/semi-ui';
|
||||
import {
|
||||
IllustrationNoResult,
|
||||
IllustrationNoResultDark
|
||||
} from '@douyinfe/semi-illustrations';
|
||||
import {
|
||||
IconVerify,
|
||||
IconHelpCircle,
|
||||
IconSearch,
|
||||
IconCopy,
|
||||
IconInfoCircle,
|
||||
IconLayers,
|
||||
IconLayers
|
||||
} from '@douyinfe/semi-icons';
|
||||
import { UserContext } from '../../context/User/index.js';
|
||||
import { AlertCircle } from 'lucide-react';
|
||||
@@ -489,6 +494,14 @@ const ModelPricing = () => {
|
||||
loading={loading}
|
||||
rowSelection={rowSelection}
|
||||
className="custom-table"
|
||||
empty={
|
||||
<Empty
|
||||
image={<IllustrationNoResult style={{ width: 150, height: 150 }} />}
|
||||
darkModeImage={<IllustrationNoResultDark style={{ width: 150, height: 150 }} />}
|
||||
description={t('搜索无结果')}
|
||||
style={{ padding: 30 }}
|
||||
/>
|
||||
}
|
||||
pagination={{
|
||||
defaultPageSize: 10,
|
||||
pageSize: pageSize,
|
||||
|
||||
Reference in New Issue
Block a user