Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
middleLayer_for_kyxq
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
template admin
middleLayer_for_kyxq
Commits
e898f71c
Commit
e898f71c
authored
Nov 11, 2023
by
李维
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复列表滚动不复位的问题
parent
f457fb4c
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
21 deletions
+21
-21
middleLayer_for_kyxq.fire
assets/middleLayer_for_kyxq/scene/middleLayer_for_kyxq.fire
+9
-9
PageViewer.ts
assets/middleLayer_for_kyxq/script/PageViewer.ts
+9
-10
UnitPage.ts
assets/middleLayer_for_kyxq/script/UnitPage.ts
+3
-2
No files found.
assets/middleLayer_for_kyxq/scene/middleLayer_for_kyxq.fire
View file @
e898f71c
...
...
@@ -2222,7 +2222,7 @@
}
],
"_prefab": null,
"_opacity":
0
,
"_opacity":
255
,
"_color": {
"__type__": "cc.Color",
"r": 255,
...
...
@@ -5714,7 +5714,7 @@
}
],
"_prefab": null,
"_opacity":
0
,
"_opacity":
255
,
"_color": {
"__type__": "cc.Color",
"r": 255,
...
...
@@ -13501,7 +13501,7 @@
}
],
"_prefab": null,
"_opacity":
0
,
"_opacity":
255
,
"_color": {
"__type__": "cc.Color",
"r": 255,
...
...
@@ -18385,7 +18385,7 @@
}
],
"_prefab": null,
"_opacity":
0
,
"_opacity":
255
,
"_color": {
"__type__": "cc.Color",
"r": 255,
...
...
@@ -34698,7 +34698,7 @@
}
],
"_prefab": null,
"_opacity":
0
,
"_opacity":
255
,
"_color": {
"__type__": "cc.Color",
"r": 255,
...
...
@@ -36566,7 +36566,7 @@
}
],
"_prefab": null,
"_opacity":
0
,
"_opacity":
255
,
"_color": {
"__type__": "cc.Color",
"r": 255,
...
...
@@ -39147,7 +39147,7 @@
}
],
"_prefab": null,
"_opacity":
0
,
"_opacity":
255
,
"_color": {
"__type__": "cc.Color",
"r": 255,
...
...
@@ -43628,7 +43628,7 @@
}
],
"_prefab": null,
"_opacity":
0
,
"_opacity":
255
,
"_color": {
"__type__": "cc.Color",
"r": 255,
...
...
@@ -46175,7 +46175,7 @@
}
],
"_prefab": null,
"_opacity":
0
,
"_opacity":
255
,
"_color": {
"__type__": "cc.Color",
"r": 255,
...
...
assets/middleLayer_for_kyxq/script/PageViewer.ts
View file @
e898f71c
...
...
@@ -176,9 +176,9 @@ export default class PageViewerClass extends cc.Component {
if
(
aniType
==
"
leftIn
"
)
{
targetX
=
-
targetX
}
inPage
.
opacity
=
255
;
inPage
.
active
=
true
;
inPage
.
x
=
-
targetX
;
outPage
.
opacity
=
255
;
outPage
.
active
=
true
;
cc
.
tween
(
inPage
)
.
to
(
0.2
,
{
x
:
0
...
...
@@ -190,7 +190,7 @@ export default class PageViewerClass extends cc.Component {
x
:
targetX
})
.
call
(()
=>
{
outPage
.
opacity
=
0
;
outPage
.
active
=
false
;
outPage
.
emit
(
"
unmounted
"
)
resovle
(
true
)
})
...
...
@@ -202,8 +202,8 @@ export default class PageViewerClass extends cc.Component {
targetY
=
-
targetY
}
inPage
.
y
=
-
targetY
;
inPage
.
opacity
=
255
;
outPage
.
opacity
=
255
;
inPage
.
active
=
true
;
outPage
.
active
=
true
;
cc
.
tween
(
inPage
)
.
to
(
0.2
,
{
y
:
0
...
...
@@ -215,7 +215,7 @@ export default class PageViewerClass extends cc.Component {
y
:
targetY
})
.
call
(()
=>
{
outPage
.
opacity
=
0
;
outPage
.
active
=
false
;
outPage
.
emit
(
"
unmounted
"
)
resovle
(
true
)
})
...
...
@@ -223,16 +223,16 @@ export default class PageViewerClass extends cc.Component {
})
}
else
{
if
(
outPage
)
{
outPage
.
opacity
=
0
;
outPage
.
active
=
false
;
outPage
.
emit
(
"
unmounted
"
)
}
else
{
// 未传移除页面 则全部移除
for
(
let
key
in
PageMap
)
{
this
[
PageMap
[
key
]].
opacity
=
0
;
this
[
PageMap
[
key
]].
active
=
false
;
this
[
PageMap
[
key
]].
emit
(
"
unmounted
"
);
}
}
inPage
.
opacity
=
255
;
inPage
.
active
=
true
;
inPage
.
x
=
0
;
inPage
.
y
=
0
;
return
new
Promise
((
resovle
,
reject
)
=>
{
...
...
@@ -241,7 +241,6 @@ export default class PageViewerClass extends cc.Component {
},
200
)
})
}
}
// update (dt) {}
}
assets/middleLayer_for_kyxq/script/UnitPage.ts
View file @
e898f71c
...
...
@@ -69,7 +69,9 @@ export default class UnitPageClass extends PageComponentBaseClass {
isDestory
=
false
;
async
unmounted
()
{
const
content
=
this
.
svContent
;
this
.
unitScrollView
.
off
(
"
scrolling
"
)
const
sv
=
this
.
unitScrollView
.
getComponent
(
cc
.
ScrollView
);
this
.
unitScrollView
.
off
(
"
scrolling
"
);
sv
.
scrollToTop
();
content
.
destroyAllChildren
();
this
.
isDestory
=
true
;
this
.
lastUpdate
=
0
;
...
...
@@ -134,7 +136,6 @@ export default class UnitPageClass extends PageComponentBaseClass {
})
}
async
initTitle
()
{
const
titleLabelNode
=
cc
.
find
(
"
bg/bg_title/label
"
,
this
.
node
);
const
titleLabel
=
titleLabelNode
.
getComponent
(
cc
.
Label
);
...
...
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