Commit 2797662f authored by 陈帅's avatar 陈帅

Optimization: Slight performance optimization

parent 15c8853a
......@@ -21,7 +21,6 @@ export default {
// },
// ],
],
disableServiceWorker: true,
locale: {
enable: true, // default false
default: 'zh-CN', // default zh-CN
......@@ -209,7 +208,6 @@ export default {
theme: {
'card-actions-background': '#f5f8fa',
},
// entry: 'src/index.js', // TODO remove
extraBabelPlugins: [['import', { libraryName: 'antd', libraryDirectory: 'es', style: true }]],
env: {
......@@ -219,7 +217,6 @@ export default {
},
externals: {
'@antv/data-set': 'DataSet',
bizcharts: 'BizCharts',
rollbar: 'rollbar',
},
alias: {
......@@ -229,9 +226,6 @@ export default {
common: path.resolve(__dirname, '../src/common/'),
},
ignoreMomentLocale: true,
publicPath: '/',
// TODO check hash config
// hash: true,
lessLoaderOptions: {
javascriptEnabled: true,
},
......@@ -253,4 +247,18 @@ export default {
},
},
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,8 +73,10 @@ class Analysis extends Component {
componentDidMount() {
const { dispatch } = this.props;
dispatch({
type: 'chart/fetch',
this.reqRef = requestAnimationFrame(() => {
dispatch({
type: 'chart/fetch',
});
});
}
......@@ -83,6 +85,7 @@ class Analysis extends Component {
dispatch({
type: 'chart/clear',
});
cancelAnimationFrame(this.reqRef);
}
handleChangeSalesType = e => {
......
......@@ -6,11 +6,9 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Ant Design Pro</title>
<link rel="manifest" href="/manifest.json">
<link rel="icon" href="/favicon.png" type="image/x-icon">
<!-- 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/antv/assets/data-set/0.8.7/data-set.min.js"></script>
</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