Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
ems3.3
Project
Project
Details
Activity
Releases
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wuhao
ems3.3
Commits
60a7ab15
Commit
60a7ab15
authored
2 years ago
by
wuhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
asder
parent
b6ae7e46
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
10 deletions
+13
-10
index.jsx
src/components/TagView/index.jsx
+13
-10
No files found.
src/components/TagView/index.jsx
View file @
60a7ab15
...
...
@@ -119,16 +119,19 @@ const TagView = ({ children, home }) => {
setTagList
(
tagsCopy
);
};
const
[
refresh
,
setrefresh
]
=
useState
(
true
);
// 刷新选择的标签
const
handleRefreshTag
=
(
tag
)
=>
{
const
tagsCopy
=
tagList
.
map
((
item
)
=>
{
if
(
item
.
path
===
tag
.
path
)
{
history
.
push
({
pathname
:
tag
?.
path
,
query
:
tag
?.
query
});
return
{
...
item
,
refresh
:
item
.
refresh
+
1
,
active
:
true
};
}
return
{
...
item
,
active
:
false
};
});
setTagList
(
tagsCopy
);
const
handleRefreshTag
=
async
(
tag
)
=>
{
// const tagsCopy = tagList.map((item) => {
// if (item.path === tag.path) {
// history.push({ pathname: tag?.path, query: tag?.query });
// return { ...item, refresh: item.refresh + 1, active: true };
// }
// return { ...item, active: false };
// });
// setTagList(tagsCopy);
await
setrefresh
(
false
);
setrefresh
(
true
);
};
return
(
...
...
@@ -162,7 +165,7 @@ const TagView = ({ children, home }) => {
style=
{
{
width
:
'100%'
,
height
:
'100%'
}
}
hideTracksWhenNotNeeded=
{
true
}
>
{
children
}
{
refresh
&&
children
}
</
Scrollbars
>
</
div
>
</
div
>
...
...
This diff is collapsed.
Click to expand it.
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