Skip to content

Commit

Permalink
🐎优化:
Browse files Browse the repository at this point in the history
Change-Id: Ic7c0971903eab42fcb196afdb1e69022f362dbc4
  • Loading branch information
lzhengms committed Oct 11, 2019
1 parent a435e64 commit 502cd68
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 19 deletions.
8 changes: 7 additions & 1 deletion .babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@
"@babel/preset-react"
],
"plugins": [
"@babel/plugin-proposal-class-properties"
"@babel/plugin-proposal-class-properties",
// "@babel/plugin-transform-runtime",
["import", {
"style": "../styles",
"libraryDirectory": "", // default is lib
"libraryName": "material-ui"
}]
]
}
27 changes: 27 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"babel-core": "^6.26.3",
"babel-eslint": "^10.0.3",
"babel-loader": "^8.0.6",
"babel-plugin-import": "^1.12.2",
"clean-webpack-plugin": "^3.0.0",
"concurrently": "^4.1.1",
"cross-env": "^6.0.2",
Expand Down
21 changes: 3 additions & 18 deletions src/routes/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* @Author: lzhengms
* @Date: 2019-10-06 10:31:56
* @Last Modified by: lzhengms
* @Last Modified time: 2019-10-06 21:12:30
* @Last Modified time: 2019-10-11 11:27:35
*/
import { BrowserRouter as Router, Switch, Route } from 'react-router-dom';
import React, { Component } from 'react';
Expand All @@ -20,8 +20,8 @@ import { actions as AppActions } from 'store/appFlux';
import LoadingComponent from 'components/Loading';

const AsyncAbout = reactLoad({
loader: () => import('../components/About'),
loading: LoadingComponent
loader: () => import('../components/About'),
loading: LoadingComponent
})

const AsyncHome = reactLoad({
Expand Down Expand Up @@ -101,21 +101,6 @@ class Routes extends Component {
);
}
}
/* <ConnectedRouter history={history}>
<Launch className={classes.root}>
<BlogHeader />
<div className={classes.wrap}>
<div className={classes.content}>
<Layout>
<Router>
<Route path='/' exact component={AsyncHome}/>
<Route path='/about' exact component={AsyncAbout} />
</Router>
</Layout>
</div>
</div>
</Launch>
</ConnectedRouter> */
const mapDispatchToProps = (dispatch) => {
return bindActionCreators({
requestPostList: AppActions.requestPostList
Expand Down

0 comments on commit 502cd68

Please sign in to comment.