feat: 完成任务1 - 建立项目版本管理和基础架构

任务1.1  初始化 Git 版本控制
- 建立 Git 仓库并连接到阿里云服务器
- 创建 .gitignore 和项目文档
- 建立 master/develop 分支管理策略

任务1.2  搭建前端项目基础架构
- 创建 Vue.js 3 + TypeScript 项目
- 集成 Tailwind CSS 和温暖现代主义设计系统
- 实现基础 UI 组件库(BaseButton, BaseCard, BaseInput)
- 建立路由结构和页面组件
- 配置 Vite 构建工具

任务1.3  配置 Capacitor 和本地存储
- 集成 Capacitor.js 并生成 Android 项目
- 配置 SQLite 数据库和数据模型
- 实现完整的数据库服务层
- 创建 Pinia 状态管理 store
- 建立本地数据 CRUD 操作基础

技术栈:Vue 3 + TypeScript + Tailwind CSS + Capacitor + SQLite
This commit is contained in:
2025-08-14 15:35:42 +08:00
parent d11347820a
commit 49fcc374f6
92 changed files with 11099 additions and 3 deletions

View File

@@ -0,0 +1,32 @@
<template>
<button
:class="[
'btn-neumorphic',
{
'btn-primary': variant === 'primary',
'btn-secondary': variant === 'secondary',
},
$attrs.class,
]"
:disabled="disabled"
@click="$emit('click', $event)"
>
<slot />
</button>
</template>
<script setup lang="ts">
interface Props {
variant?: 'primary' | 'secondary'
disabled?: boolean
}
withDefaults(defineProps<Props>(), {
variant: 'primary',
disabled: false,
})
defineEmits<{
click: [event: MouseEvent]
}>()
</script>

View File

@@ -0,0 +1,9 @@
<template>
<div :class="['card-neumorphic', $attrs.class]">
<slot />
</div>
</template>
<script setup lang="ts">
// 这个组件主要通过 CSS 类提供样式
</script>

View File

@@ -0,0 +1,39 @@
<template>
<div class="space-y-2">
<label v-if="label" :for="inputId" class="block text-sm font-medium text-text-primary">
{{ label }}
</label>
<input
:id="inputId"
:type="type"
:placeholder="placeholder"
:value="modelValue"
:disabled="disabled"
class="input-neumorphic"
@input="$emit('update:modelValue', ($event.target as HTMLInputElement).value)"
/>
</div>
</template>
<script setup lang="ts">
import { computed } from 'vue'
interface Props {
modelValue: string | number
type?: string
label?: string
placeholder?: string
disabled?: boolean
}
const props = withDefaults(defineProps<Props>(), {
type: 'text',
disabled: false,
})
const emit = defineEmits<{
'update:modelValue': [value: string]
}>()
const inputId = computed(() => `input-${Math.random().toString(36).substr(2, 9)}`)
</script>