迁移
This commit is contained in:
@@ -590,11 +590,16 @@ const chooseEquip = (
|
||||
if (options?.oath || isOathEquipment(equip)) {
|
||||
const oathConfig =
|
||||
configStore.config.oaths[equip.oathPos] ??
|
||||
(configStore.config.oaths[equip.oathPos] = { id: "", adaptation: 0 });
|
||||
(configStore.config.oaths[equip.oathPos] = configStore.createDefaultOathConfig());
|
||||
oathConfig.id = oathConfig.id === equip.id ? "" : equip.id;
|
||||
configStore.pushChangeSource("Equipment", `${oathConfig.id ? "已穿戴" : "已卸下"}${equip.name}`);
|
||||
return;
|
||||
}
|
||||
configStore.chooseEqu(equip, false, options?.subweapon ?? false);
|
||||
configStore.pushChangeSource(
|
||||
"Equipment",
|
||||
`${isSelected(equip, options) ? "已穿戴" : "已卸下"}${equip.name}`,
|
||||
);
|
||||
|
||||
if (isSelected(equip, options)) {
|
||||
sidePanelTab.value = "equipped";
|
||||
@@ -642,16 +647,29 @@ const wearCurrentSuitByRarity = (isOath = false, targetSuitId?: string) => {
|
||||
.filter((item) => item.rarity === currentRarity)
|
||||
.filter((item) => (isOath ? true : !item.name.includes("黑牙")));
|
||||
|
||||
let equippedCount = 0;
|
||||
source.forEach((item) => {
|
||||
if (isOath && item.oathPos) {
|
||||
const oathConfig =
|
||||
configStore.config.oaths[item.oathPos] ??
|
||||
(configStore.config.oaths[item.oathPos] = { id: "", adaptation: 0 });
|
||||
(configStore.config.oaths[item.oathPos] = configStore.createDefaultOathConfig());
|
||||
oathConfig.id = item.id;
|
||||
equippedCount += 1;
|
||||
return;
|
||||
}
|
||||
configStore.chooseEqu(item, false, false);
|
||||
const part = item.itemType === "武器" ? "武器" : item.itemDetailType;
|
||||
const equipmentConfig = configStore.config.equips[part];
|
||||
if (!equipmentConfig) return;
|
||||
equipmentConfig.id = item.id;
|
||||
equippedCount += 1;
|
||||
});
|
||||
|
||||
if (equippedCount) {
|
||||
configStore.pushChangeSource(
|
||||
"Equipment",
|
||||
`已按 ${currentRarity} 穿戴 ${equippedCount} 件${isOath ? "誓约" : "套装"}装备`,
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
const formatLv = (lv: number, rarity: string) =>
|
||||
|
||||
+8
-1
@@ -65,7 +65,14 @@ const cellStyle = {
|
||||
@mouseenter="$emit('preview')"
|
||||
@contextmenu.prevent="$emit('rightClick')"
|
||||
>
|
||||
<img :src="imageUrl" :alt="equipment.name" class="size-full object-contain" />
|
||||
<img
|
||||
:src="imageUrl"
|
||||
:alt="equipment.name"
|
||||
class="size-full object-contain"
|
||||
loading="lazy"
|
||||
decoding="async"
|
||||
fetchpriority="low"
|
||||
/>
|
||||
<div v-if="inactive" class="absolute inset-0 bg-black/45" />
|
||||
</button>
|
||||
<div
|
||||
|
||||
Reference in New Issue
Block a user