U 统一页面风格

pull/480/head
vapao 2022-04-03 00:34:39 +08:00
parent 045dc4281a
commit 474aa4af3d
8 changed files with 14 additions and 9 deletions

View File

@ -7,5 +7,12 @@ const {override, addDecoratorsLegacy, addLessLoader} = require('customize-cra');
module.exports = override( module.exports = override(
addDecoratorsLegacy(), addDecoratorsLegacy(),
addLessLoader(), addLessLoader({
lessOptions: {
javascriptEnabled: true,
modifyVars: {
'@primary-color': '#2563fc'
}
}
}),
); );

View File

@ -8,7 +8,7 @@ import ReactDOM from 'react-dom';
import { Router } from 'react-router-dom'; import { Router } from 'react-router-dom';
import { ConfigProvider } from 'antd'; import { ConfigProvider } from 'antd';
import zhCN from 'antd/es/locale/zh_CN'; import zhCN from 'antd/es/locale/zh_CN';
import './index.css'; import './index.less';
import App from './App'; import App from './App';
import moment from 'moment'; import moment from 'moment';
import 'moment/locale/zh-cn'; import 'moment/locale/zh-cn';

View File

@ -1,4 +1,4 @@
@import '~antd/dist/antd.css'; @import '~antd/dist/antd.less';
body { body {
margin: 0; margin: 0;

View File

@ -3,8 +3,7 @@ import { Layout, Menu } from 'antd';
import { hasPermission, history } from 'libs'; import { hasPermission, history } from 'libs';
import styles from './layout.module.less'; import styles from './layout.module.less';
import menus from '../routes'; import menus from '../routes';
import logo from './logo-spug.png'; import logo from './logo-spug-white.png';
import logoText from './logo-text.png';
let selectedKey = window.location.pathname; let selectedKey = window.location.pathname;
const OpenKeysMap = {}; const OpenKeysMap = {};
@ -56,7 +55,6 @@ export default function Sider(props) {
<Layout.Sider width={208} collapsed={props.collapsed} className={styles.sider}> <Layout.Sider width={208} collapsed={props.collapsed} className={styles.sider}>
<div className={styles.logo}> <div className={styles.logo}>
<img src={logo} alt="Logo"/> <img src={logo} alt="Logo"/>
<img src={logoText} alt="logo-text" style={{marginLeft: 25, width: 70}}/>
</div> </div>
<div className={styles.menus} style={{height: `${document.body.clientHeight - 64}px`}}> <div className={styles.menus} style={{height: `${document.body.clientHeight - 64}px`}}>
<Menu <Menu

View File

@ -45,7 +45,7 @@ export default function () {
<Sider collapsed={collapsed}/> <Sider collapsed={collapsed}/>
<Layout style={{height: '100vh'}}> <Layout style={{height: '100vh'}}>
<Header collapsed={collapsed} toggle={() => setCollapsed(!collapsed)}/> <Header collapsed={collapsed} toggle={() => setCollapsed(!collapsed)}/>
<Layout.Content className={styles.content}> <Layout.Content className={styles.content} id="spug-container">
<Switch> <Switch>
{Routes} {Routes}
<Route component={NotFound}/> <Route component={NotFound}/>

View File

@ -98,12 +98,12 @@
.logo { .logo {
height: 64px; height: 64px;
line-height: 64px; line-height: 64px;
padding-left: 15px;
overflow: hidden; overflow: hidden;
text-align: center;
} }
.logo img { .logo img {
width: 50px; height: 30px;
} }
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 887 B