From 31a3e429d79726d64d4419ac6780bb945d42df6b Mon Sep 17 00:00:00 2001 From: zzlgreat Date: Sun, 23 Nov 2025 07:15:07 +0800 Subject: [PATCH] update pay function --- package.json | 5 ++--- postcss.config.js | 5 ++--- src/styles/heroui.css | 13 ++++--------- tailwind.config.js | 19 ------------------- 4 files changed, 8 insertions(+), 34 deletions(-) delete mode 100644 tailwind.config.js diff --git a/package.json b/package.json index 90701077..6a33b14d 100755 --- a/package.json +++ b/package.json @@ -112,13 +112,13 @@ }, "devDependencies": { "@craco/craco": "^7.1.0", + "@tailwindcss/postcss": "next", "@types/node": "^20.19.25", "@types/react": "^19.0.0", "@types/react-dom": "^19.0.0", "@typescript-eslint/eslint-plugin": "^8.46.4", "@typescript-eslint/parser": "^8.46.4", "ajv": "^8.17.1", - "autoprefixer": "^10.4.20", "concurrently": "^8.2.2", "env-cmd": "^11.0.0", "eslint-config-prettier": "8.3.0", @@ -130,11 +130,10 @@ "imagemin-pngquant": "^10.0.0", "kill-port": "^2.0.1", "msw": "^2.11.5", - "postcss": "^8.4.49", "prettier": "2.2.1", "react-error-overlay": "6.0.9", "sharp": "^0.34.4", - "tailwindcss": "^3.4.17", + "tailwindcss": "next", "ts-node": "^10.9.2", "webpack-bundle-analyzer": "^4.10.2", "yn": "^5.1.0" diff --git a/postcss.config.js b/postcss.config.js index 2cb13cb6..fa7d5e7d 100644 --- a/postcss.config.js +++ b/postcss.config.js @@ -1,7 +1,6 @@ -// PostCSS 配置 - Tailwind CSS v3 +// PostCSS 配置 - Tailwind CSS v4 module.exports = { plugins: { - tailwindcss: {}, - autoprefixer: {}, + '@tailwindcss/postcss': {}, }, } diff --git a/src/styles/heroui.css b/src/styles/heroui.css index feb2448c..b9acd7df 100644 --- a/src/styles/heroui.css +++ b/src/styles/heroui.css @@ -1,15 +1,10 @@ /** - * HeroUI v3 + Tailwind CSS v3 配置 + * HeroUI v3 + Tailwind CSS v4 配置 * 参考文档: https://v3.heroui.com/docs/quick-start * - * 注意:HeroUI v3 同时支持 Tailwind v3 和 v4 - * 由于 CRACO 兼容性问题,我们使用 Tailwind v3 + * 重要:HeroUI v3 beta 需要 Tailwind v4 + * 导入顺序:先 tailwindcss,后 @heroui/styles */ -/* Tailwind CSS v3 基础样式 */ -@tailwind base; -@tailwind components; -@tailwind utilities; - -/* HeroUI v3 样式 */ +@import "tailwindcss"; @import "@heroui/styles"; diff --git a/tailwind.config.js b/tailwind.config.js deleted file mode 100644 index 01ab7193..00000000 --- a/tailwind.config.js +++ /dev/null @@ -1,19 +0,0 @@ -/** @type {import('tailwindcss').Config} */ - -module.exports = { - // 只扫描项目源码,不扫描 node_modules - // HeroUI v3 的样式通过 @import "@heroui/styles" 加载,无需扫描 - content: [ - "./src/views/AgentChat/index.js", - "./src/views/AgentChat/components/**/*.{js,jsx}", - "./src/providers/AppProviders.js", - ], - - darkMode: "class", - - theme: { - extend: {}, - }, - - plugins: [], -}