|
|
@ -4,7 +4,7 @@ import { useRoute, useRouter } from 'vue-router' |
|
|
import { useMonsterStore } from '@/stores/monster' |
|
|
import { useMonsterStore } from '@/stores/monster' |
|
|
import { useCharacterStore } from '@/stores/character' |
|
|
import { useCharacterStore } from '@/stores/character' |
|
|
import { ElMessage } from 'element-plus' |
|
|
import { ElMessage } from 'element-plus' |
|
|
import { ArrowLeft } from '@element-plus/icons-vue' |
|
|
import Particles from '@/components/Particles/Particles.vue' |
|
|
|
|
|
|
|
|
const route = useRoute() |
|
|
const route = useRoute() |
|
|
const router = useRouter() |
|
|
const router = useRouter() |
|
|
@ -185,10 +185,13 @@ onUnmounted(() => { |
|
|
</script> |
|
|
</script> |
|
|
|
|
|
|
|
|
<template> |
|
|
<template> |
|
|
<div class="battle-container"> |
|
|
<div class="battle-page"> |
|
|
<div class="battle-header"> |
|
|
<Particles :particle-count="50" :particle-colors="['#ffffff', '#aaaaaa']" class="particles-bg" /> |
|
|
<el-button :icon="ArrowLeft" circle @click="goBack" /> |
|
|
<div class="page-container"> |
|
|
<h2>战斗</h2> |
|
|
<div class="page-header"> |
|
|
|
|
|
<span class="back-btn" @click="goBack">← 返回</span> |
|
|
|
|
|
<span class="title">战斗</span> |
|
|
|
|
|
<span class="header-placeholder"></span> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
<div v-if="!currentMonster || !currentCharacter" class="loading"> |
|
|
<div v-if="!currentMonster || !currentCharacter" class="loading"> |
|
|
@ -278,39 +281,74 @@ onUnmounted(() => { |
|
|
</div> |
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
<style scoped lang="css"> |
|
|
<style scoped lang="css"> |
|
|
.battle-container { |
|
|
.battle-page { |
|
|
padding: 20px; |
|
|
|
|
|
min-height: 100vh; |
|
|
min-height: 100vh; |
|
|
background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%); |
|
|
background: #000000; |
|
|
|
|
|
padding: 20px; |
|
|
|
|
|
position: relative; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.particles-bg { |
|
|
|
|
|
position: fixed !important; |
|
|
|
|
|
top: 0; |
|
|
|
|
|
left: 0; |
|
|
|
|
|
width: 100% !important; |
|
|
|
|
|
height: 100% !important; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.battle-header { |
|
|
.page-container { |
|
|
|
|
|
max-width: 480px; |
|
|
|
|
|
margin: 0 auto; |
|
|
|
|
|
position: relative; |
|
|
|
|
|
z-index: 10; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.page-header { |
|
|
display: flex; |
|
|
display: flex; |
|
|
|
|
|
justify-content: space-between; |
|
|
align-items: center; |
|
|
align-items: center; |
|
|
gap: 16px; |
|
|
padding: 16px 0; |
|
|
margin-bottom: 24px; |
|
|
margin-bottom: 20px; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.battle-header h2 { |
|
|
.back-btn { |
|
|
color: #f8fafc; |
|
|
color: #666666; |
|
|
margin: 0; |
|
|
font-size: 0.9rem; |
|
|
|
|
|
cursor: pointer; |
|
|
|
|
|
padding: 8px; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.back-btn:hover { |
|
|
|
|
|
color: #ffffff; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.title { |
|
|
|
|
|
color: #ffffff; |
|
|
|
|
|
font-size: 1.1rem; |
|
|
|
|
|
font-weight: 500; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.header-placeholder { |
|
|
|
|
|
width: 60px; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.loading { |
|
|
.loading { |
|
|
color: #64748b; |
|
|
|
|
|
text-align: center; |
|
|
text-align: center; |
|
|
padding: 60px 20px; |
|
|
color: #666666; |
|
|
|
|
|
padding: 40px 20px; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.battle-area { |
|
|
.battle-area { |
|
|
display: flex; |
|
|
display: flex; |
|
|
align-items: center; |
|
|
align-items: center; |
|
|
justify-content: space-between; |
|
|
justify-content: space-between; |
|
|
padding: 40px 20px; |
|
|
padding: 24px 12px; |
|
|
background: rgba(0, 0, 0, 0.2); |
|
|
background: rgba(255, 255, 255, 0.03); |
|
|
|
|
|
border: 1px solid rgba(255, 255, 255, 0.08); |
|
|
border-radius: 16px; |
|
|
border-radius: 16px; |
|
|
margin-bottom: 20px; |
|
|
margin-bottom: 20px; |
|
|
} |
|
|
} |
|
|
@ -321,14 +359,14 @@ onUnmounted(() => { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.combatant-icon { |
|
|
.combatant-icon { |
|
|
width: 100px; |
|
|
width: 88px; |
|
|
height: 100px; |
|
|
height: 88px; |
|
|
margin: 0 auto 16px; |
|
|
margin: 0 auto 12px; |
|
|
display: flex; |
|
|
display: flex; |
|
|
align-items: center; |
|
|
align-items: center; |
|
|
justify-content: center; |
|
|
justify-content: center; |
|
|
background: rgba(255, 255, 255, 0.08); |
|
|
background: rgba(255, 255, 255, 0.06); |
|
|
border-radius: 16px; |
|
|
border-radius: 14px; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.combatant-icon img { |
|
|
.combatant-icon img { |
|
|
@ -351,14 +389,16 @@ onUnmounted(() => { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.vs { |
|
|
.vs { |
|
|
color: #f59e0b; |
|
|
color: #ff8844; |
|
|
font-size: 32px; |
|
|
font-size: 1.4rem; |
|
|
font-weight: 800; |
|
|
font-weight: 800; |
|
|
padding: 0 24px; |
|
|
padding: 0 8px; |
|
|
|
|
|
flex-shrink: 0; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.battle-log { |
|
|
.battle-log { |
|
|
background: rgba(0, 0, 0, 0.3); |
|
|
background: rgba(255, 255, 255, 0.03); |
|
|
|
|
|
border: 1px solid rgba(255, 255, 255, 0.08); |
|
|
border-radius: 12px; |
|
|
border-radius: 12px; |
|
|
padding: 16px; |
|
|
padding: 16px; |
|
|
max-height: 200px; |
|
|
max-height: 200px; |
|
|
@ -395,7 +435,8 @@ onUnmounted(() => { |
|
|
.battle-result { |
|
|
.battle-result { |
|
|
text-align: center; |
|
|
text-align: center; |
|
|
padding: 24px; |
|
|
padding: 24px; |
|
|
background: rgba(0, 0, 0, 0.3); |
|
|
background: rgba(255, 255, 255, 0.03); |
|
|
|
|
|
border: 1px solid rgba(255, 255, 255, 0.08); |
|
|
border-radius: 12px; |
|
|
border-radius: 12px; |
|
|
margin-bottom: 20px; |
|
|
margin-bottom: 20px; |
|
|
} |
|
|
} |
|
|
|