feat(frontend): add frontend-v2 modular architecture (Task 17)
- React 19 + TypeScript + Vite - Module registration mechanism with dynamic loading - Permission management system (basic/advanced/premium) - Route guards for access control - Error boundaries for module isolation - 6 business module placeholders (AIA/ASL/PKB/DC/SSA/ST) - Top navigation layout - Tailwind CSS 3 + Ant Design 5
This commit is contained in:
48
frontend-v2/src/shared/components/Placeholder.tsx
Normal file
48
frontend-v2/src/shared/components/Placeholder.tsx
Normal file
@@ -0,0 +1,48 @@
|
||||
import { Result, Button } from 'antd'
|
||||
import { useNavigate } from 'react-router-dom'
|
||||
import { RocketOutlined } from '@ant-design/icons'
|
||||
|
||||
interface PlaceholderProps {
|
||||
title?: string
|
||||
description?: string
|
||||
moduleName?: string
|
||||
}
|
||||
|
||||
const Placeholder = ({
|
||||
title = '功能开发中',
|
||||
description = '该模块正在规划和开发中,敬请期待',
|
||||
moduleName
|
||||
}: PlaceholderProps) => {
|
||||
const navigate = useNavigate()
|
||||
|
||||
return (
|
||||
<div className="flex-1 flex items-center justify-center bg-gray-50">
|
||||
<Result
|
||||
icon={<RocketOutlined style={{ fontSize: 72, color: '#1890ff' }} />}
|
||||
title={<span className="text-2xl">{title}</span>}
|
||||
subTitle={
|
||||
<div className="space-y-2">
|
||||
<p className="text-gray-600">{description}</p>
|
||||
{moduleName && (
|
||||
<p className="text-sm text-gray-400">
|
||||
模块名称:{moduleName}
|
||||
</p>
|
||||
)}
|
||||
</div>
|
||||
}
|
||||
extra={
|
||||
<Button type="primary" onClick={() => navigate('/')}>
|
||||
返回首页
|
||||
</Button>
|
||||
}
|
||||
/>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default Placeholder
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user