57 lines
1.4 KiB
TypeScript
57 lines
1.4 KiB
TypeScript
|
|
// React 17+ 使用新的JSX转换,无需显式导入React
|
|||
|
|
import { Provider } from 'react-redux'
|
|||
|
|
import { ConfigProvider, App as AntdApp } from 'antd'
|
|||
|
|
import zhCN from 'antd/locale/zh_CN'
|
|||
|
|
import { store } from './store/store'
|
|||
|
|
import RemoteControlApp from './components/RemoteControlApp'
|
|||
|
|
import AuthGuard from './components/AuthGuard'
|
|||
|
|
import './App.css'
|
|||
|
|
|
|||
|
|
/**
|
|||
|
|
* 主应用组件
|
|||
|
|
*/
|
|||
|
|
function App() {
|
|||
|
|
return (
|
|||
|
|
<Provider store={store}>
|
|||
|
|
<ConfigProvider
|
|||
|
|
locale={zhCN}
|
|||
|
|
theme={{
|
|||
|
|
token: {
|
|||
|
|
colorPrimary: '#667eea',
|
|||
|
|
borderRadius: 8,
|
|||
|
|
colorBgContainer: '#ffffff',
|
|||
|
|
colorBgLayout: '#f0f2f5',
|
|||
|
|
fontFamily: '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',
|
|||
|
|
},
|
|||
|
|
components: {
|
|||
|
|
Table: {
|
|||
|
|
headerBg: '#fafafa',
|
|||
|
|
headerColor: '#595959',
|
|||
|
|
rowHoverBg: '#f0f5ff',
|
|||
|
|
borderRadius: 8,
|
|||
|
|
},
|
|||
|
|
Card: {
|
|||
|
|
borderRadiusLG: 12,
|
|||
|
|
},
|
|||
|
|
Button: {
|
|||
|
|
borderRadius: 6,
|
|||
|
|
},
|
|||
|
|
Menu: {
|
|||
|
|
itemBorderRadius: 8,
|
|||
|
|
itemMarginInline: 8,
|
|||
|
|
},
|
|||
|
|
},
|
|||
|
|
}}
|
|||
|
|
>
|
|||
|
|
<AntdApp>
|
|||
|
|
<AuthGuard>
|
|||
|
|
<RemoteControlApp />
|
|||
|
|
</AuthGuard>
|
|||
|
|
</AntdApp>
|
|||
|
|
</ConfigProvider>
|
|||
|
|
</Provider>
|
|||
|
|
)
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
export default App
|