fix(heroList): 调整英雄卡片等级显示格式与UI布局

1. 移除等级文本前缀"Lv.",仅显示纯数字等级
2. 重构cardlite预制体的等级显示UI组件:替换原精灵为文本标签,调整位置、尺寸与样式
3. 修正节点命名与层级关系,优化升级图标布局
This commit is contained in:
pan
2026-09-07 10:24:56 +08:00
parent 2d82528abf
commit 852976d54b
3 changed files with 1943 additions and 1620 deletions

View File

@@ -36,6 +36,9 @@
{
"__id__": 107
},
{
"__id__": 133
},
{
"__id__": 145
}
@@ -43,14 +46,14 @@
"_active": true,
"_components": [
{
"__id__": 157
"__id__": 161
},
{
"__id__": 159
"__id__": 163
}
],
"_prefab": {
"__id__": 161
"__id__": 165
},
"_lpos": {
"__type__": "cc.Vec3",
@@ -1782,22 +1785,16 @@
},
{
"__id__": 124
},
{
"__id__": 130
},
{
"__id__": 136
}
],
"_active": true,
"_components": [
{
"__id__": 142
"__id__": 130
}
],
"_prefab": {
"__id__": 144
"__id__": 132
},
"_lpos": {
"__type__": "cc.Vec3",
@@ -1911,7 +1908,7 @@
},
"_lpos": {
"__type__": "cc.Vec3",
"x": -45,
"x": -50,
"y": 0,
"z": 0
},
@@ -1952,8 +1949,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 90,
"height": 20
"width": 100,
"height": 17.9
},
"_anchorPoint": {
"__type__": "cc.Vec2",
@@ -2041,8 +2038,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 94,
"height": 20
"width": 104,
"height": 18
},
"_anchorPoint": {
"__type__": "cc.Vec2",
@@ -2119,7 +2116,7 @@
"__id__": 112
},
"_mode": 0,
"_totalLength": 90,
"_totalLength": 100,
"_progress": 1,
"_reverse": false,
"_id": ""
@@ -2179,7 +2176,7 @@
},
{
"__type__": "cc.Node",
"_name": "Alert_Diamond_Single_Green",
"_name": "Label",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
@@ -2198,304 +2195,6 @@
"_prefab": {
"__id__": 129
},
"_lpos": {
"__type__": "cc.Vec3",
"x": -42,
"y": 0,
"z": 0
},
"_lrot": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 0.3,
"y": 0.3,
"z": 1
},
"_mobility": 0,
"_layer": 1073741824,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": ""
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 124
},
"_enabled": true,
"__prefab": {
"__id__": 126
},
"_contentSize": {
"__type__": "cc.Size",
"width": 102,
"height": 107
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "da0CRrsAJAAp+PgjtEm0Ks"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 124
},
"_enabled": true,
"__prefab": {
"__id__": 128
},
"_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@bec19",
"__expectedType__": "cc.SpriteFrame"
},
"_type": 0,
"_fillType": 0,
"_sizeMode": 1,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_useGrayscale": false,
"_atlas": {
"__uuid__": "cb93c900-b440-4571-91d1-7da1636e3d73",
"__expectedType__": "cc.SpriteAtlas"
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "90KdQgFk9NG5DAZoOSo6Bf"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "33r1rWoE9EMb072v4SlUA9",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
},
{
"__type__": "cc.Node",
"_name": "lvl",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 107
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 131
},
{
"__id__": 133
}
],
"_prefab": {
"__id__": 135
},
"_lpos": {
"__type__": "cc.Vec3",
"x": -42,
"y": 0,
"z": 0
},
"_lrot": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1.125,
"y": 1.125,
"z": 1
},
"_mobility": 0,
"_layer": 1073741824,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": ""
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 130
},
"_enabled": true,
"__prefab": {
"__id__": 132
},
"_contentSize": {
"__type__": "cc.Size",
"width": 14.0107421875,
"height": 30.46
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "4dqU3tFDtGbatoXWgLFpJA"
},
{
"__type__": "cc.Label",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 130
},
"_enabled": true,
"__prefab": {
"__id__": 134
},
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_string": "9",
"_horizontalAlign": 1,
"_verticalAlign": 1,
"_actualFontSize": 18,
"_fontSize": 18,
"_fontFamily": "Arial",
"_lineHeight": 21,
"_overflow": 0,
"_enableWrapText": true,
"_font": null,
"_isSystemFontUsed": true,
"_spacingX": 0,
"_isItalic": false,
"_isBold": false,
"_isUnderline": false,
"_underlineHeight": 2,
"_cacheMode": 0,
"_enableOutline": true,
"_outlineColor": {
"__type__": "cc.Color",
"r": 0,
"g": 0,
"b": 0,
"a": 255
},
"_outlineWidth": 2,
"_enableShadow": false,
"_shadowColor": {
"__type__": "cc.Color",
"r": 0,
"g": 0,
"b": 0,
"a": 255
},
"_shadowOffset": {
"__type__": "cc.Vec2",
"x": 2,
"y": 2
},
"_shadowBlur": 2,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "eccX4h4XFHYICC7LZQu1sK"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "b3jvDRk1NNjL5FE2pyUByW",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
},
{
"__type__": "cc.Node",
"_name": "Label",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 107
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 137
},
{
"__id__": 139
}
],
"_prefab": {
"__id__": 141
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 4.188,
@@ -2531,11 +2230,11 @@
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 136
"__id__": 124
},
"_enabled": true,
"__prefab": {
"__id__": 138
"__id__": 126
},
"_contentSize": {
"__type__": "cc.Size",
@@ -2559,11 +2258,11 @@
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 136
"__id__": 124
},
"_enabled": true,
"__prefab": {
"__id__": 140
"__id__": 128
},
"_customMaterial": null,
"_srcBlendFactor": 2,
@@ -2644,12 +2343,12 @@
},
"_enabled": true,
"__prefab": {
"__id__": 143
"__id__": 131
},
"_contentSize": {
"__type__": "cc.Size",
"width": 90,
"height": 20
"width": 100,
"height": 18
},
"_anchorPoint": {
"__type__": "cc.Vec2",
@@ -2685,17 +2384,17 @@
},
"_children": [
{
"__id__": 146
"__id__": 134
}
],
"_active": true,
"_active": false,
"_components": [
{
"__id__": 154
"__id__": 142
}
],
"_prefab": {
"__id__": 156
"__id__": 144
},
"_lpos": {
"__type__": "cc.Vec3",
@@ -2732,23 +2431,23 @@
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 145
"__id__": 133
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 147
"__id__": 135
},
{
"__id__": 149
"__id__": 137
},
{
"__id__": 151
"__id__": 139
}
],
"_prefab": {
"__id__": 153
"__id__": 141
},
"_lpos": {
"__type__": "cc.Vec3",
@@ -2785,11 +2484,11 @@
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 146
"__id__": 134
},
"_enabled": true,
"__prefab": {
"__id__": 148
"__id__": 136
},
"_contentSize": {
"__type__": "cc.Size",
@@ -2813,11 +2512,11 @@
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 146
"__id__": 134
},
"_enabled": true,
"__prefab": {
"__id__": 150
"__id__": 138
},
"_customMaterial": null,
"_srcBlendFactor": 2,
@@ -2858,11 +2557,11 @@
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 146
"__id__": 134
},
"_enabled": true,
"__prefab": {
"__id__": 152
"__id__": 140
},
"playOnLoad": true,
"_clips": [
@@ -2900,11 +2599,11 @@
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 145
"__id__": 133
},
"_enabled": true,
"__prefab": {
"__id__": 155
"__id__": 143
},
"_contentSize": {
"__type__": "cc.Size",
@@ -2935,6 +2634,399 @@
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
},
{
"__type__": "cc.Node",
"_name": "lv",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 1
},
"_children": [
{
"__id__": 146
},
{
"__id__": 152
}
],
"_active": true,
"_components": [
{
"__id__": 158
}
],
"_prefab": {
"__id__": 160
},
"_lpos": {
"__type__": "cc.Vec3",
"x": -43.781,
"y": 136.914,
"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": "Alert_Diamond_Single_Green",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 145
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 147
},
{
"__id__": 149
}
],
"_prefab": {
"__id__": 151
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_lrot": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 0.3,
"y": 0.3,
"z": 1
},
"_mobility": 0,
"_layer": 1073741824,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": ""
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 146
},
"_enabled": true,
"__prefab": {
"__id__": 148
},
"_contentSize": {
"__type__": "cc.Size",
"width": 102,
"height": 107
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "da0CRrsAJAAp+PgjtEm0Ks"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 146
},
"_enabled": true,
"__prefab": {
"__id__": 150
},
"_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@bec19",
"__expectedType__": "cc.SpriteFrame"
},
"_type": 0,
"_fillType": 0,
"_sizeMode": 1,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_useGrayscale": false,
"_atlas": {
"__uuid__": "cb93c900-b440-4571-91d1-7da1636e3d73",
"__expectedType__": "cc.SpriteAtlas"
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "90KdQgFk9NG5DAZoOSo6Bf"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "33r1rWoE9EMb072v4SlUA9",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
},
{
"__type__": "cc.Node",
"_name": "lvl",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 145
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 153
},
{
"__id__": 155
}
],
"_prefab": {
"__id__": 157
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_lrot": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1.125,
"y": 1.125,
"z": 1
},
"_mobility": 0,
"_layer": 1073741824,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": ""
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 152
},
"_enabled": true,
"__prefab": {
"__id__": 154
},
"_contentSize": {
"__type__": "cc.Size",
"width": 14.0107421875,
"height": 30.46
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "4dqU3tFDtGbatoXWgLFpJA"
},
{
"__type__": "cc.Label",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 152
},
"_enabled": true,
"__prefab": {
"__id__": 156
},
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_string": "9",
"_horizontalAlign": 1,
"_verticalAlign": 1,
"_actualFontSize": 18,
"_fontSize": 18,
"_fontFamily": "Arial",
"_lineHeight": 21,
"_overflow": 0,
"_enableWrapText": true,
"_font": null,
"_isSystemFontUsed": true,
"_spacingX": 0,
"_isItalic": false,
"_isBold": false,
"_isUnderline": false,
"_underlineHeight": 2,
"_cacheMode": 0,
"_enableOutline": true,
"_outlineColor": {
"__type__": "cc.Color",
"r": 0,
"g": 0,
"b": 0,
"a": 255
},
"_outlineWidth": 2,
"_enableShadow": false,
"_shadowColor": {
"__type__": "cc.Color",
"r": 0,
"g": 0,
"b": 0,
"a": 255
},
"_shadowOffset": {
"__type__": "cc.Vec2",
"x": 2,
"y": 2
},
"_shadowBlur": 2,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "eccX4h4XFHYICC7LZQu1sK"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "b3jvDRk1NNjL5FE2pyUByW",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 145
},
"_enabled": true,
"__prefab": {
"__id__": 159
},
"_contentSize": {
"__type__": "cc.Size",
"width": 100,
"height": 100
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "04R9WF+7hF3ZyUbQWiOZgb"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "f4eHmGDLdIi7H1smeV1wRV",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
},
{
"__type__": "cc.UITransform",
"_name": "",
@@ -2945,7 +3037,7 @@
},
"_enabled": true,
"__prefab": {
"__id__": 158
"__id__": 162
},
"_contentSize": {
"__type__": "cc.Size",
@@ -2973,7 +3065,7 @@
},
"_enabled": true,
"__prefab": {
"__id__": 160
"__id__": 164
},
"name_node": {
"__id__": 91
@@ -2987,13 +3079,13 @@
"__id__": 2
},
"lvl_node": {
"__id__": 133
"__id__": 155
},
"canup_node": {
"__id__": 145
"__id__": 133
},
"frag_label": {
"__id__": 139
"__id__": 127
},
"frag_progress": {
"__id__": 119

File diff suppressed because it is too large Load Diff

View File

@@ -70,7 +70,7 @@ export class HerosListComp extends CCComp {
@property(Prefab)
card_lite_prefab = null!
/** 卡池等级 Label,直接显示 lv.X */
/** 卡池等级 Label,直接显示 X */
@property(Label)
lv_label = null!
@@ -442,7 +442,7 @@ export class HerosListComp extends CCComp {
private updateLvDisplay(uuid: number) {
if (!this.lv_label) return
const outerLv = smc.getHeroOuterLv(uuid)
this.lv_label.string = `Lv.${outerLv}`
this.lv_label.string = `${outerLv}`
}
private updateRoleDisplay(hero: typeof HeroInfo[number]) {