✨ 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:
@@ -20,6 +20,7 @@ import {
|
||||
Card,
|
||||
Divider,
|
||||
Dropdown,
|
||||
Empty,
|
||||
Form,
|
||||
Modal,
|
||||
Space,
|
||||
@@ -27,6 +28,10 @@ import {
|
||||
Tag,
|
||||
Typography
|
||||
} from '@douyinfe/semi-ui';
|
||||
import {
|
||||
IllustrationNoResult,
|
||||
IllustrationNoResultDark
|
||||
} from '@douyinfe/semi-illustrations';
|
||||
import {
|
||||
IconPlus,
|
||||
IconSearch,
|
||||
@@ -640,6 +645,14 @@ const UsersTable = () => {
|
||||
}}
|
||||
loading={loading}
|
||||
onRow={handleRow}
|
||||
empty={
|
||||
<Empty
|
||||
image={<IllustrationNoResult style={{ width: 150, height: 150 }} />}
|
||||
darkModeImage={<IllustrationNoResultDark style={{ width: 150, height: 150 }} />}
|
||||
description={t('搜索无结果')}
|
||||
style={{ padding: 30 }}
|
||||
/>
|
||||
}
|
||||
className="rounded-xl overflow-hidden"
|
||||
size="middle"
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user