Skip to content

Commit

Permalink
fix router
Browse files Browse the repository at this point in the history
  • Loading branch information
kunlongxu committed Jul 31, 2017
1 parent dd29c3c commit edbbeb5
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
10 changes: 5 additions & 5 deletions example/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,24 @@ const App = () =>
<div style={{ padding: "1rem" }}>
<ul>
<li>
<Link to="/react-immutable-treeview/">basic example</Link>
<Link replace to="/basic">basic example</Link>
</li>
<li>
<Link to="/react-immutable-treeview/insert_remove">
<Link replace to="/insert_remove">
insert and reomve example
</Link>
</li>
</ul>
<hr />
<Route exact path="/react-immutable-treeview/" component={BasicExample} />
<Route exact path="/basic" component={BasicExample} />
<Route
path="/react-immutable-treeview/insert_remove"
path="/insert_remove"
component={InsertAndReomve}
/>
</div>
</Router>;
const app = document.getElementById("app");
ReactDOM.render(<App />, app, function() {
ReactDOM.render(<App />, app, function () {
console.log(1);
document.getElementById("app").className = "";
});
1 change: 1 addition & 0 deletions example/InsertAndReomve.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ class InsertAndReomve extends React.Component {
onInsert(e, nodePath) {
let { newItemForm } = this.state;
let title = newItemForm.get("title");
if (title == '') return
let key = this.state.key++;
let { treeData, lastNodePath } = this.state;
let insertPath = nodePath.concat("children");
Expand Down
2 changes: 1 addition & 1 deletion example/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
</style>

<head>
<base href="/" />
<base href="" />
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=0, maximum-scale=1, minimum-scale=1">
Expand Down
2 changes: 1 addition & 1 deletion example/webpack.config.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ module.exports = {
path: path.join(__dirname, "../dist"),
filename: "[name].[hash].js",
chunkFilename: "[name].[id].[hash].js",
publicPath: ""
publicPath: "/react-immutable-treevie/"
},
resolve: {
extensions: [".ts", ".tsx", ".js", ".js", ".jsx"]
Expand Down

0 comments on commit edbbeb5

Please sign in to comment.