Skip to content

Commit

Permalink
refactor(bootstrap): 重新调整了bootstrap的逻辑,entry不再依赖项目的结构,可由开发调整
Browse files Browse the repository at this point in the history
  • Loading branch information
it1011 committed Apr 9, 2019
1 parent cb2914a commit 090f6a1
Show file tree
Hide file tree
Showing 12 changed files with 110 additions and 97 deletions.
93 changes: 76 additions & 17 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"dependencies": {
"@babel/runtime": "^7.4.3",
"@talentui/biz-helper": "^2.0.0",
"@talentui/bootstrap-react": "^2.0.0-beta.0",
"@talentui/bootstrap-react": "^2.0.0-beta.3",
"core-js": "^2.6.5",
"react": "^16.8.6",
"react-dom": "^16.8.6",
Expand Down
18 changes: 0 additions & 18 deletions src/app-config.js

This file was deleted.

18 changes: 17 additions & 1 deletion src/app.js
Original file line number Diff line number Diff line change
@@ -1 +1,17 @@
import '@talentui/bootstrap-react';
import app from '@talentui/bootstrap-react';
import reducer from './reducers';
import Layout from './components/common/layout'

app.config({
afterCreateStore: function(store) {
console.log('store created');
},
initialState: {},
el: '#bsMain',
reducer,
layout: Layout,
pageLoader: path =>
import(/* webpackMode: "lazy", webpackChunkName: "[request]" */ `_/src/pages/${path}/page-view`)
});

app.start();
14 changes: 14 additions & 0 deletions src/components/common/layout.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import React from 'react';
import Header from './header';
import Footer from './footer';
export default class Layout extends React.Component {
render() {
return (
<div>
<Header name="hehe" title={3} />
<div className="content-wrapper">{this.props.children}</div>
<Footer />
</div>
);
}
}
22 changes: 0 additions & 22 deletions src/entry.js

This file was deleted.

9 changes: 1 addition & 8 deletions src/pages/home/page-view.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,19 +28,12 @@ export default class Home extends Component {
}

render() {
let { data, increase, children } = this.props;
let { data } = this.props;
return (
<div className="home-page">
<div>
<div> 你是否看到了时间的流失:{data} </div>
<Link to="/home/love">爱自己,爱这个世界</Link>
<div className="tabs">
<div>
<Link to="/home/~/tab1">Tab1</Link>
<Link to="/home/~/tab2">Tab2</Link>
</div>
<div>{children}</div>
</div>
</div>
</div>
);
Expand Down
14 changes: 0 additions & 14 deletions src/pages/home/tab1/tab-view.js

This file was deleted.

5 changes: 0 additions & 5 deletions src/pages/home/tab1/tab3/tab-view.js

This file was deleted.

5 changes: 0 additions & 5 deletions src/pages/home/tab1/tab4/tab-view.js

This file was deleted.

5 changes: 0 additions & 5 deletions src/pages/home/tab2/tab-view.js

This file was deleted.

2 changes: 1 addition & 1 deletion src/pages/ts-todos/todo-item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export default class TodoItem extends React.Component<ITodoItemProps, {}>{

render(){
return <li className="todo-item" onClick={this.handleToggleTodo(this.props.id)}>
<input checked={this.props.finished} type='checkbox' />
<input checked={this.props.finished} type='checkbox' readOnly />
{this.props.contents}
<a className="btn-remove" href="javascript:;" onClick={this.handleDeleteTodo(this.props.id)}>xxx</a>
</li>
Expand Down

0 comments on commit 090f6a1

Please sign in to comment.