diff --git a/config/config.ts b/config/config.ts index 071b6d7e..8e4f61d1 100644 --- a/config/config.ts +++ b/config/config.ts @@ -8,6 +8,9 @@ import routes from './routes'; const { REACT_APP_ENV = 'dev' } = process.env; export default defineConfig({ + alias: { + config: '/config', + }, // 解决刷新 404 找不到该页面的情况。 exportStatic: { // 忽略预渲染失败的错误 @@ -82,7 +85,7 @@ export default defineConfig({ * @name layout 插件 * @doc https://umijs.org/docs/max/layout-menu */ - title: 'Evil Pro Cli', + title: defaultSettings?.title, layout: { locale: true, ...defaultSettings, diff --git a/config/defaultSettings.ts b/config/defaultSettings.ts index 13bad97f..500a65f4 100644 --- a/config/defaultSettings.ts +++ b/config/defaultSettings.ts @@ -26,7 +26,7 @@ const defaultSettings: ProLayoutProps & { colorTextMenuItemHover: '#13c2c2', }, header: { - colorTextRightActionsItem: 'rgba(0, 0, 0, 0.88)', + colorTextRightActionsItem: 'red', }, }, }; diff --git a/package.json b/package.json index c3704784..45f26911 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "evil-pro-cli", - "version": "6.6.0", + "version": "1.1.0", "description": "An out-of-box UI solution for enterprise applications", "scripts": { "analyze": "cross-env ANALYZE=1 max build", @@ -31,7 +31,8 @@ "test": "jest", "test:coverage": "npm run jest -- --coverage", "test:update": "npm run jest -- -u", - "tsc": "tsc --noEmit" + "tsc": "tsc --noEmit", + "update-setting": "node update.js `Evil Pro Cli`" }, "lint-staged": { "**/*.{js,jsx,ts,tsx}": "npm run lint-staged:js", diff --git a/public/scripts/loading.js b/public/scripts/loading.js index c1ced54c..42ea5858 100644 --- a/public/scripts/loading.js +++ b/public/scripts/loading.js @@ -43,7 +43,7 @@ margin: 0; padding: 0; color: rgba(0, 0, 0, 0.65); - color: #1890ff; + color: #13c2c2; font-size: 14px; font-variant: tabular-nums; line-height: 1.5; @@ -80,7 +80,7 @@ display: block; width: 9px; height: 9px; - background-color: #1890ff; + background-color: #13c2c2; border-radius: 100%; -webkit-transform: scale(0.75); -ms-transform: scale(0.75); diff --git a/src/components/Footer/index.tsx b/src/components/Footer/index.tsx index 111dfcf9..46b60541 100644 --- a/src/components/Footer/index.tsx +++ b/src/components/Footer/index.tsx @@ -1,8 +1,9 @@ import { DefaultFooter } from '@ant-design/pro-components'; +import defaultSettings from 'config/defaultSettings'; import React from 'react'; const Footer: React.FC = () => { - const defaultMessage = 'Evil Pro Cli'; + const defaultMessage = defaultSettings?.title; const currentYear = new Date().getFullYear(); const branchName = process.env.FRONTEND_BRANCH_NAME || 'release_v1.0.0'; const version = branchName.replace('release_', ''); diff --git a/src/pages/User/Login/index.tsx b/src/pages/User/Login/index.tsx index d58f55e7..d8410575 100644 --- a/src/pages/User/Login/index.tsx +++ b/src/pages/User/Login/index.tsx @@ -5,10 +5,9 @@ import { Helmet, history } from '@umijs/max'; import classNames from 'classnames/bind'; import React from 'react'; -import defaultSettings from '../../../../config/defaultSettings'; - import { login } from '@/services/evil-pro-cli/login'; import { message } from 'antd'; +import defaultSettings from 'config/defaultSettings'; import styles from './index.less'; const cx = classNames.bind(styles); @@ -47,7 +46,7 @@ const Login: React.FC = () => { maxWidth: '75vw', }} logo={logo} - title="Evil Pro Cli" + title={defaultSettings?.title} onFinish={async (values) => { await handleSubmit(values as any); }} diff --git a/src/pages/Welcome.tsx b/src/pages/Welcome.tsx index 60e219a3..75e014db 100644 --- a/src/pages/Welcome.tsx +++ b/src/pages/Welcome.tsx @@ -1,6 +1,7 @@ import { PageContainer } from '@ant-design/pro-components'; import { useModel } from '@umijs/max'; import { Card, theme } from 'antd'; +import defaultSettings from 'config/defaultSettings'; import React from 'react'; /** @@ -114,7 +115,7 @@ const Welcome: React.FC = () => { color: token.colorTextHeading, }} > - 欢迎使用 Evil Pro Cli + 欢迎使用 {defaultSettings?.title}

{ width: '65%', }} > - Evil Pro Cli 是一个整合了 umi,Ant Design 和 ProComponents + {defaultSettings?.title} 是一个整合了 umi,Ant Design 和 ProComponents 的脚手架方案。致力于在设计规范和基础组件的基础上,继续向上构建,提炼出典型模板/业务组件/配套设计资源,进一步提升企业级中后台产品设计研发过程中的『用户』和『设计者』的体验。