feat(platform): add vehicle data management console
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
import { Empty } from '@douyinfe/semi-ui';
|
||||
|
||||
export function DataEmpty({ text = '暂无数据' }: { text?: string }) {
|
||||
return <Empty description={text} style={{ padding: 48 }} />;
|
||||
}
|
||||
12
vehicle-data-platform/apps/web/src/components/PageHeader.tsx
Normal file
12
vehicle-data-platform/apps/web/src/components/PageHeader.tsx
Normal file
@@ -0,0 +1,12 @@
|
||||
import { Typography } from '@douyinfe/semi-ui';
|
||||
|
||||
export function PageHeader({ title, description }: { title: string; description: string }) {
|
||||
return (
|
||||
<div style={{ marginBottom: 16 }}>
|
||||
<Typography.Title heading={3} style={{ margin: 0 }}>
|
||||
{title}
|
||||
</Typography.Title>
|
||||
<Typography.Text type="tertiary">{description}</Typography.Text>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
11
vehicle-data-platform/apps/web/src/components/StatusTag.tsx
Normal file
11
vehicle-data-platform/apps/web/src/components/StatusTag.tsx
Normal file
@@ -0,0 +1,11 @@
|
||||
import { Tag } from '@douyinfe/semi-ui';
|
||||
|
||||
export function StatusTag({ status }: { status: 'ok' | 'warning' | 'error' | 'offline' }) {
|
||||
const map = {
|
||||
ok: { color: 'green' as const, text: '正常' },
|
||||
warning: { color: 'orange' as const, text: '关注' },
|
||||
error: { color: 'red' as const, text: '异常' },
|
||||
offline: { color: 'grey' as const, text: '离线' }
|
||||
};
|
||||
return <Tag color={map[status].color}>{map[status].text}</Tag>;
|
||||
}
|
||||
Reference in New Issue
Block a user