Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kww_dayDayGetCredits_250512
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
SparkProjects
kww_dayDayGetCredits_250512
Commits
9cc44ded
Commit
9cc44ded
authored
May 21, 2025
by
haiyoucuv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
init
parent
661ddea5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
BubbleMgr.ts
src/pages/HomePage/Top/Components/BubbleMgr.ts
+4
-3
No files found.
src/pages/HomePage/Top/Components/BubbleMgr.ts
View file @
9cc44ded
...
@@ -29,12 +29,13 @@ export class BubbleMgr extends Base {
...
@@ -29,12 +29,13 @@ export class BubbleMgr extends Base {
if
(
!
bubbleRecords
?.
length
)
return
;
if
(
!
bubbleRecords
?.
length
)
return
;
const
bubbles
=
bubbleRecords
.
slice
(
0
,
4
);
const
newBubbleKeys
=
[];
const
newBubbleKeys
=
[];
bubble
Record
s
.
forEach
((
info
)
=>
newBubbleKeys
.
push
(
info
.
id
));
bubbles
.
forEach
((
info
)
=>
newBubbleKeys
.
push
(
info
.
id
));
// 找到bubbleArr中不在newBubbleKeys中的bubble
// 找到bubbleArr中不在newBubbleKeys中的bubble
this
.
bubbleArr
.
forEach
((
bubble
,
i
)
=>
{
this
.
bubbleArr
.
forEach
((
bubble
,
i
)
=>
{
if
(
i
>=
4
)
return
;
if
(
bubble
&&
!
newBubbleKeys
.
includes
(
bubble
.
id
))
{
if
(
bubble
&&
!
newBubbleKeys
.
includes
(
bubble
.
id
))
{
bubble
.
destroy
();
bubble
.
destroy
();
this
.
bubbleArr
[
i
]
=
null
;
this
.
bubbleArr
[
i
]
=
null
;
...
@@ -43,7 +44,7 @@ export class BubbleMgr extends Base {
...
@@ -43,7 +44,7 @@ export class BubbleMgr extends Base {
});
});
// 更新数据
// 更新数据
bubble
Record
s
.
forEach
((
info
,
index
)
=>
{
bubbles
.
forEach
((
info
,
index
)
=>
{
const
{
id
}
=
info
;
const
{
id
}
=
info
;
let
bubble
=
this
.
bubbleMap
.
get
(
id
);
let
bubble
=
this
.
bubbleMap
.
get
(
id
);
...
...
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