我想将我的 react 路由器链接添加到抽屉
。我试过这个:
<Drawer width={200} open={this.state.drawerOpen} docked={false} onRequestChange={this.toggleDrawer}>
<Link to="/businesspartners">
<MenuItem onTouchTap={this.toggleDrawer.bind(this, false)}
rightIcon={<CommunicationBusiness />}
>
Business Partners
</MenuItem>
</Link>
</Drawer>
我的问题是链接将呈现下划线(如下图所示)。
最佳答案
我对直接使用样式也有类似的担忧,并得到了以下答案:https://stackoverflow.com/a/48252439/522859
总而言之,使用 ListItem 上的组件属性:
<List>
<ListItem button component={Link} to="https://www.google.com">
<ListItemText primary="Google" />
</ListItem>
</List>
官方文档在这里介绍:https://material-ui.com/api/list-item/
关于reactjs - Material ui 抽屉中的渲染链接,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39466270/