1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
| import React from 'react';
| import ReactDOM from 'react-dom/client';
| import { App as AntdApp, ConfigProvider } from 'antd';
| import zhCN from 'antd/locale/zh_CN';
| import dayjs from 'dayjs';
| import 'dayjs/locale/zh-cn';
| import { BrowserRouter } from 'react-router-dom';
| import AntdAppBridge from '@/components/AntdAppBridge';
| import AppRouter from '@/router';
| import '@/styles/global.scss';
|
| dayjs.locale('zh-cn');
|
| ReactDOM.createRoot(document.getElementById('root')!).render(
| <React.StrictMode>
| <ConfigProvider
| locale={zhCN}
| theme={{
| token: {
| colorPrimary: '#4f46e5',
| colorInfo: '#4f46e5',
| borderRadius: 8,
| fontFamily:
| "-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif",
| },
| components: {
| Layout: {
| headerBg: '#ffffff',
| siderBg: '#ffffff',
| bodyBg: '#f5f6fa',
| },
| Menu: {
| itemBorderRadius: 8,
| itemSelectedBg: '#eef2ff',
| itemSelectedColor: '#4338ca',
| itemHoverBg: '#f5f6fa',
| },
| Drawer: {
| // 底部按钮区与内容区保持一致的留白,避免按钮贴边。
| footerPaddingBlock: 16,
| footerPaddingInline: 24,
| },
| },
| }}
| >
| <AntdApp>
| <AntdAppBridge />
| <BrowserRouter>
| <AppRouter />
| </BrowserRouter>
| </AntdApp>
| </ConfigProvider>
| </React.StrictMode>,
| );
|
|