1. 写组件或者公共方法,将思路、路径、使用方法记录到文档中,若有css也关联说明,以便后期使用。(查找遮罩层有感)
例如:遮罩层
<div className="mask"
style={{zIndex:99999999999999,display:show?"block":"none"}}
onClick={()=>setShow(false)}>
</div>
.mask {
-webkit-transform: translateZ(0);
transform: translateZ(0);
background-color: rgba(0,0,0,.8);
width: 100%;
height: 100%;
top: 0;
right: 0;
bottom: 0;
left: 0;
position: fixed;
z-index: 10104
}