diff --git a/config/config.js b/config/config.js index 957687ba7b300d39541ff8e23cae3f1a4aa97de4..f080272d10a35c2fddee24135a91ca6b3525a2bd 100644 --- a/config/config.js +++ b/config/config.js @@ -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', + }, + ], + }, }; diff --git a/src/pages/Dashboard/Analysis.js b/src/pages/Dashboard/Analysis.js index 1288da2cd57f58451407f2228e762eda984fb3dd..fa4dd1bf3e02b7e3ddd4019f83f2ee6e4a62939a 100644 --- a/src/pages/Dashboard/Analysis.js +++ b/src/pages/Dashboard/Analysis.js @@ -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 => { diff --git a/src/pages/document.ejs b/src/pages/document.ejs index ec7760edf33122e18d9b4232aabecedf07de989f..7b2a57bf35be9f66e78b29bde7ac1c74707601d4 100644 --- a/src/pages/document.ejs +++ b/src/pages/document.ejs @@ -6,11 +6,9 @@ Ant Design Pro + - -