From 8bb041588cfa6b798df797ce8e7b538454dbf985 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=B8=85?= Date: Fri, 22 Jun 2018 18:55:08 +0800 Subject: [PATCH] externals bizcharts dataset and rollbar --- .webpackrc.js | 5 +++++ package.json | 4 ++-- src/components/Authorized/PromiseRender.js | 7 ++++--- src/index.ejs | 6 ++++++ 4 files changed, 17 insertions(+), 5 deletions(-) diff --git a/.webpackrc.js b/.webpackrc.js index 07289577..7ca7eee5 100755 --- a/.webpackrc.js +++ b/.webpackrc.js @@ -20,6 +20,11 @@ export default { alias: { components: path.resolve(__dirname, 'src/components/'), }, + externals: { + '@antv/data-set': 'DataSet', + bizcharts: 'BizCharts', + rollbar: 'rollbar', + }, ignoreMomentLocale: true, theme: './src/theme.js', html: { diff --git a/package.json b/package.json index c7dd3785..ba0c6c32 100755 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "build": "cross-env ESLINT=none roadhog build", "build-site": "roadhog-api-doc static", "site": "roadhog-api-doc static && gh-pages -d dist", - "analyze": "cross-env ANALYZE=true roadhog build", + "analyze": "cross-env ANALYZE=1 roadhog build", "lint:style": "stylelint \"src/**/*.less\" --syntax less", "lint": "eslint --ext .js src mock tests && npm run lint:style", "lint:fix": "eslint --fix --ext .js src mock tests && npm run lint:style", @@ -24,7 +24,7 @@ "dependencies": { "@antv/data-set": "^0.8.0", "antd": "^3.6.2", - "bizcharts": "^3.1.8", + "bizcharts": "^3.1.10", "bizcharts-plugin-slider": "^2.0.3", "classnames": "^2.2.6", "dva": "^2.3.1", diff --git a/src/components/Authorized/PromiseRender.js b/src/components/Authorized/PromiseRender.js index 62b24808..8e2a4059 100644 --- a/src/components/Authorized/PromiseRender.js +++ b/src/components/Authorized/PromiseRender.js @@ -44,9 +44,10 @@ export default class PromiseRender extends React.PureComponent { }; render() { - const { component } = this.state; - return component ? ( - + const { component: Component } = this.state; + const { ok, error, promise, ...rest } = this.props; + return Component ? ( + ) : (
Ant Design Pro + + + +
+ \ No newline at end of file -- GitLab