提交 6f83b6c8 authored 作者: 王绍森's avatar 王绍森

集中施肥按钮位置更改

上级 aea38644
...@@ -53,12 +53,8 @@ const StyledBtn = styled.button` ...@@ -53,12 +53,8 @@ const StyledBtn = styled.button`
background-image: ${props => `url(${props.activeBg})`}; background-image: ${props => `url(${props.activeBg})`};
} }
`; `;
const Container = styled.div` const names = ['Line', 'Cave', 'Dip',]
padding: ${`0 ${convertpx2vw(110)}`}; const names2 = ['Plug', 'Mix', ];
display: flex;
flex-wrap: wrap;
`;
const names = ['Line', 'Cave', 'Dip', 'Plug', 'Mix', ];
const bgs = {LineBg, CaveBg, DipBg, PlugBg, MixBg, }; const bgs = {LineBg, CaveBg, DipBg, PlugBg, MixBg, };
const bgsActive = { LineBgActive, CaveBgActive, DipBgActive, PlugBgActive, MixBgActive, }; const bgsActive = { LineBgActive, CaveBgActive, DipBgActive, PlugBgActive, MixBgActive, };
...@@ -73,7 +69,8 @@ export default function ({ match }) { ...@@ -73,7 +69,8 @@ export default function ({ match }) {
return ( return (
<StyledWheatBg> <StyledWheatBg>
<StyledTitle src={TitleImg} /> <StyledTitle src={TitleImg} />
<Container> <div>
<div>
{ {
names.map(name => ( names.map(name => (
<StyledBtn <StyledBtn
...@@ -84,7 +81,21 @@ export default function ({ match }) { ...@@ -84,7 +81,21 @@ export default function ({ match }) {
/> />
)) ))
} }
</Container> </div>
<div>
{
names2.map(name => (
<StyledBtn
key={name}
bg={bgs[name+'Bg']}
activeBg={bgsActive[name+'BgActive']}
onClick={() => handleClick(name)}
/>
))
}
</div>
</div>
<BackBtn /> <BackBtn />
<HomeBtn /> <HomeBtn />
<Video wrappedComponentRef={c => videoRef.current = c} /> <Video wrappedComponentRef={c => videoRef.current = c} />
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论