Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
W
web-ci-test
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
test-ci
web-ci-test
Commits
02c6aa83
提交
02c6aa83
authored
7月 11, 2023
作者:
龚洪江
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修复:筛选显示不全问题
上级
fb875fa7
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
30 行增加
和
9 行删除
+30
-9
index.tsx
components/filter/compoents/typeInfo/index.tsx
+26
-6
index.tsx
components/filter/index.tsx
+2
-1
next.config.js
next.config.js
+2
-2
没有找到文件。
components/filter/compoents/typeInfo/index.tsx
浏览文件 @
02c6aa83
...
@@ -46,7 +46,7 @@ export default function CategoryItem(props: Props) {
...
@@ -46,7 +46,7 @@ export default function CategoryItem(props: Props) {
});
});
};
};
const
showCount
=
9
;
// 展示数量
const
showCount
=
10
;
// 展示数量
return
(
return
(
<
div
className=
{
styles
.
filterItem
}
>
<
div
className=
{
styles
.
filterItem
}
>
...
@@ -87,12 +87,32 @@ export default function CategoryItem(props: Props) {
...
@@ -87,12 +87,32 @@ export default function CategoryItem(props: Props) {
}
}
key=
'1'
key=
'1'
>
>
<
Space
size=
{
40
}
>
<
Space
size=
{
[
10
,
0
]
}
wrap
>
{
data
.
slice
(
showCount
).
map
((
item
)
=>
{
{
data
.
slice
(
showCount
).
map
((
item
,
index
)
=>
{
return
(
return
(
<
Button
type=
'link'
key=
{
item
.
id
}
onClick=
{
(
e
)
=>
onClick
(
item
)
}
>
<
div
{
item
.
name
}
key=
{
item
.
id
}
</
Button
>
className=
{
`${styles.filterItemContent} ${
props.currentItemIndex === index ? styles.filterItemContentHover : ''
}`
}
onMouseEnter=
{
()
=>
onMouseEnter
(
item
,
index
)
}
onMouseLeave=
{
props
.
categoryMouseLeave
}
>
<
Button
type=
'link'
onClick=
{
(
e
)
=>
onClick
(
item
)
}
>
{
item
.
name
}
</
Button
>
{
item
.
children
?
(
<
Image
src=
{
downArrowImg
}
className=
{
styles
.
filterItemIcon
}
width=
{
14
}
height=
{
14
}
alt=
'展开图标'
/>
)
:
(
''
)
}
</
div
>
);
);
})
}
})
}
</
Space
>
</
Space
>
...
...
components/filter/index.tsx
浏览文件 @
02c6aa83
...
@@ -42,7 +42,7 @@ const Filter = (props: Props, ref: Ref<any>) => {
...
@@ -42,7 +42,7 @@ const Filter = (props: Props, ref: Ref<any>) => {
const
data
:
{
[
key
:
string
]:
FilterOptionResp
[]
|
FilterOptionResp
}
=
{};
const
data
:
{
[
key
:
string
]:
FilterOptionResp
[]
|
FilterOptionResp
}
=
{};
if
(
type
===
'categoryId'
)
{
if
(
type
===
'categoryId'
)
{
if
(
result
.
categoryId
)
{
if
(
result
.
categoryId
)
{
data
[
type
]
=
[
...
result
.
categoryId
,
item
];
data
[
type
]
=
[
item
,
...
result
.
categoryId
];
const
map
=
new
Map
();
const
map
=
new
Map
();
// 去重
// 去重
data
[
type
]
=
(
data
[
type
]
as
InfoList
[]).
filter
((
v
)
=>
!
map
.
has
(
v
.
id
)
&&
map
.
set
(
v
.
id
,
1
));
data
[
type
]
=
(
data
[
type
]
as
InfoList
[]).
filter
((
v
)
=>
!
map
.
has
(
v
.
id
)
&&
map
.
set
(
v
.
id
,
1
));
...
@@ -133,6 +133,7 @@ const Filter = (props: Props, ref: Ref<any>) => {
...
@@ -133,6 +133,7 @@ const Filter = (props: Props, ref: Ref<any>) => {
if
(
obj
?.
children
)
{
if
(
obj
?.
children
)
{
obj
.
children
=
obj
.
children
.
filter
((
item
:
FilterOptionResp
)
=>
item
.
id
===
v
.
id
);
obj
.
children
=
obj
.
children
.
filter
((
item
:
FilterOptionResp
)
=>
item
.
id
===
v
.
id
);
obj
.
name
+=
`/
${
v
.
name
}
`
;
obj
.
name
+=
`/
${
v
.
name
}
`
;
console
.
log
(
'选中数据-->'
,
obj
);
onChange
(
obj
,
'categoryId'
);
onChange
(
obj
,
'categoryId'
);
}
}
};
};
...
...
next.config.js
浏览文件 @
02c6aa83
...
@@ -27,8 +27,8 @@ const nextConfig = {
...
@@ -27,8 +27,8 @@ const nextConfig = {
return
[
return
[
{
{
source
:
'/local/:path*'
,
source
:
'/local/:path*'
,
//
destination: 'https://www.iuav.shop/:path*',
destination
:
'https://www.iuav.shop/:path*'
,
destination
:
'https://test.iuav.shop/:path*'
,
//
destination: 'https://test.iuav.shop/:path*',
},
},
];
];
},
},
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论