<Link to={`${this.props.match.path}/${record.id}`}>查看详情 </Link>
<Switch>
<Route path={`${match.path}`} exact component={AirCompressorTable} />
<Route path={`${match.path}/aircompressor`} component={AirCompressorTable} />
<Route path={`${match.path}/aircompressor/:Id`} component={AirCompressorInfo} />{/*
<Route path={`${match.path}/acquisition`} component={SetAcquisition}/> */}
</Switch>
我现在点击上面的Link ,跳转到http://localhost:8080/#/home/equipment/aircompressor/2
但是页面就是什么都不动,没有进入route中的组件,这是为什么
因为你的第二个路由优先匹配到,所以第三个路由就不会匹配了。你把他们两个位置调换一下。