refactor: 将 Tailwind CSS 从 CDN 迁移到本地安装

**变更内容**:
- 移除 index.html 中的 CDN 链接 (https://cdn.tailwindcss.com)
- 本地安装 Tailwind CSS、PostCSS 和 Autoprefixer
- 创建 tailwind.config.js 配置文件
- 创建 postcss.config.js 配置文件
- 创建 src/styles/tailwind.css 入口文件
- 在 main.js 中导入 Tailwind CSS

**优势**:
-  完全离线运行,不依赖外部网络资源
-  更快的加载速度(无需从 CDN 下载)
-  更稳定的构建过程
-  可自定义 Tailwind 配置

**依赖变化**:
- 新增 devDependencies: tailwindcss, postcss, autoprefixer

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
empty
2026-01-12 01:41:20 +08:00
parent 81b0e937b3
commit d669487717
7 changed files with 216 additions and 1 deletions

View File

@@ -3,6 +3,9 @@ import { createPinia } from 'pinia'
import App from './App.vue'
import { useDatabaseStore } from './stores/database.js'
// 导入 Tailwind CSS
import './styles/tailwind.css'
const app = createApp(App)
const pinia = createPinia()

3
src/styles/tailwind.css Normal file
View File

@@ -0,0 +1,3 @@
@tailwind base;
@tailwind components;
@tailwind utilities;