Commit ca3d5564 authored by Bill's avatar Bill

fix: 修改pc装修页样式问题

parent 95964cee
...@@ -364,7 +364,7 @@ function useGetLayout() { ...@@ -364,7 +364,7 @@ function useGetLayout() {
} }
pageConfig = { pageConfig = {
0: { 0: {
"componentName": "MallLayout", "componentName": "div",
title: '组件树', title: '组件树',
"props": { "props": {
"style": { "style": {
......
...@@ -47,6 +47,7 @@ ...@@ -47,6 +47,7 @@
.coupon-condition { .coupon-condition {
color: #606266; color: #606266;
font-size: 12px; font-size: 12px;
text-align: center;
} }
&::after { &::after {
......
...@@ -24,9 +24,10 @@ const OFFSET_WIDTH = 16 ...@@ -24,9 +24,10 @@ const OFFSET_WIDTH = 16
const HotCommoditySwiper: React.FC<Iprops> = (props: Iprops) => { const HotCommoditySwiper: React.FC<Iprops> = (props: Iprops) => {
const { title, children, className, onMouseOver, onClick, status } = props; const { title, children, className, onMouseOver, onClick, status } = props;
const count = React.Children.count(children) const count = React.Children.count(children);
const visible = status; const visible = status;
const { current, onPrev, onNext } = useSwiper({ count: count }); const { current, onPrev, onNext } = useSwiper({ count: count });
console.log("current", current);
const designProps = { const designProps = {
onMouseOver, onMouseOver,
onClick onClick
...@@ -53,15 +54,15 @@ const HotCommoditySwiper: React.FC<Iprops> = (props: Iprops) => { ...@@ -53,15 +54,15 @@ const HotCommoditySwiper: React.FC<Iprops> = (props: Iprops) => {
<WebCard title={<div className={styles['container-title']}>{title}</div>}> <WebCard title={<div className={styles['container-title']}>{title}</div>}>
<div className={styles.swiper}> <div className={styles.swiper}>
<div className={classNames(styles['swiper-prev'], { [styles.hidden]: current === 0 })} onClick={onPrev}> <div className={classNames(styles['swiper-prev'], { [styles.hidden]: current === 0 })} onClick={onPrev}>
<LeftOutlined style={{fontSize: '20px', color: 'red'}}/> <LeftOutlined style={{fontSize: '20px'}}/>
</div> </div>
<div className={styles['swiper-view']}> <div className={styles['swiper-view']}>
<div className={styles.commodityList} style={{ transform: `translateX(${((-current * SCREEN_WIDTH) + -(current * OFFSET_WIDTH))}px)` }}> <div className={styles.commodityList} style={{ transform: `translateX(${((-current * SCREEN_WIDTH) + -(current * OFFSET_WIDTH))}px)` }}>
{renderChildren()} {renderChildren()}
</div> </div>
</div> </div>
<div className={classNames(styles['swiper-next'], { [styles.hidden]: current * 3 <= count })} onClick={onNext}> <div className={classNames(styles['swiper-next'], { [styles.hidden]: (current + 1) * 3 >= count })} onClick={onNext}>
<RightOutlined style={{fontSize: '20px', color: 'red'}} /> <RightOutlined style={{fontSize: '20px'}} />
</div> </div>
</div> </div>
</WebCard> </WebCard>
......
...@@ -47,9 +47,9 @@ const Toolbar: React.FC<Iprops> = (props: Iprops) => { ...@@ -47,9 +47,9 @@ const Toolbar: React.FC<Iprops> = (props: Iprops) => {
{title} {title}
</div> </div>
{ {
( color && (
<Color onChange={handleChangeColor} color={color} /> <Color onChange={handleChangeColor} color={color} />
) ) || null
} }
<div className={styles.extra}>{extra}</div> <div className={styles.extra}>{extra}</div>
</div> </div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment