-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path0018Shop.js
50 lines (31 loc) · 1.1 KB
/
0018Shop.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
import React, { Component } from 'react';
import { BrowserRouter as Router, Route, Link } from "react-router-dom";
import ShopAdd from './Shop/ShopAdd';
import ShopList from './Shop/ShopList';
class Shop extends Component {
constructor(props) {
super(props);
this.state = {
msg:'我是一个商户组件'
};
}
render() {
return (
<div className="shop">
<div className="content">
<div className="left">
<Link to="/shop/">商户列表</Link>
<br />
<br />
<Link to="/shop/add">增加商户</Link>
</div>
<div className="right">
<Route exact path={`${this.props.match.url}/`} component={ShopList} />
<Route path={`${this.props.match.url}/add`} component={ShopAdd} />
</div>
</div>
</div>
);
}
}
export default Shop;