mirror of https://github.com/openspug/spug
U 统一页面风格
parent
045dc4281a
commit
474aa4af3d
|
@ -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'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}),
|
||||||
);
|
);
|
||||||
|
|
|
@ -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';
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
@import '~antd/dist/antd.css';
|
@import '~antd/dist/antd.less';
|
||||||
|
|
||||||
body {
|
body {
|
||||||
margin: 0;
|
margin: 0;
|
|
@ -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
|
||||||
|
|
|
@ -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}/>
|
||||||
|
|
|
@ -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 |
Loading…
Reference in New Issue