提交 2d32ce1e 作者: 翁进城

产品商城样式

上级 7563c445
.productList {
.title {
padding: 20px 10px 18px;
text-align: left;
}
.main {
display: flex;
.ad {
flex-shrink: 0;
width: 260px;
height: 420px;
margin-left: 16px;
background-color: gray;
}
}
.listWrap {
display: flex;
flex-wrap: wrap;
margin-left: -14px;
.item {
width: 220px;
height: 326px;
background: #ffffff;
border-radius: 6px;
margin-bottom: 15px;
display: flex;
flex-direction: column;
justify-content: space-between;
padding-bottom: 18px;
margin-left: 14px;
.img {
width: 100%;
height: 220px;
}
.title {
padding: 0 18px;
font-size: 15px;
font-family: MicrosoftYaHeiUI-Bold, MicrosoftYaHeiUI;
font-weight: bold;
color: #333333;
line-height: 24px;
height: 48px;
display: -webkit-box; /* 使用弹性盒子布局 */
-webkit-line-clamp: 2; /* 显示行数 */
-webkit-box-orient: vertical; /* 垂直排列 */
overflow: hidden; /* 隐藏溢出部分 */
text-overflow: ellipsis; /* 使用省略号代替溢出部分 */
}
.sellCount {
font-size: 14px;
font-family: MicrosoftYaHei;
color: #ff552d;
padding-left: 20px;
}
}
}
}
\ No newline at end of file
import React, { useState } from 'react';
import { Button, Form, Input, Select, Cascader, Space, Tag } from 'antd';
import React, { useEffect, useState } from 'react';
import { Button, Form, Input, Select, Cascader, Space, Tag, Row, Col } from 'antd';
import styles from './index.module.scss';
const { Option } = Select;
......@@ -45,6 +46,12 @@ const options: AddrOption[] = [
];
export default function Mall() {
const [productList, setProductList] = useState(Array<{}>);
useEffect(() => {
setProductList([{}, {}, {}, {}, {}, {}]);
}, [])
const onProvinceChange = (value: string) => {
console.log('省', value);
};
......@@ -214,6 +221,29 @@ export default function Mall() {
</div>
</div>
</div>
<div className={styles.productList}>
<div className={styles.title}>四旋翼无人机</div>
<div className={styles.main}>
<ul className={styles.listWrap}>
{
productList.map(item => {
return (
<li className={styles.item}>
<img className={styles.img}></img>
<div className={styles.title}>入云龙ll 1550入云龙ll 1550入云龙ll 1550入云龙ll 1550</div>
<div className={styles.sellCount}>半年售12987</div>
</li>
)
})
}
</ul>
<div className={styles.ad}>
</div>
</div>
</div>
</div>
);
}
......@@ -12,7 +12,7 @@ body::-webkit-scrollbar {
.page {
width: 1200px;
margin: auto;
padding-bottom: 50px;
padding-bottom: 90px;
}
.filter-wrap {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论