UNPKG
@jdlinker/utils
Version:
latest (3.2.5)
3.2.5
3.1.5
3.0.8
3.0.7
3.0.3
3.0.2
3.0.0
1.0.2
1.0.1
1.0.0
jdLinker 工具库
@jdlinker/utils
/
src
/
linker
/
setting.ts
6 lines
(5 loc)
•
217 B
text/typescript
View Raw
1
2
3
4
5
6
// 过滤网关类型
export
const
accessConfigTypeFilter = (
data
:
any
[],
filterKey
:
string
=
'id'
):
any
[] => {
if
(!data)
return
[];
return
data.
map
(
(
item
) =>
({ ...item,
label
: item.
name
,
value
: item.
id
})); };