mirror of
https://github.com/setube/ogame-vue-ts.git
synced 2026-05-12 16:05:12 +08:00
feat: 初始化项目结构与核心功能
引入项目基础目录结构,包含多语言支持、主要页面与组件、核心游戏逻辑、UI 组件库、加密与本地持久化、自动化 Docker 构建流程、GitHub issue 模板(中英文)、README(中英文)、LICENSE 及开发配置文件。实现 OGame 单机版主要功能模块,为后续开发和扩展奠定基础。
This commit is contained in:
28
src/components/ResourceIcon.vue
Normal file
28
src/components/ResourceIcon.vue
Normal file
@@ -0,0 +1,28 @@
|
||||
<template>
|
||||
<div :class="[colors[type], sizes[size], 'rounded shadow-sm']" />
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
interface Props {
|
||||
type: 'metal' | 'crystal' | 'deuterium' | 'darkMatter' | 'energy'
|
||||
size?: 'sm' | 'md' | 'lg'
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
size: 'md'
|
||||
})
|
||||
|
||||
const colors = {
|
||||
metal: 'bg-gradient-to-br from-slate-400 to-slate-600',
|
||||
crystal: 'bg-gradient-to-br from-cyan-400 to-blue-600',
|
||||
deuterium: 'bg-gradient-to-br from-green-400 to-emerald-600',
|
||||
darkMatter: 'bg-gradient-to-br from-purple-600 to-indigo-900',
|
||||
energy: 'bg-gradient-to-br from-yellow-400 to-orange-500'
|
||||
}
|
||||
|
||||
const sizes = {
|
||||
sm: 'w-3 h-3',
|
||||
md: 'w-4 h-4',
|
||||
lg: 'w-5 h-5'
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user