fix: 修正关闭英雄弹窗时移除错误UI的问题

修复 HListComp.ts 中 closeHeros 方法错误移除 UIID.Ranks 的问题,改为正确移除 UIID.Heros
This commit is contained in:
walkpan
2026-04-09 09:37:06 +08:00
parent 36d65ac3cc
commit 27541a054e
4 changed files with 643 additions and 416 deletions

View File

@@ -66,18 +66,18 @@
], ],
"_active": true, "_active": true,
"_components": [ "_components": [
{
"__id__": 343
},
{ {
"__id__": 345 "__id__": 345
}, },
{ {
"__id__": 347 "__id__": 347
},
{
"__id__": 349
} }
], ],
"_prefab": { "_prefab": {
"__id__": 349 "__id__": 351
}, },
"_lpos": { "_lpos": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
@@ -7782,15 +7782,18 @@
}, },
{ {
"__id__": 339 "__id__": 339
},
{
"__id__": 342
} }
], ],
"_prefab": { "_prefab": {
"__id__": 342 "__id__": 344
}, },
"_lpos": { "_lpos": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": -283.044, "x": -307.35,
"y": -557.014, "y": -566,
"z": 0 "z": 0
}, },
"_lrot": { "_lrot": {
@@ -7802,8 +7805,8 @@
}, },
"_lscale": { "_lscale": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": 1, "x": 0.8,
"y": 1, "y": 0.8,
"z": 1 "z": 1
}, },
"_mobility": 0, "_mobility": 0,
@@ -7959,6 +7962,42 @@
"handler": "closeHeros", "handler": "closeHeros",
"customEventData": "" "customEventData": ""
}, },
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 334
},
"_enabled": true,
"__prefab": {
"__id__": 343
},
"_alignFlags": 12,
"_target": null,
"_left": -10,
"_right": 0,
"_top": 0,
"_bottom": 25,
"_horizontalCenter": 0,
"_verticalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_alignMode": 2,
"_lockFlags": 0,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "a7uiV9n8lKp5cOeXiR+A4U"
},
{ {
"__type__": "cc.PrefabInfo", "__type__": "cc.PrefabInfo",
"root": { "root": {
@@ -7982,7 +8021,7 @@
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 344 "__id__": 346
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
@@ -8010,7 +8049,7 @@
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 346 "__id__": 348
}, },
"_alignFlags": 45, "_alignFlags": 45,
"_target": null, "_target": null,
@@ -8046,7 +8085,7 @@
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 348 "__id__": 350
}, },
"hero_icon": { "hero_icon": {
"__id__": 30 "__id__": 30

View File

@@ -37,17 +37,17 @@
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 183 "__id__": 177
}, },
{ {
"__id__": 185 "__id__": 179
}, },
{ {
"__id__": 187 "__id__": 181
} }
], ],
"_prefab": { "_prefab": {
"__id__": 189 "__id__": 183
}, },
"_lpos": { "_lpos": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
@@ -105,7 +105,7 @@
"_lpos": { "_lpos": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": 0, "x": 0,
"y": 55, "y": 0,
"z": 0 "z": 0
}, },
"_lrot": { "_lrot": {
@@ -145,8 +145,8 @@
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 720, "width": 730,
"height": 1170 "height": 1290
}, },
"_anchorPoint": { "_anchorPoint": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
@@ -182,7 +182,7 @@
"a": 255 "a": 255
}, },
"_spriteFrame": { "_spriteFrame": {
"__uuid__": "cb93c900-b440-4571-91d1-7da1636e3d73@46c83", "__uuid__": "d7d869bc-06aa-4876-806f-487e68b96780@1e2d6",
"__expectedType__": "cc.SpriteFrame" "__expectedType__": "cc.SpriteFrame"
}, },
"_type": 1, "_type": 1,
@@ -198,7 +198,7 @@
"_isTrimmedMode": true, "_isTrimmedMode": true,
"_useGrayscale": false, "_useGrayscale": false,
"_atlas": { "_atlas": {
"__uuid__": "cb93c900-b440-4571-91d1-7da1636e3d73", "__uuid__": "d7d869bc-06aa-4876-806f-487e68b96780",
"__expectedType__": "cc.SpriteAtlas" "__expectedType__": "cc.SpriteAtlas"
}, },
"_id": "" "_id": ""
@@ -221,10 +221,10 @@
}, },
"_alignFlags": 45, "_alignFlags": 45,
"_target": null, "_target": null,
"_left": 0, "_left": -5,
"_right": 0, "_right": -5,
"_top": 0, "_top": -5,
"_bottom": 110, "_bottom": -5,
"_horizontalCenter": 0, "_horizontalCenter": 0,
"_verticalCenter": 0, "_verticalCenter": 0,
"_isAbsLeft": true, "_isAbsLeft": true,
@@ -3835,89 +3835,35 @@
}, },
{ {
"__type__": "cc.Node", "__type__": "cc.Node",
"_name": "bg_title", "_name": "top_btn_back",
"_objFlags": 0, "_objFlags": 0,
"__editorExtras__": {}, "__editorExtras__": {},
"_parent": { "_parent": {
"__id__": 1 "__id__": 1
}, },
"_children": [
{
"__id__": 167
}
],
"_active": true,
"_components": [
{
"__id__": 176
},
{
"__id__": 178
},
{
"__id__": 180
}
],
"_prefab": {
"__id__": 182
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": -590.092,
"z": 0
},
"_lrot": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1,
"y": -1,
"z": 1
},
"_mobility": 0,
"_layer": 1073741824,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": ""
},
{
"__type__": "cc.Node",
"_name": "arrow",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 166
},
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 168 "__id__": 167
}, },
{ {
"__id__": 170 "__id__": 169
}, },
{ {
"__id__": 172 "__id__": 171
},
{
"__id__": 174
} }
], ],
"_prefab": { "_prefab": {
"__id__": 175 "__id__": 176
}, },
"_lpos": { "_lpos": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": -287.278, "x": -298.4,
"y": -4.225, "y": -559,
"z": 0 "z": 0
}, },
"_lrot": { "_lrot": {
@@ -3929,8 +3875,8 @@
}, },
"_lscale": { "_lscale": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": 1.9, "x": 0.8,
"y": 1.2, "y": 0.8,
"z": 1 "z": 1
}, },
"_mobility": 0, "_mobility": 0,
@@ -3949,16 +3895,16 @@
"_objFlags": 0, "_objFlags": 0,
"__editorExtras__": {}, "__editorExtras__": {},
"node": { "node": {
"__id__": 167 "__id__": 166
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 169 "__id__": 168
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 46, "width": 179,
"height": 76 "height": 140
}, },
"_anchorPoint": { "_anchorPoint": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
@@ -3969,7 +3915,7 @@
}, },
{ {
"__type__": "cc.CompPrefabInfo", "__type__": "cc.CompPrefabInfo",
"fileId": "3f8NdIlo9Nko0ZRXpoLG+C" "fileId": "e5MSYRLPRGvaB6j6LMY0X4"
}, },
{ {
"__type__": "cc.Sprite", "__type__": "cc.Sprite",
@@ -3977,24 +3923,24 @@
"_objFlags": 0, "_objFlags": 0,
"__editorExtras__": {}, "__editorExtras__": {},
"node": { "node": {
"__id__": 167 "__id__": 166
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 171 "__id__": 170
}, },
"_customMaterial": null, "_customMaterial": null,
"_srcBlendFactor": 2, "_srcBlendFactor": 2,
"_dstBlendFactor": 4, "_dstBlendFactor": 4,
"_color": { "_color": {
"__type__": "cc.Color", "__type__": "cc.Color",
"r": 226, "r": 255,
"g": 238, "g": 255,
"b": 255, "b": 255,
"a": 255 "a": 255
}, },
"_spriteFrame": { "_spriteFrame": {
"__uuid__": "6165ffc9-a838-4a33-b569-bdbaaab0e6b4@95d3a", "__uuid__": "cb93c900-b440-4571-91d1-7da1636e3d73@c874e",
"__expectedType__": "cc.SpriteFrame" "__expectedType__": "cc.SpriteFrame"
}, },
"_type": 0, "_type": 0,
@@ -4014,7 +3960,7 @@
}, },
{ {
"__type__": "cc.CompPrefabInfo", "__type__": "cc.CompPrefabInfo",
"fileId": "7d68k5bgtC2Ykasy8w3ODg" "fileId": "daucmH7MZPZKwh5l1pGn+F"
}, },
{ {
"__type__": "cc.Button", "__type__": "cc.Button",
@@ -4022,15 +3968,15 @@
"_objFlags": 0, "_objFlags": 0,
"__editorExtras__": {}, "__editorExtras__": {},
"node": { "node": {
"__id__": 167 "__id__": 166
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 173 "__id__": 172
}, },
"clickEvents": [ "clickEvents": [
{ {
"__id__": 174 "__id__": 173
} }
], ],
"_interactable": true, "_interactable": true,
@@ -4069,12 +4015,14 @@
"_disabledSprite": null, "_disabledSprite": null,
"_duration": 0.1, "_duration": 0.1,
"_zoomScale": 1.2, "_zoomScale": 1.2,
"_target": null, "_target": {
"__id__": 166
},
"_id": "" "_id": ""
}, },
{ {
"__type__": "cc.CompPrefabInfo", "__type__": "cc.CompPrefabInfo",
"fileId": "afCUCqD2FJ2ZfriNs8+Exg" "fileId": "54bJI2sblNtK+3i9X1v9Bn"
}, },
{ {
"__type__": "cc.ClickEvent", "__type__": "cc.ClickEvent",
@@ -4086,92 +4034,6 @@
"handler": "closeRanks", "handler": "closeRanks",
"customEventData": "" "customEventData": ""
}, },
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "7215cNR5tL/pl0phuIT/nF",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 166
},
"_enabled": true,
"__prefab": {
"__id__": 177
},
"_contentSize": {
"__type__": "cc.Size",
"width": 740,
"height": 150
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "c1g554QL5GrJaexXtPZY+E"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 166
},
"_enabled": true,
"__prefab": {
"__id__": 179
},
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_spriteFrame": {
"__uuid__": "cb93c900-b440-4571-91d1-7da1636e3d73@98637",
"__expectedType__": "cc.SpriteFrame"
},
"_type": 0,
"_fillType": 0,
"_sizeMode": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_useGrayscale": false,
"_atlas": null,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "d0kTPKqZ1PzJou+mvzobUm"
},
{ {
"__type__": "cc.Widget", "__type__": "cc.Widget",
"_name": "", "_name": "",
@@ -4182,14 +4044,14 @@
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 181 "__id__": 175
}, },
"_alignFlags": 44, "_alignFlags": 12,
"_target": null, "_target": null,
"_left": -10, "_left": -10,
"_right": -10, "_right": 0,
"_top": 0, "_top": 0,
"_bottom": -25.091999999999985, "_bottom": 25,
"_horizontalCenter": 0, "_horizontalCenter": 0,
"_verticalCenter": 0, "_verticalCenter": 0,
"_isAbsLeft": true, "_isAbsLeft": true,
@@ -4198,7 +4060,7 @@
"_isAbsBottom": true, "_isAbsBottom": true,
"_isAbsHorizontalCenter": true, "_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true, "_isAbsVerticalCenter": true,
"_originalWidth": 540, "_originalWidth": 0,
"_originalHeight": 0, "_originalHeight": 0,
"_alignMode": 2, "_alignMode": 2,
"_lockFlags": 0, "_lockFlags": 0,
@@ -4206,7 +4068,7 @@
}, },
{ {
"__type__": "cc.CompPrefabInfo", "__type__": "cc.CompPrefabInfo",
"fileId": "27yxJEidVPB4dVp5q14nCw" "fileId": "1cV1psjb9AMJJN4Z6s7Q8d"
}, },
{ {
"__type__": "cc.PrefabInfo", "__type__": "cc.PrefabInfo",
@@ -4216,7 +4078,7 @@
"asset": { "asset": {
"__id__": 0 "__id__": 0
}, },
"fileId": "eegITyZ2ZG3Lkeb+C//7n7", "fileId": "06BErKXotFubogbEshIx4i",
"instance": null, "instance": null,
"targetOverrides": null, "targetOverrides": null,
"nestedPrefabInstanceRoots": null "nestedPrefabInstanceRoots": null
@@ -4231,7 +4093,7 @@
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 184 "__id__": 178
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
@@ -4259,7 +4121,7 @@
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 186 "__id__": 180
}, },
"_alignFlags": 45, "_alignFlags": 45,
"_target": null, "_target": null,
@@ -4295,7 +4157,7 @@
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 188 "__id__": 182
}, },
"top1_node": { "top1_node": {
"__id__": 47 "__id__": 47

File diff suppressed because it is too large Load Diff

View File

@@ -103,7 +103,7 @@ export class HListComp extends CCComp {
} }
/** 关闭排行榜弹窗 */ /** 关闭排行榜弹窗 */
closeHeros(){ closeHeros(){
oops.gui.remove(UIID.Ranks) oops.gui.remove(UIID.Heros)
} }
start() { start() {
// 初始化轮播节点数组和固定位置 // 初始化轮播节点数组和固定位置