18 lines
952 B
JavaScript
18 lines
952 B
JavaScript
|
|
function Page({ type,name,num1,num2,skType,setSkType,icon }) {
|
|
|
|
return (
|
|
<div style={{width:'100%',display:'flex',fontSize:'0.9rem', color:'#ffffff',padding:'0.5rem 0.5rem 0.5rem 1rem',borderRadius:'5px',background:'#132a4b',alignItems:'center',marginBottom:'1px',cursor:'pointer'}} onClick={()=>{
|
|
setSkType(skType!==type?type:'')
|
|
}}>
|
|
<img src={`${process.env.PUBLIC_URL}/assets/icon/${icon}`} width={15} height={15} alt=""/>
|
|
<div style={{flex:1,paddingLeft:'0.8rem',marginBottom:'-0.1rem'}}>{name}</div>
|
|
<div style={{marginBottom:'-0.1rem'}}>{num1}座</div>
|
|
<div style={{ margin: '0 1rem -0.1rem 1rem' }}>{num2}{(type !=1 && type != 2) ?"万m³":"亿m³"}</div>
|
|
<img src={`${process.env.PUBLIC_URL}/assets/icon/${skType===type?'收起':'展开'}.png`} style={{cursor:'pointer'}} width={20} alt="" />
|
|
</div>
|
|
)
|
|
}
|
|
|
|
export default Page;
|
|
|