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:
@@ -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
3
src/styles/tailwind.css
Normal file
@@ -0,0 +1,3 @@
|
||||
@tailwind base;
|
||||
@tailwind components;
|
||||
@tailwind utilities;
|
||||
Reference in New Issue
Block a user