Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
W
web-ci-test
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
test-ci
web-ci-test
Commits
0c0950e5
提交
0c0950e5
authored
7月 11, 2023
作者:
龚洪江
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修复:筛选二级下拉样式
上级
6bb5e6b1
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
15 行增加
和
8 行删除
+15
-8
index.tsx
components/filter/compoents/typeInfo/index.tsx
+7
-5
index.module.scss
components/filter/index.module.scss
+3
-0
index.tsx
components/filter/index.tsx
+5
-3
没有找到文件。
components/filter/compoents/typeInfo/index.tsx
浏览文件 @
0c0950e5
...
...
@@ -26,10 +26,12 @@ export default function CategoryItem(props: Props) {
},
[]);
const
onClick
=
(
item
:
FilterOptionResp
)
=>
{
props
.
onChange
({
id
:
item
.
id
,
name
:
`
${
props
.
typeName
}
:
${
item
.
name
}
`
,
});
if
(
!
item
.
children
)
{
props
.
onChange
({
id
:
item
.
id
,
name
:
`
${
props
.
typeName
}
:
${
item
.
name
}
`
,
});
}
};
const
onMouseEnter
=
(
item
:
FilterOptionResp
,
index
:
number
)
=>
{
if
(
item
.
children
)
{
...
...
@@ -53,7 +55,7 @@ export default function CategoryItem(props: Props) {
<
Collapse
ghost
collapsible=
'icon'
expandIconPosition=
'end'
style=
{
{
width
:
'100%'
}
}
>
<
Collapse
.
Panel
header=
{
<
Space
size=
{
[
4
0
,
0
]
}
>
<
Space
size=
{
[
1
0
,
0
]
}
>
{
data
.
slice
(
0
,
showCount
).
map
((
item
,
index
)
=>
{
return
(
<
div
...
...
components/filter/index.module.scss
浏览文件 @
0c0950e5
...
...
@@ -60,12 +60,14 @@
display
:
flex
;
align-items
:
center
;
cursor
:
pointer
;
padding
:
0
15px
;
.filterItemIcon
{
transform
:
rotateZ
(
180deg
);
margin-left
:
5px
;
transition
:
transform
1s
;
}
&
:hover
{
background
:
#ECECEC
;
.filterItemIcon
{
transform
:
rotateZ
(
0deg
);
transition
:
transform
0
.168s
;
...
...
@@ -112,6 +114,7 @@
}
.filterCategorySecond
:hover
~
.filterItem
{
.filterItemContentHover
{
background
:
#ECECEC
;
.filterItemIcon
{
transform
:
rotateZ
(
0deg
)
!
important
;
transition
:
transform
0
.168s
!
important
;
...
...
components/filter/index.tsx
浏览文件 @
0c0950e5
...
...
@@ -88,7 +88,8 @@ const Filter = (props: Props, ref: Ref<any>) => {
};
const
routerList
=
[
'/jobServices'
,
'/equipmentLeasing'
,
'/flyingHandService'
,
'/mall'
];
const
[
typeInfo
,
setTypeInfo
]
=
useState
<
Array
<
TypesResp
>
|
null
>
();
const
[
currentItemIndex
,
setCurrentItemIndex
]
=
useState
<
number
>
(
-
1
);
// 当前移入的下标
const
[
currentDicIndex
,
setCurrentDicIndex
]
=
useState
<
number
>
(
-
1
);
const
[
currentItemIndex
,
setCurrentItemIndex
]
=
useState
<
number
>
(
-
1
);
// 当前分类移入的下标
const
[
categoryObj
,
setCategoryObj
]
=
useState
<
FilterOptionResp
>
();
// 分类移入
...
...
@@ -100,6 +101,7 @@ const Filter = (props: Props, ref: Ref<any>) => {
const
index
:
number
=
typeInfo
.
findIndex
((
v
)
=>
v
.
categoriesInfoListDTO
.
some
((
i
)
=>
i
.
id
===
item
.
id
),
);
setCurrentDicIndex
(
index
);
categorySecondRef
.
current
.
style
.
top
=
`
${(
index
+
1
)
*
26
}
px`
;
}
}
else
{
...
...
@@ -193,7 +195,7 @@ const Filter = (props: Props, ref: Ref<any>) => {
))
}
</
div
>
{
typeInfo
?.
length
&&
typeInfo
?.
map
((
item
)
=>
(
typeInfo
?.
map
((
item
,
index
)
=>
(
<
TypeInfo
key=
{
item
.
directoryId
}
typeName=
{
item
.
name
}
...
...
@@ -201,7 +203,7 @@ const Filter = (props: Props, ref: Ref<any>) => {
onChange=
{
(
e
:
FilterOptionResp
)
=>
onChange
(
e
,
'categoryId'
)
}
categoryMouseEnter=
{
categoryMouseEnter
}
changeCurrentItemIndex=
{
changeCurrentItemIndex
}
currentItemIndex=
{
current
ItemIndex
}
currentItemIndex=
{
current
DicIndex
===
index
?
currentItemIndex
:
-
1
}
categoryMouseLeave=
{
categoryMouseLeave
}
></
TypeInfo
>
))
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论