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