feat: 修改主题
This commit is contained in:
parent
3dde45bf37
commit
7997a2f98b
|
|
@ -1,7 +1,9 @@
|
|||
import RightContent from '@/components/RightContent';
|
||||
import themes from '@/styles/theme.less';
|
||||
import type { Settings as LayoutSettings } from '@ant-design/pro-components';
|
||||
import type { RunTimeLayoutConfig } from '@umijs/max';
|
||||
import { history } from '@umijs/max';
|
||||
import { RuntimeAntdConfig } from 'umi';
|
||||
import defaultSettings from '../config/defaultSettings';
|
||||
import '../public/fonts/font.css';
|
||||
import { getAccessToken } from './access';
|
||||
|
|
@ -182,3 +184,24 @@ export function render(oldRender: () => void) {
|
|||
oldRender();
|
||||
});
|
||||
}
|
||||
|
||||
// 主题修改
|
||||
export const antd: RuntimeAntdConfig = (memo) => {
|
||||
memo.theme ??= {};
|
||||
memo.theme.token = {
|
||||
colorPrimary: themes['primaryColor'],
|
||||
};
|
||||
memo.theme.components ??= {};
|
||||
memo.theme.components.Tabs = {};
|
||||
// memo.theme.cssVar = true;
|
||||
// memo.theme.hashed = false;
|
||||
|
||||
// memo.appConfig = {
|
||||
// message: {
|
||||
// // 配置 message 最大显示数,超过限制时,最早的消息会被自动关闭
|
||||
// maxCount: 3,
|
||||
// },
|
||||
// };
|
||||
|
||||
return memo;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,6 +1,12 @@
|
|||
// 全局颜色变量
|
||||
// FIXME: 不能设置 @primary-color 不起作用,感觉是哪里被重置了
|
||||
@kf-primary-color: #1664ff; // 主色调
|
||||
@text-color: #1d1d20;
|
||||
@font-size: 15px;
|
||||
@border-color: rgba(22, 100, 255, 0.3);
|
||||
@border-color-second: rgba(22, 100, 255, 0.1);
|
||||
@background-color-primay: rgba(22, 100, 255, 0.03);
|
||||
@background-color-gray: rgba(4, 3, 3, 0.06);
|
||||
|
||||
// 导出变量
|
||||
:export {
|
||||
|
|
|
|||
Loading…
Reference in New Issue