提交 da5a959f 作者: ZhangLingKun

功能:代码规范

上级 83005869
import {Empty, theme} from "antd";
import React from "react";
export const themeConfig = {
algorithm: [theme.compactAlgorithm],
token: {
// fontSize: 12,
},
components: {
// 🌟 这里定制主题,不需要覆盖antd的样式,调试主题可参考:https://ant.design/theme-editor-cn 🌟
// 🌟 这里定制主题,不需要覆盖antd的样式,调试主题可参考:https://ant.design/theme-editor-cn 🌟
// 🌟 这里定制主题,不需要覆盖antd的样式,调试主题可参考:https://ant.design/theme-editor-cn 🌟
// Table: {
// colorBgContainer: "#10151A",
// },
// Input: {
// colorBgContainer: "#020310",
// colorTextPlaceholder: "rgba(255, 255, 255, 0.5)",
// colorBorder: "#316B82",
// },
// Select: {
// colorBgContainer: "#020310",
// colorTextPlaceholder: "rgba(255, 255, 255, 0.5)",
// colorBorder: "#316B82",
// colorBgElevated: "#2C313B",
// },
// TreeSelect: {
// colorBgContainer: "#020310",
// colorTextPlaceholder: "rgba(255, 255, 255, 0.5)",
// colorBorder: "#316B82",
// colorBgElevated: "#2C313B",
// },
// DatePicker: {
// colorBgContainer: "#020310",
// colorTextPlaceholder: "rgba(255, 255, 255, 0.5)",
// colorBorder: "#316B82",
// colorBgElevated: "#2C313B",
// controlItemBgActive: "#1668dc",
// },
// Button: {
// colorBorder: "#316B82",
// colorBgContainer: "#3A4252",
// },
// Tabs: {
// colorBgContainer: "#12181E",
// },
// Modal: {
// colorBgElevated: "#2C313B",
// },
// Dropdown: {
// colorBgElevated: "#2C313B",
// },
// Drawer: {
// colorBgElevated: "#2C313B",
// },
Menu: {
fontSize: 13,
},
},
};
// 空状态定制
export const renderEmpty = () => (
<Empty description="暂无数据" image={Empty.PRESENTED_IMAGE_SIMPLE}/>
);
......@@ -7,6 +7,7 @@ import 'dayjs/locale/zh-cn';
import zhCN from 'antd/locale/zh_CN';
import './assets/style/index.scss';
import dayjs from 'dayjs';
import { themeConfig } from './assets/theme';
dayjs.locale('zh-cn');
......@@ -14,7 +15,7 @@ const root = ReactDOM.createRoot(document.getElementById('root')!);
root.render(
// <React.StrictMode>
<ConfigProvider locale={zhCN}>
<ConfigProvider locale={zhCN} theme={themeConfig} >
<App />
</ConfigProvider>,
// </React.StrictMode>,
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论