Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
R
risk_case_library
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
David Yang
risk_case_library
Commits
50af1962
Commit
50af1962
authored
Aug 05, 2026
by
Andy-bubu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tab切换交互优化
parent
1c7d55ea
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
6 deletions
+9
-6
index.jsx
src/pages/project_manager_xy/resource-booking/index.jsx
+9
-6
No files found.
src/pages/project_manager_xy/resource-booking/index.jsx
View file @
50af1962
...
@@ -86,10 +86,9 @@ function buildCategoryTabItems(groups = []) {
...
@@ -86,10 +86,9 @@ function buildCategoryTabItems(groups = []) {
}
}
function
mergeCategoryTabItems
(
currentTabs
=
DEFAULT_CATEGORY_TABS
,
groups
=
[],
activeCategory
)
{
function
mergeCategoryTabItems
(
currentTabs
=
DEFAULT_CATEGORY_TABS
,
groups
=
[],
activeCategory
)
{
const
mergedTabs
=
buildCategoryTabItems
(
groups
);
const
mergedTabs
=
[];
const
mergedKeys
=
new
Set
(
mergedTabs
.
map
((
item
)
=>
item
.
key
));
const
mergedKeys
=
new
Set
();
const
appendTab
=
(
item
)
=>
{
currentTabs
.
forEach
((
item
)
=>
{
if
(
item
?.
key
&&
!
mergedKeys
.
has
(
item
.
key
))
{
if
(
item
?.
key
&&
!
mergedKeys
.
has
(
item
.
key
))
{
mergedKeys
.
add
(
item
.
key
);
mergedKeys
.
add
(
item
.
key
);
mergedTabs
.
push
({
mergedTabs
.
push
({
...
@@ -97,14 +96,18 @@ function mergeCategoryTabItems(currentTabs = DEFAULT_CATEGORY_TABS, groups = [],
...
@@ -97,14 +96,18 @@ function mergeCategoryTabItems(currentTabs = DEFAULT_CATEGORY_TABS, groups = [],
label
:
item
.
label
||
item
.
key
,
label
:
item
.
label
||
item
.
key
,
});
});
}
}
});
};
DEFAULT_CATEGORY_TABS
.
forEach
(
appendTab
);
currentTabs
.
forEach
(
appendTab
);
buildCategoryTabItems
(
groups
).
forEach
(
appendTab
);
if
(
if
(
activeCategory
&&
activeCategory
&&
activeCategory
!==
ALL_CATEGORY_KEY
&&
activeCategory
!==
ALL_CATEGORY_KEY
&&
!
mergedKeys
.
has
(
activeCategory
)
!
mergedKeys
.
has
(
activeCategory
)
)
{
)
{
mergedTabs
.
push
({
appendTab
({
key
:
activeCategory
,
key
:
activeCategory
,
label
:
activeCategory
,
label
:
activeCategory
,
});
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment