2 Commits

Author SHA1 Message Date
pan
f058d02ad9 UI 位置调整 2026-07-31 11:03:17 +08:00
pan
1c4fe42117 refactor(ItemListComp): 简化道具列表显示逻辑
1. 移除未使用的SkillSet导入
2. 优化药剂类道具的文本显示处理,合并多余的字段隐藏逻辑
3. 更新图标解析注释,移除过时的SkillSet引用
2026-07-31 10:59:32 +08:00
5 changed files with 2322 additions and 1575 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -19,7 +19,7 @@ import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ec
import { CCComp } from "../../../../extensions/oops-plugin-framework/assets/module/common/CCComp";
import { CardConfig, CardTriggerType, CKind } from "../common/config/CardSet";
import { EquipPoolList } from "../common/config/EquipSet";
import { FieldSkillSet, SkillSet } from "../common/config/SkillSet";
import { FieldSkillSet } from "../common/config/SkillSet";
import { oops } from "db://oops-framework/core/Oops";
import { getCardIconId, setSpriteFrame } from "../common/CardIconHelper";
import { GameEvent } from "../common/config/GameEvent";
@@ -186,22 +186,17 @@ export class ItemListComp extends CCComp {
}
}
} else if (isPotion) {
// 商品:显示技能描述 + info
const skillConfig = this.cardData.skill ? SkillSet[this.cardData.skill] : null;
const skillInfo = skillConfig?.info || "";
// 商品:显示卡牌 info
const cardInfo = this.cardData.info || "";
if (fieldLabels[0]) {
fieldLabels[0].string = cardInfo;
fieldLabels[0].node.active = !!cardInfo;
}
if (fieldLabels[1]) {
fieldLabels[1].string = skillInfo;
fieldLabels[1].node.active = !!skillInfo && skillInfo !== cardInfo;
}
if (fieldLabels[2]) {
fieldLabels[2].string = "";
fieldLabels[2].node.active = false;
for (let i = 1; i < fieldLabels.length; i++) {
if (!fieldLabels[i]) continue;
fieldLabels[i].string = "";
fieldLabels[i].node.active = false;
}
} else {
// 其他类型:显示 info
@@ -212,7 +207,7 @@ export class ItemListComp extends CCComp {
}
}
// 图标共享工具解析cardData.icon → FieldSkillSet → SkillSet
// 图标共享工具解析cardData.icon → FieldSkillSet
if (this.icon_node) {
const iconId = getCardIconId(this.cardData);
if (iconId) {