1、通过settimeout理解
2、
useState 参数不是数组
hook里的
// 相当于 componentDidMount 和 componentDidUpdate: useEffect(() => { // 使用浏览器的 API 更新页面标题 document.title = `You clicked ${count} times`; });
3、css优先级
把 .box去掉则下面类的颜色生效。
或者把 .liActive 放到.box里面
4、 带有table的不想 整缩小时候的排版可加入
style={{minWidth:'950px'}}
比如
<div style={{minWidth:'950px'}}> <Button style={{margin:'20px',display:'block'}} type="primary" onClick={this.showModal}> 查询 </Button> <Table columns={columns} dataSource={this.state.data} /> </div>
5、
border-top: 1px solid #c8c8c8;
6、 div里面元素自动水平居中
自动水平居中,在computed里的text-align里一看果然是 center,改成left就行了
![](https://img2020.cnblogs.com/blog/1105679/202010/1105679-20201012163903390-1408640427.png)