我在Link里面添加class没反应,我看它封装的组件activeClassName是string,不知为啥就是起不到作用<Link to={{pathname:"/printPage"}} activeClassName="dddfff" target="_blank">打印</Link>...propTypes: { to: oneOfType([string, object, func]), query: object, hash: string, state: object, activeStyle: object, activeClassName: string, onlyActiveOnIndex: bool.isRequired, onClick: func, target: string
},
1 回答
九州编程
TA贡献1785条经验 获得超4个赞
<div className={styles.test}> <Link to='/'>打印</Link></div>
css
.test { a { color: black; } a:active { color: red; } }
- 1 回答
- 0 关注
- 956 浏览
添加回答
举报
0/150
提交
取消