Commit 63d96d20 authored by 陈帅's avatar 陈帅

support dark theme

parent abe38651
...@@ -2,6 +2,7 @@ import React, { PureComponent } from 'react'; ...@@ -2,6 +2,7 @@ import React, { PureComponent } from 'react';
import { connect } from 'dva'; import { connect } from 'dva';
import { Dispatch } from 'redux'; import { Dispatch } from 'redux';
import Link from 'umi/link'; import Link from 'umi/link';
import { GridContent } from '@ant-design/pro-layout';
import { RouteChildrenProps } from 'react-router'; import { RouteChildrenProps } from 'react-router';
import { Card, Row, Col, Icon, Avatar, Tag, Divider, Input } from 'antd'; import { Card, Row, Col, Icon, Avatar, Tag, Divider, Input } from 'antd';
import styles from './Center.less'; import styles from './Center.less';
...@@ -154,6 +155,7 @@ class PAGE_NAME_UPPER_CAMEL_CASE extends PureComponent< ...@@ -154,6 +155,7 @@ class PAGE_NAME_UPPER_CAMEL_CASE extends PureComponent<
const { currentUser, currentUserLoading } = this.props; const { currentUser, currentUserLoading } = this.props;
const dataLoading = currentUserLoading || !(currentUser && Object.keys(currentUser).length); const dataLoading = currentUserLoading || !(currentUser && Object.keys(currentUser).length);
return ( return (
<GridContent>
<Row gutter={24}> <Row gutter={24}>
<Col lg={7} md={24}> <Col lg={7} md={24}>
<Card bordered={false} style={{ marginBottom: 24 }} loading={dataLoading}> <Card bordered={false} style={{ marginBottom: 24 }} loading={dataLoading}>
...@@ -210,7 +212,8 @@ class PAGE_NAME_UPPER_CAMEL_CASE extends PureComponent< ...@@ -210,7 +212,8 @@ class PAGE_NAME_UPPER_CAMEL_CASE extends PureComponent<
<div className={styles.team}> <div className={styles.team}>
<div className={styles.teamTitle}>团队</div> <div className={styles.teamTitle}>团队</div>
<Row gutter={36}> <Row gutter={36}>
{currentUser.notice && currentUser.notice.map(item => ( {currentUser.notice &&
currentUser.notice.map(item => (
<Col key={item.id} lg={24} xl={12}> <Col key={item.id} lg={24} xl={12}>
<Link to={item.href}> <Link to={item.href}>
<Avatar size="small" src={item.logo} /> <Avatar size="small" src={item.logo} />
...@@ -236,6 +239,7 @@ class PAGE_NAME_UPPER_CAMEL_CASE extends PureComponent< ...@@ -236,6 +239,7 @@ class PAGE_NAME_UPPER_CAMEL_CASE extends PureComponent<
</Card> </Card>
</Col> </Col>
</Row> </Row>
</GridContent>
); );
} }
} }
......
...@@ -2,6 +2,7 @@ import React, { Component } from 'react'; ...@@ -2,6 +2,7 @@ import React, { Component } from 'react';
import { connect } from 'dva'; import { connect } from 'dva';
import { Dispatch } from 'redux'; import { Dispatch } from 'redux';
import { FormattedMessage } from 'umi-plugin-react/locale'; import { FormattedMessage } from 'umi-plugin-react/locale';
import { GridContent } from '@ant-design/pro-layout';
import { Menu } from 'antd'; import { Menu } from 'antd';
import styles from './style.less'; import styles from './style.less';
import BaseView from './components/base'; import BaseView from './components/base';
...@@ -133,6 +134,7 @@ class PAGE_NAME_UPPER_CAMEL_CASE extends Component< ...@@ -133,6 +134,7 @@ class PAGE_NAME_UPPER_CAMEL_CASE extends Component<
} }
const { mode, selectKey } = this.state; const { mode, selectKey } = this.state;
return ( return (
<GridContent>
<div <div
className={styles.main} className={styles.main}
ref={ref => { ref={ref => {
...@@ -155,6 +157,7 @@ class PAGE_NAME_UPPER_CAMEL_CASE extends Component< ...@@ -155,6 +157,7 @@ class PAGE_NAME_UPPER_CAMEL_CASE extends Component<
{this.renderChildren()} {this.renderChildren()}
</div> </div>
</div> </div>
</GridContent>
); );
} }
} }
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
padding-top: 16px; padding-top: 16px;
padding-bottom: 16px; padding-bottom: 16px;
overflow: auto; overflow: auto;
background-color: @body-background; background-color: @menu-bg;
.leftMenu { .leftMenu {
width: 224px; width: 224px;
border-right: @border-width-base @border-style-base @border-color-split; border-right: @border-width-base @border-style-base @border-color-split;
......
{ {
"private": true, "private": true,
"scripts": { "scripts": {
"dev": "cross-env PAGES_PATH='ResultSuccess/src' umi dev", "dev": "cross-env PAGES_PATH='AccountSettings/src' umi dev",
"lint": "npm run lint:ts && npm run lint:style && npm run lint:prettier", "lint": "npm run lint:ts && npm run lint:style && npm run lint:prettier",
"lint-staged": "lint-staged", "lint-staged": "lint-staged",
"lint-staged:ts": "tslint", "lint-staged:ts": "tslint",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment