Commit 2797662f authored by ι™ˆεΈ…'s avatar ι™ˆεΈ…

Optimization: Slight performance optimization

parent 15c8853a
...@@ -21,7 +21,6 @@ export default { ...@@ -21,7 +21,6 @@ export default {
// }, // },
// ], // ],
], ],
disableServiceWorker: true,
locale: { locale: {
enable: true, // default false enable: true, // default false
default: 'zh-CN', // default zh-CN default: 'zh-CN', // default zh-CN
...@@ -209,7 +208,6 @@ export default { ...@@ -209,7 +208,6 @@ export default {
theme: { theme: {
'card-actions-background': '#f5f8fa', 'card-actions-background': '#f5f8fa',
}, },
// entry: 'src/index.js', // TODO remove // entry: 'src/index.js', // TODO remove
extraBabelPlugins: [['import', { libraryName: 'antd', libraryDirectory: 'es', style: true }]], extraBabelPlugins: [['import', { libraryName: 'antd', libraryDirectory: 'es', style: true }]],
env: { env: {
...@@ -219,7 +217,6 @@ export default { ...@@ -219,7 +217,6 @@ export default {
}, },
externals: { externals: {
'@antv/data-set': 'DataSet', '@antv/data-set': 'DataSet',
bizcharts: 'BizCharts',
rollbar: 'rollbar', rollbar: 'rollbar',
}, },
alias: { alias: {
...@@ -229,9 +226,6 @@ export default { ...@@ -229,9 +226,6 @@ export default {
common: path.resolve(__dirname, '../src/common/'), common: path.resolve(__dirname, '../src/common/'),
}, },
ignoreMomentLocale: true, ignoreMomentLocale: true,
publicPath: '/',
// TODO check hash config
// hash: true,
lessLoaderOptions: { lessLoaderOptions: {
javascriptEnabled: true, javascriptEnabled: true,
}, },
...@@ -253,4 +247,18 @@ export default { ...@@ -253,4 +247,18 @@ export default {
}, },
}, },
disableFastClick: true, disableFastClick: true,
manifest: {
name: 'ant-design-pro',
background_color: '#FFF',
description: 'An out-of-box UI solution for enterprise applications as a React boilerplate.',
display: 'standalone',
start_url: '/index.html',
icons: [
{
src: '/favicon.png',
sizes: '48x48',
type: 'image/png',
},
],
},
}; };
...@@ -73,9 +73,11 @@ class Analysis extends Component { ...@@ -73,9 +73,11 @@ class Analysis extends Component {
componentDidMount() { componentDidMount() {
const { dispatch } = this.props; const { dispatch } = this.props;
this.reqRef = requestAnimationFrame(() => {
dispatch({ dispatch({
type: 'chart/fetch', type: 'chart/fetch',
}); });
});
} }
componentWillUnmount() { componentWillUnmount() {
...@@ -83,6 +85,7 @@ class Analysis extends Component { ...@@ -83,6 +85,7 @@ class Analysis extends Component {
dispatch({ dispatch({
type: 'chart/clear', type: 'chart/clear',
}); });
cancelAnimationFrame(this.reqRef);
} }
handleChangeSalesType = e => { handleChangeSalesType = e => {
......
...@@ -6,11 +6,9 @@ ...@@ -6,11 +6,9 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<title>Ant Design Pro</title> <title>Ant Design Pro</title>
<link rel="manifest" href="/manifest.json">
<link rel="icon" href="/favicon.png" type="image/x-icon"> <link rel="icon" href="/favicon.png" type="image/x-icon">
<!-- rollbar --> <!-- rollbar -->
<script src="https://gw.alipayobjects.com/os/rmsportal/nGVBgVyXzzmbAqevIAPy.js">
</script>
<!-- bizcharts -->
<script src=" https://gw.alipayobjects.com/os/rmsportal/TKSqiyoUxzrHoMwjViwA.js "></script> <script src=" https://gw.alipayobjects.com/os/rmsportal/TKSqiyoUxzrHoMwjViwA.js "></script>
<script src="https://gw.alipayobjects.com/os/antv/assets/data-set/0.8.7/data-set.min.js"></script> <script src="https://gw.alipayobjects.com/os/antv/assets/data-set/0.8.7/data-set.min.js"></script>
</head> </head>
......
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