提交 b354400d9aa0a3332bbbe703cae2dec24c97df5d

作者 愚道
1 个父辈 59231fe4

fix: ant-design-pro style in analysis

@@ -2,11 +2,13 @@ import React, { memo } from 'react'; @@ -2,11 +2,13 @@ import React, { memo } from 'react';
2 import { Row, Col, Icon, Tooltip } from 'antd'; 2 import { Row, Col, Icon, Tooltip } from 'antd';
3 import { FormattedMessage } from 'umi/locale'; 3 import { FormattedMessage } from 'umi/locale';
4 import styles from './Analysis.less'; 4 import styles from './Analysis.less';
5 -import { ChartCard, MiniArea, MiniBar, MiniProgress, Field } from 'ant-design-pro/lib/Charts';  
6 -import Trend from 'ant-design-pro/lib/Trend'; 5 +import { Charts } from 'ant-design-pro';
  6 +import { Trend } from 'ant-design-pro';
7 import numeral from 'numeral'; 7 import numeral from 'numeral';
8 import Yuan from '@/utils/Yuan'; 8 import Yuan from '@/utils/Yuan';
9 9
  10 +const { ChartCard, MiniArea, MiniBar, MiniProgress, Field } = Charts;
  11 +
10 const topColResponsiveProps = { 12 const topColResponsiveProps = {
11 xs: 24, 13 xs: 24,
12 sm: 12, 14 sm: 12,
1 import React, { memo } from 'react'; 1 import React, { memo } from 'react';
2 import { Card, Tabs, Row, Col } from 'antd'; 2 import { Card, Tabs, Row, Col } from 'antd';
3 import { formatMessage, FormattedMessage } from 'umi/locale'; 3 import { formatMessage, FormattedMessage } from 'umi/locale';
4 -import { TimelineChart, Pie } from 'ant-design-pro/lib/Charts';  
5 -import NumberInfo from 'ant-design-pro/lib/NumberInfo'; 4 +import { Charts } from 'ant-design-pro';
  5 +import { NumberInfo } from 'ant-design-pro';
6 import styles from './Analysis.less'; 6 import styles from './Analysis.less';
7 7
  8 +const { TimelineChart, Pie } = Charts;
  9 +
8 const CustomTab = ({ data, currentTabKey: currentKey }) => ( 10 const CustomTab = ({ data, currentTabKey: currentKey }) => (
9 <Row gutter={8} style={{ width: 138, margin: '8px 0' }}> 11 <Row gutter={8} style={{ width: 138, margin: '8px 0' }}>
10 <Col span={12}> 12 <Col span={12}>
@@ -2,9 +2,11 @@ import React, { memo } from 'react'; @@ -2,9 +2,11 @@ import React, { memo } from 'react';
2 import { Card, Radio } from 'antd'; 2 import { Card, Radio } from 'antd';
3 import { FormattedMessage } from 'umi/locale'; 3 import { FormattedMessage } from 'umi/locale';
4 import styles from './Analysis.less'; 4 import styles from './Analysis.less';
5 -import { Pie } from 'ant-design-pro/lib/Charts'; 5 +import { Charts } from 'ant-design-pro';
6 import Yuan from '@/utils/Yuan'; 6 import Yuan from '@/utils/Yuan';
7 7
  8 +const { Pie } = Charts;
  9 +
8 const ProportionSales = memo( 10 const ProportionSales = memo(
9 ({ dropdownGroup, salesType, loading, salesPieData, handleChangeSalesType }) => ( 11 ({ dropdownGroup, salesType, loading, salesPieData, handleChangeSalesType }) => (
10 <Card 12 <Card
@@ -2,9 +2,11 @@ import React, { memo } from 'react'; @@ -2,9 +2,11 @@ import React, { memo } from 'react';
2 import { Row, Col, Card, Tabs, DatePicker } from 'antd'; 2 import { Row, Col, Card, Tabs, DatePicker } from 'antd';
3 import { FormattedMessage, formatMessage } from 'umi/locale'; 3 import { FormattedMessage, formatMessage } from 'umi/locale';
4 import numeral from 'numeral'; 4 import numeral from 'numeral';
5 -import { Bar } from 'ant-design-pro/lib/Charts'; 5 +import { Charts } from 'ant-design-pro';
6 import styles from './Analysis.less'; 6 import styles from './Analysis.less';
7 7
  8 +const { Bar } = Charts;
  9 +
8 const { RangePicker } = DatePicker; 10 const { RangePicker } = DatePicker;
9 const { TabPane } = Tabs; 11 const { TabPane } = Tabs;
10 12
1 import React, { memo } from 'react'; 1 import React, { memo } from 'react';
2 import { Row, Col, Table, Tooltip, Card, Icon } from 'antd'; 2 import { Row, Col, Table, Tooltip, Card, Icon } from 'antd';
3 import { FormattedMessage } from 'umi/locale'; 3 import { FormattedMessage } from 'umi/locale';
4 -import Trend from 'ant-design-pro/lib/Trend'; 4 +import { Trend, NumberInfo, Charts } from 'ant-design-pro';
5 import numeral from 'numeral'; 5 import numeral from 'numeral';
6 -import NumberInfo from 'ant-design-pro/lib/NumberInfo';  
7 -import { MiniArea } from 'ant-design-pro/lib/Charts';  
8 import styles from './Analysis.less'; 6 import styles from './Analysis.less';
9 7
  8 +const { MiniArea } = Charts;
  9 +
10 const columns = [ 10 const columns = [
11 { 11 {
12 title: <FormattedMessage id="app.analysis.table.rank" defaultMessage="Rank" />, 12 title: <FormattedMessage id="app.analysis.table.rank" defaultMessage="Rank" />,
注册登录 后发表评论