Files
text-adventure-game/components/common/StatItem.vue
Claude cb412544e9 Initial commit: Text Adventure Game
Features:
- Combat system with AP/EP hit calculation and three-layer defense
- Auto-combat/farming mode
- Item system with stacking support
- Skill system with levels, milestones, and parent skill sync
- Shop system with dynamic pricing
- Inventory management with bulk selling
- Event system
- Game loop with offline earnings
- Save/Load system

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 17:13:51 +08:00

30 lines
641 B
Vue

<template>
<view class="stat-item">
<text v-if="icon" class="stat-item__icon">{{ icon }}</text>
<text class="stat-item__label">{{ label }}</text>
<text class="stat-item__value" :style="{ color }">{{ value }}</text>
</view>
</template>
<script setup>
defineProps({
label: String,
value: [Number, String],
icon: String,
color: { type: String, default: '#e0e0e0' }
})
</script>
<style lang="scss" scoped>
.stat-item {
display: inline-flex;
align-items: center;
gap: 8rpx;
padding: 8rpx 16rpx;
&__icon { font-size: 28rpx; }
&__label { color: $text-secondary; }
&__value { font-weight: bold; }
}
</style>