|
|
@ -46,7 +46,8 @@ const scrapLevelColorMap: Record<number, string> = { |
|
|
|
|
|
|
|
|
const getItemIcon = (item: { icon: string | null }) => { |
|
|
const getItemIcon = (item: { icon: string | null }) => { |
|
|
if (item.icon) { |
|
|
if (item.icon) { |
|
|
return new URL(`../assets/icons/${item.icon}`, import.meta.url).href |
|
|
const [dir, file] = item.icon.split('/') |
|
|
|
|
|
return new URL(`../assets/icons/${dir}/${file}`, import.meta.url).href |
|
|
} |
|
|
} |
|
|
return itemDefaultIcon |
|
|
return itemDefaultIcon |
|
|
} |
|
|
} |
|
|
@ -82,11 +83,13 @@ onMounted(() => { |
|
|
<template> |
|
|
<template> |
|
|
<div class="bag-page"> |
|
|
<div class="bag-page"> |
|
|
<Particles :particle-count="30" :particle-colors="['#ffffff', '#cccccc']" class="particles-bg" /> |
|
|
<Particles :particle-count="30" :particle-colors="['#ffffff', '#cccccc']" class="particles-bg" /> |
|
|
|
|
|
|
|
|
<div class="bag-container"> |
|
|
<div class="bag-container"> |
|
|
<StarBorder as="div" color="#8b5cf6" speed="5s" :thickness="2" class="back-btn" @click="handleBack"> |
|
|
<StarBorder as="div" color="#8b5cf6" speed="5s" :thickness="2" class="back-btn" @click="handleBack"> |
|
|
<div class="back-content"> |
|
|
<div class="back-content"> |
|
|
<el-icon><ArrowLeft /></el-icon> |
|
|
<el-icon> |
|
|
|
|
|
<ArrowLeft /> |
|
|
|
|
|
</el-icon> |
|
|
<span>返回</span> |
|
|
<span>返回</span> |
|
|
</div> |
|
|
</div> |
|
|
</StarBorder> |
|
|
</StarBorder> |
|
|
@ -116,18 +119,15 @@ onMounted(() => { |
|
|
<div class="section" v-if="bagStore.paginatedEquipment.length > 0 || bagStore.totalEquipmentPages > 0"> |
|
|
<div class="section" v-if="bagStore.paginatedEquipment.length > 0 || bagStore.totalEquipmentPages > 0"> |
|
|
<div class="section-header"> |
|
|
<div class="section-header"> |
|
|
<span class="section-title">装备</span> |
|
|
<span class="section-title">装备</span> |
|
|
<span class="section-count">({{ bagStore.paginatedEquipment.length }} / {{ bagStore.equipmentItems.length }})</span> |
|
|
<span class="section-count">({{ bagStore.paginatedEquipment.length }} / {{ bagStore.equipmentItems.length |
|
|
|
|
|
}})</span> |
|
|
</div> |
|
|
</div> |
|
|
<div class="items-grid"> |
|
|
<div class="items-grid"> |
|
|
<el-tooltip |
|
|
<el-tooltip v-for="item in bagStore.paginatedEquipment" :key="item.id" :content="getEquipmentTooltip(item)" |
|
|
v-for="item in bagStore.paginatedEquipment" |
|
|
placement="top" :show-after="300"> |
|
|
:key="item.id" |
|
|
|
|
|
:content="getEquipmentTooltip(item)" |
|
|
|
|
|
placement="top" |
|
|
|
|
|
:show-after="300" |
|
|
|
|
|
> |
|
|
|
|
|
<div class="item-cell"> |
|
|
<div class="item-cell"> |
|
|
<img v-if="item.icon" :src="getItemIcon(item)" class="item-icon-img" :class="'rarity-' + (item.itemRarity || 1)" /> |
|
|
<img v-if="item.icon" :src="getItemIcon(item)" class="item-icon-img" |
|
|
|
|
|
:class="'rarity-' + (item.itemRarity || 1)" /> |
|
|
<div v-else class="item-icon">⚔️</div> |
|
|
<div v-else class="item-icon">⚔️</div> |
|
|
<span class="item-name">{{ item.itemName }}</span> |
|
|
<span class="item-name">{{ item.itemName }}</span> |
|
|
<span v-if="item.quantity > 1" class="item-count">{{ item.quantity }}</span> |
|
|
<span v-if="item.quantity > 1" class="item-count">{{ item.quantity }}</span> |
|
|
@ -135,19 +135,12 @@ onMounted(() => { |
|
|
</el-tooltip> |
|
|
</el-tooltip> |
|
|
</div> |
|
|
</div> |
|
|
<div v-if="bagStore.totalEquipmentPages > 1" class="pagination"> |
|
|
<div v-if="bagStore.totalEquipmentPages > 1" class="pagination"> |
|
|
<button |
|
|
<button class="page-btn" :disabled="bagStore.equipmentPage === 1" @click="bagStore.prevEquipmentPage()"> |
|
|
class="page-btn" |
|
|
|
|
|
:disabled="bagStore.equipmentPage === 1" |
|
|
|
|
|
@click="bagStore.prevEquipmentPage()" |
|
|
|
|
|
> |
|
|
|
|
|
上一页 |
|
|
上一页 |
|
|
</button> |
|
|
</button> |
|
|
<span class="page-info">{{ bagStore.equipmentPage }} / {{ bagStore.totalEquipmentPages }}</span> |
|
|
<span class="page-info">{{ bagStore.equipmentPage }} / {{ bagStore.totalEquipmentPages }}</span> |
|
|
<button |
|
|
<button class="page-btn" :disabled="bagStore.equipmentPage >= bagStore.totalEquipmentPages" |
|
|
class="page-btn" |
|
|
@click="bagStore.nextEquipmentPage()"> |
|
|
:disabled="bagStore.equipmentPage >= bagStore.totalEquipmentPages" |
|
|
|
|
|
@click="bagStore.nextEquipmentPage()" |
|
|
|
|
|
> |
|
|
|
|
|
下一页 |
|
|
下一页 |
|
|
</button> |
|
|
</button> |
|
|
</div> |
|
|
</div> |
|
|
@ -160,13 +153,8 @@ onMounted(() => { |
|
|
<span class="section-count">({{ bagStore.paginatedPills.length }} / {{ bagStore.pillItems.length }})</span> |
|
|
<span class="section-count">({{ bagStore.paginatedPills.length }} / {{ bagStore.pillItems.length }})</span> |
|
|
</div> |
|
|
</div> |
|
|
<div class="items-grid"> |
|
|
<div class="items-grid"> |
|
|
<el-tooltip |
|
|
<el-tooltip v-for="item in bagStore.paginatedPills" :key="item.id" :content="getPillTooltip(item)" |
|
|
v-for="item in bagStore.paginatedPills" |
|
|
placement="top" :show-after="300"> |
|
|
:key="item.id" |
|
|
|
|
|
:content="getPillTooltip(item)" |
|
|
|
|
|
placement="top" |
|
|
|
|
|
:show-after="300" |
|
|
|
|
|
> |
|
|
|
|
|
<div class="item-cell"> |
|
|
<div class="item-cell"> |
|
|
<img v-if="item.icon" :src="getItemIcon(item)" class="item-icon-img" /> |
|
|
<img v-if="item.icon" :src="getItemIcon(item)" class="item-icon-img" /> |
|
|
<div v-else class="item-icon">💊</div> |
|
|
<div v-else class="item-icon">💊</div> |
|
|
@ -176,19 +164,12 @@ onMounted(() => { |
|
|
</el-tooltip> |
|
|
</el-tooltip> |
|
|
</div> |
|
|
</div> |
|
|
<div v-if="bagStore.totalPillPages > 1" class="pagination"> |
|
|
<div v-if="bagStore.totalPillPages > 1" class="pagination"> |
|
|
<button |
|
|
<button class="page-btn" :disabled="bagStore.pillPage === 1" @click="bagStore.prevPillPage()"> |
|
|
class="page-btn" |
|
|
|
|
|
:disabled="bagStore.pillPage === 1" |
|
|
|
|
|
@click="bagStore.prevPillPage()" |
|
|
|
|
|
> |
|
|
|
|
|
上一页 |
|
|
上一页 |
|
|
</button> |
|
|
</button> |
|
|
<span class="page-info">{{ bagStore.pillPage }} / {{ bagStore.totalPillPages }}</span> |
|
|
<span class="page-info">{{ bagStore.pillPage }} / {{ bagStore.totalPillPages }}</span> |
|
|
<button |
|
|
<button class="page-btn" :disabled="bagStore.pillPage >= bagStore.totalPillPages" |
|
|
class="page-btn" |
|
|
@click="bagStore.nextPillPage()"> |
|
|
:disabled="bagStore.pillPage >= bagStore.totalPillPages" |
|
|
|
|
|
@click="bagStore.nextPillPage()" |
|
|
|
|
|
> |
|
|
|
|
|
下一页 |
|
|
下一页 |
|
|
</button> |
|
|
</button> |
|
|
</div> |
|
|
</div> |
|
|
@ -198,18 +179,15 @@ onMounted(() => { |
|
|
<div class="section" v-if="bagStore.paginatedScraps.length > 0 || bagStore.totalScrapPages > 0"> |
|
|
<div class="section" v-if="bagStore.paginatedScraps.length > 0 || bagStore.totalScrapPages > 0"> |
|
|
<div class="section-header"> |
|
|
<div class="section-header"> |
|
|
<span class="section-title">垃圾</span> |
|
|
<span class="section-title">垃圾</span> |
|
|
<span class="section-count">({{ bagStore.paginatedScraps.length }} / {{ bagStore.scrapItems.length }})</span> |
|
|
<span class="section-count">({{ bagStore.paginatedScraps.length }} / {{ bagStore.scrapItems.length |
|
|
|
|
|
}})</span> |
|
|
</div> |
|
|
</div> |
|
|
<div class="items-grid"> |
|
|
<div class="items-grid"> |
|
|
<el-tooltip |
|
|
<el-tooltip v-for="item in bagStore.paginatedScraps" :key="item.id" :content="getScrapTooltip(item)" |
|
|
v-for="item in bagStore.paginatedScraps" |
|
|
placement="top" :show-after="300"> |
|
|
:key="item.id" |
|
|
|
|
|
:content="getScrapTooltip(item)" |
|
|
|
|
|
placement="top" |
|
|
|
|
|
:show-after="300" |
|
|
|
|
|
> |
|
|
|
|
|
<div class="item-cell scrap-cell"> |
|
|
<div class="item-cell scrap-cell"> |
|
|
<img v-if="item.icon" :src="getItemIcon(item)" class="item-icon-img" :style="{ borderColor: scrapLevelColorMap[item.scrapLevel || 1] }" /> |
|
|
<img v-if="item.icon" :src="getItemIcon(item)" class="item-icon-img" |
|
|
|
|
|
:style="{ borderColor: scrapLevelColorMap[item.scrapLevel || 1] }" /> |
|
|
<div v-else class="item-icon" :style="{ color: scrapLevelColorMap[item.scrapLevel || 1] }">📦</div> |
|
|
<div v-else class="item-icon" :style="{ color: scrapLevelColorMap[item.scrapLevel || 1] }">📦</div> |
|
|
<span class="item-name">{{ item.itemName }}</span> |
|
|
<span class="item-name">{{ item.itemName }}</span> |
|
|
<span v-if="item.quantity > 1" class="item-count">{{ item.quantity }}</span> |
|
|
<span v-if="item.quantity > 1" class="item-count">{{ item.quantity }}</span> |
|
|
@ -217,19 +195,12 @@ onMounted(() => { |
|
|
</el-tooltip> |
|
|
</el-tooltip> |
|
|
</div> |
|
|
</div> |
|
|
<div v-if="bagStore.totalScrapPages > 1" class="pagination"> |
|
|
<div v-if="bagStore.totalScrapPages > 1" class="pagination"> |
|
|
<button |
|
|
<button class="page-btn" :disabled="bagStore.scrapPage === 1" @click="bagStore.prevScrapPage()"> |
|
|
class="page-btn" |
|
|
|
|
|
:disabled="bagStore.scrapPage === 1" |
|
|
|
|
|
@click="bagStore.prevScrapPage()" |
|
|
|
|
|
> |
|
|
|
|
|
上一页 |
|
|
上一页 |
|
|
</button> |
|
|
</button> |
|
|
<span class="page-info">{{ bagStore.scrapPage }} / {{ bagStore.totalScrapPages }}</span> |
|
|
<span class="page-info">{{ bagStore.scrapPage }} / {{ bagStore.totalScrapPages }}</span> |
|
|
<button |
|
|
<button class="page-btn" :disabled="bagStore.scrapPage >= bagStore.totalScrapPages" |
|
|
class="page-btn" |
|
|
@click="bagStore.nextScrapPage()"> |
|
|
:disabled="bagStore.scrapPage >= bagStore.totalScrapPages" |
|
|
|
|
|
@click="bagStore.nextScrapPage()" |
|
|
|
|
|
> |
|
|
|
|
|
下一页 |
|
|
下一页 |
|
|
</button> |
|
|
</button> |
|
|
</div> |
|
|
</div> |
|
|
@ -315,7 +286,9 @@ onMounted(() => { |
|
|
font-size: 0.9rem; |
|
|
font-size: 0.9rem; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.loading, .error, .empty { |
|
|
.loading, |
|
|
|
|
|
.error, |
|
|
|
|
|
.empty { |
|
|
text-align: center; |
|
|
text-align: center; |
|
|
padding: 40px; |
|
|
padding: 40px; |
|
|
color: #888888; |
|
|
color: #888888; |
|
|
@ -425,10 +398,21 @@ onMounted(() => { |
|
|
text-align: center; |
|
|
text-align: center; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.rarity-1 { filter: grayscale(0.3); } |
|
|
.rarity-1 { |
|
|
.rarity-2 { filter: hue-rotate(80deg) saturate(1.5); } |
|
|
filter: grayscale(0.3); |
|
|
.rarity-3 { filter: hue-rotate(200deg) saturate(2); } |
|
|
} |
|
|
.rarity-4 { filter: hue-rotate(-30deg) saturate(2) brightness(1.2); } |
|
|
|
|
|
|
|
|
.rarity-2 { |
|
|
|
|
|
filter: hue-rotate(80deg) saturate(1.5); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.rarity-3 { |
|
|
|
|
|
filter: hue-rotate(200deg) saturate(2); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.rarity-4 { |
|
|
|
|
|
filter: hue-rotate(-30deg) saturate(2) brightness(1.2); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
.pagination { |
|
|
.pagination { |
|
|
display: flex; |
|
|
display: flex; |
|
|
|