Unverified Commit adca7f5c authored by niko's avatar niko Committed by GitHub

alias ant-design-pro (#1035)

* alias ant-design-pro

* fixed lint

* change alias ant-design-pro/lib -> components

* change alias ant-design-pro/lib -> components
parent 9c49d4b8
{
"entry": "src/index.js",
"extraBabelPlugins": [
"transform-decorators-legacy",
["import", { "libraryName": "antd", "libraryDirectory": "es", "style": true }]
],
"env": {
"development": {
"extraBabelPlugins": [
"dva-hmr"
]
}
},
"ignoreMomentLocale": true,
"theme": "./src/theme.js",
"html": {
"template": "./src/index.ejs"
},
"publicPath": "/",
"disableDynamicImport": true,
"hash": true
}
const path = require('path');
export default {
entry: 'src/index.js',
extraBabelPlugins: [
'transform-decorators-legacy',
['import', { libraryName: 'antd', libraryDirectory: 'es', style: true }],
],
env: {
development: {
extraBabelPlugins: ['dva-hmr'],
},
},
alias: {
'components': path.resolve(__dirname, 'src/components/'),
},
ignoreMomentLocale: true,
theme: './src/theme.js',
html: {
template: './src/index.ejs',
},
publicPath: '/',
disableDynamicImport: true,
hash: true,
};
......@@ -24,9 +24,9 @@ import {
Bar,
Pie,
TimelineChart,
} from '../../components/Charts';
import Trend from '../../components/Trend';
import NumberInfo from '../../components/NumberInfo';
} from 'components/Charts';
import Trend from 'components/Trend';
import NumberInfo from 'components/NumberInfo';
import { getTimeDistance } from '../../utils/utils';
import styles from './Analysis.less';
......
......@@ -2,11 +2,11 @@ import React, { PureComponent, Fragment } from 'react';
import { connect } from 'dva';
import { Row, Col, Card, Tooltip } from 'antd';
import numeral from 'numeral';
import { Pie, WaterWave, Gauge, TagCloud } from 'components/Charts';
import NumberInfo from 'components/NumberInfo';
import CountDown from 'components/CountDown';
import ActiveChart from 'components/ActiveChart';
import Authorized from '../../utils/Authorized';
import { Pie, WaterWave, Gauge, TagCloud } from '../../components/Charts';
import NumberInfo from '../../components/NumberInfo';
import CountDown from '../../components/CountDown';
import ActiveChart from '../../components/ActiveChart';
import styles from './Monitor.less';
const { Secured } = Authorized;
......@@ -48,10 +48,7 @@ export default class Monitor extends PureComponent {
/>
</Col>
<Col md={6} sm={12} xs={24}>
<NumberInfo
subTitle="销售目标完成率"
total="92%"
/>
<NumberInfo subTitle="销售目标完成率" total="92%" />
</Col>
<Col md={6} sm={12} xs={24}>
<NumberInfo subTitle="活动剩余时间" total={<CountDown target={targetTime} />} />
......@@ -66,7 +63,10 @@ export default class Monitor extends PureComponent {
</Row>
<div className={styles.mapChart}>
<Tooltip title="等待后期实现">
<img src="https://gw.alipayobjects.com/zos/rmsportal/HBWnDEUXCnGnGrRfrpKa.png" alt="map" />
<img
src="https://gw.alipayobjects.com/zos/rmsportal/HBWnDEUXCnGnGrRfrpKa.png"
alt="map"
/>
</Tooltip>
</div>
</Card>
......@@ -105,11 +105,7 @@ export default class Monitor extends PureComponent {
</Row>
<Row gutter={24}>
<Col xl={12} lg={24} sm={24} xs={24}>
<Card
title="各品类占比"
bordered={false}
className={styles.pieCard}
>
<Card title="各品类占比" bordered={false} className={styles.pieCard}>
<Row style={{ padding: '16px 0' }}>
<Col span={8}>
<Pie
......@@ -147,20 +143,22 @@ export default class Monitor extends PureComponent {
</Card>
</Col>
<Col xl={6} lg={12} sm={24} xs={24}>
<Card title="热门搜索" loading={loading} bordered={false} bodyStyle={{ overflow: 'hidden' }}>
<TagCloud
data={tags}
height={161}
/>
<Card
title="热门搜索"
loading={loading}
bordered={false}
bodyStyle={{ overflow: 'hidden' }}
>
<TagCloud data={tags} height={161} />
</Card>
</Col>
<Col xl={6} lg={12} sm={24} xs={24}>
<Card title="资源剩余" bodyStyle={{ textAlign: 'center', fontSize: 0 }} bordered={false}>
<WaterWave
height={161}
title="补贴资金剩余"
percent={34}
/>
<Card
title="资源剩余"
bodyStyle={{ textAlign: 'center', fontSize: 0 }}
bordered={false}
>
<WaterWave height={161} title="补贴资金剩余" percent={34} />
</Card>
</Col>
</Row>
......
......@@ -4,9 +4,9 @@ import { connect } from 'dva';
import { Link } from 'dva/router';
import { Row, Col, Card, List, Avatar } from 'antd';
import { Radar } from 'components/Charts';
import EditableLinkGroup from 'components/EditableLinkGroup';
import PageHeaderLayout from '../../layouts/PageHeaderLayout';
import EditableLinkGroup from '../../components/EditableLinkGroup';
import { Radar } from '../../components/Charts';
import styles from './Workplace.less';
......
import React from 'react';
import { Link } from 'dva/router';
import Exception from '../../components/Exception';
import Exception from 'components/Exception';
export default () => (
<Exception type="403" style={{ minHeight: 500, height: '80%' }} linkElement={Link} />
......
import React from 'react';
import { Link } from 'dva/router';
import Exception from '../../components/Exception';
import Exception from 'components/Exception';
export default () => (
<Exception type="404" style={{ minHeight: 500, height: '80%' }} linkElement={Link} />
......
import React from 'react';
import { Link } from 'dva/router';
import Exception from '../../components/Exception';
import Exception from 'components/Exception';
export default () => (
<Exception type="500" style={{ minHeight: 500, height: '80%' }} linkElement={Link} />
......
import React, { PureComponent } from 'react';
import { Card, Button, Form, Icon, Col, Row, DatePicker, TimePicker, Input, Select, Popover } from 'antd';
import { connect } from 'dva';
import FooterToolbar from 'components/FooterToolbar';
import PageHeaderLayout from '../../layouts/PageHeaderLayout';
import FooterToolbar from '../../components/FooterToolbar';
import TableForm from './TableForm';
import styles from './style.less';
......
......@@ -2,7 +2,7 @@ import React, { Fragment } from 'react';
import { connect } from 'dva';
import { Button, Row, Col } from 'antd';
import { routerRedux } from 'dva/router';
import Result from '../../../components/Result';
import Result from 'components/Result';
import styles from './style.less';
class Step3 extends React.PureComponent {
......
......@@ -3,8 +3,8 @@ import numeral from 'numeral';
import { connect } from 'dva';
import { Row, Col, Form, Card, Select, Icon, Avatar, List, Tooltip, Dropdown, Menu } from 'antd';
import StandardFormRow from '../../components/StandardFormRow';
import TagSelect from '../../components/TagSelect';
import TagSelect from 'components/TagSelect';
import StandardFormRow from 'components/StandardFormRow';
import styles from './Applications.less';
......
......@@ -3,8 +3,8 @@ import moment from 'moment';
import { connect } from 'dva';
import { Form, Card, Select, List, Tag, Icon, Avatar, Row, Col, Button } from 'antd';
import StandardFormRow from '../../components/StandardFormRow';
import TagSelect from '../../components/TagSelect';
import TagSelect from 'components/TagSelect';
import StandardFormRow from 'components/StandardFormRow';
import styles from './Articles.less';
const { Option } = Select;
......
......@@ -2,8 +2,8 @@ import React, { PureComponent } from 'react';
import { connect } from 'dva';
import { Card, Button, Icon, List } from 'antd';
import Ellipsis from 'components/Ellipsis';
import PageHeaderLayout from '../../layouts/PageHeaderLayout';
import Ellipsis from '../../components/Ellipsis';
import styles from './CardList.less';
......
......@@ -3,10 +3,10 @@ import moment from 'moment';
import { connect } from 'dva';
import { Row, Col, Form, Card, Select, List } from 'antd';
import StandardFormRow from '../../components/StandardFormRow';
import TagSelect from '../../components/TagSelect';
import AvatarList from '../../components/AvatarList';
import Ellipsis from '../../components/Ellipsis';
import TagSelect from 'components/TagSelect';
import AvatarList from 'components/AvatarList';
import Ellipsis from 'components/Ellipsis';
import StandardFormRow from 'components/StandardFormRow';
import styles from './Projects.less';
......@@ -45,7 +45,7 @@ export default class CoverCardList extends PureComponent {
}
});
}, 0);
}
};
render() {
const { list: { list = [] }, loading, form } = this.props;
......@@ -72,15 +72,13 @@ export default class CoverCardList extends PureComponent {
<span>{moment(item.updatedAt).fromNow()}</span>
<div className={styles.avatarList}>
<AvatarList size="mini">
{
item.members.map((member, i) => (
{item.members.map((member, i) => (
<AvatarList.Item
key={`${item.id}-avatar-${i}`}
src={member.avatar}
tips={member.name}
/>
))
}
))}
</AvatarList>
</div>
</div>
......@@ -121,17 +119,10 @@ export default class CoverCardList extends PureComponent {
)}
</FormItem>
</StandardFormRow>
<StandardFormRow
title="其它选项"
grid
last
>
<StandardFormRow title="其它选项" grid last>
<Row gutter={16}>
<Col lg={8} md={10} sm={10} xs={24}>
<FormItem
{...formItemLayout}
label="作者"
>
<FormItem {...formItemLayout} label="作者">
{getFieldDecorator('author', {})(
<Select
onChange={this.handleFormSubmit}
......@@ -144,10 +135,7 @@ export default class CoverCardList extends PureComponent {
</FormItem>
</Col>
<Col lg={8} md={10} sm={10} xs={24}>
<FormItem
{...formItemLayout}
label="好评度"
>
<FormItem {...formItemLayout} label="好评度">
{getFieldDecorator('rate', {})(
<Select
onChange={this.handleFormSubmit}
......@@ -164,9 +152,7 @@ export default class CoverCardList extends PureComponent {
</StandardFormRow>
</Form>
</Card>
<div className={styles.cardList}>
{cardList}
</div>
<div className={styles.cardList}>{cardList}</div>
</div>
);
}
......
......@@ -2,7 +2,7 @@ import React, { PureComponent, Fragment } from 'react';
import { connect } from 'dva';
import moment from 'moment';
import { Row, Col, Card, Form, Input, Select, Icon, Button, Dropdown, Menu, InputNumber, DatePicker, Modal, message, Badge, Divider } from 'antd';
import StandardTable from '../../components/StandardTable';
import StandardTable from 'components/StandardTable';
import PageHeaderLayout from '../../layouts/PageHeaderLayout';
import styles from './TableList.less';
......
......@@ -4,8 +4,8 @@ import Bind from 'lodash-decorators/bind';
import { connect } from 'dva';
import { Button, Menu, Dropdown, Icon, Row, Col, Steps, Card, Popover, Badge, Table, Tooltip, Divider } from 'antd';
import classNames from 'classnames';
import DescriptionList from 'components/DescriptionList';
import PageHeaderLayout from '../../layouts/PageHeaderLayout';
import DescriptionList from '../../components/DescriptionList';
import styles from './AdvancedProfile.less';
const { Step } = Steps;
......
import React, { Component } from 'react';
import { connect } from 'dva';
import { Card, Badge, Table, Divider } from 'antd';
import DescriptionList from 'components/DescriptionList';
import PageHeaderLayout from '../../layouts/PageHeaderLayout';
import DescriptionList from '../../components/DescriptionList';
import styles from './BasicProfile.less';
const { Description } = DescriptionList;
const progressColumns = [{
const progressColumns = [
{
title: '时间',
dataIndex: 'time',
key: 'time',
}, {
},
{
title: '当前进度',
dataIndex: 'rate',
key: 'rate',
}, {
},
{
title: '状态',
dataIndex: 'status',
key: 'status',
render: text => (
text === 'success' ? <Badge status="success" text="成功" /> : <Badge status="processing" text="进行中" />
),
}, {
render: text =>
(text === 'success' ? (
<Badge status="success" text="成功" />
) : (
<Badge status="processing" text="进行中" />
)),
},
{
title: '操作员ID',
dataIndex: 'operator',
key: 'operator',
}, {
},
{
title: '耗时',
dataIndex: 'cost',
key: 'cost',
}];
},
];
@connect(({ profile, loading }) => ({
profile,
......@@ -71,7 +80,8 @@ export default class BasicProfile extends Component {
}
return obj;
};
const goodsColumns = [{
const goodsColumns = [
{
title: '商品编号',
dataIndex: 'id',
key: 'id',
......@@ -86,23 +96,27 @@ export default class BasicProfile extends Component {
},
};
},
}, {
},
{
title: '商品名称',
dataIndex: 'name',
key: 'name',
render: renderContent,
}, {
},
{
title: '商品条码',
dataIndex: 'barcode',
key: 'barcode',
render: renderContent,
}, {
},
{
title: '单价',
dataIndex: 'price',
key: 'price',
align: 'right',
render: renderContent,
}, {
},
{
title: '数量(件)',
dataIndex: 'num',
key: 'num',
......@@ -113,7 +127,8 @@ export default class BasicProfile extends Component {
}
return <span style={{ fontWeight: 600 }}>{text}</span>;
},
}, {
},
{
title: '金额',
dataIndex: 'amount',
key: 'amount',
......@@ -124,7 +139,8 @@ export default class BasicProfile extends Component {
}
return <span style={{ fontWeight: 600 }}>{text}</span>;
},
}];
},
];
return (
<PageHeaderLayout title="基础详情页">
<Card bordered={false}>
......
import React, { Fragment } from 'react';
import { Button, Icon, Card } from 'antd';
import Result from '../../components/Result';
import Result from 'components/Result';
import PageHeaderLayout from '../../layouts/PageHeaderLayout';
const extra = (
......
import React, { Fragment } from 'react';
import { Button, Row, Col, Icon, Steps, Card } from 'antd';
import Result from '../../components/Result';
import Result from 'components/Result';
import PageHeaderLayout from '../../layouts/PageHeaderLayout';
const { Step } = Steps;
......
......@@ -2,7 +2,7 @@ import React, { Component } from 'react';
import { connect } from 'dva';
import { Link } from 'dva/router';
import { Checkbox, Alert, Icon } from 'antd';
import Login from '../../components/Login';
import Login from 'components/Login';
import styles from './Login.less';
const { Tab, UserName, Password, Mobile, Captcha, Submit } = Login;
......
import React from 'react';
import { Button } from 'antd';
import { Link } from 'dva/router';
import Result from '../../components/Result';
import Result from 'components/Result';
import styles from './RegisterResult.less';
const actions = (
......
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