首页分类筛选框优化

This commit is contained in:
禺狨 2023-07-14 14:34:29 +08:00
parent 1b93895b52
commit 37b034c555
2 changed files with 7 additions and 18 deletions

View File

@ -90,15 +90,7 @@
overflow: hidden;
text-overflow: ellipsis;
}
}
.active-child-item {
width: 100%;
float: left;
height: auto;
box-sizing: border-box;
padding-left: 20px;
.category-child-tit {
.act-category-child-tit {
width: 100%;
font-size: 14px;
font-weight: 400;

View File

@ -163,16 +163,13 @@ const IndexPage = () => {
return (
<>
{data.map((item: any) => (
<div
key={item.key}
className={
item.key === categoryId
? styles["active-child-item"]
: styles["child-item"]
}
>
<div key={item.key} className={styles["child-item"]}>
<div
className={styles["category-child-tit"]}
className={
item.key === categoryId
? styles["act-category-child-tit"]
: styles["category-child-tit"]
}
onClick={() => {
setCategoryId(item.key);
setCategoryText(item.title);