update pay function
This commit is contained in:
@@ -58,6 +58,7 @@
|
|||||||
- **开发工具**: MSW (Mock Service Worker) 用于 API mocking
|
- **开发工具**: MSW (Mock Service Worker) 用于 API mocking
|
||||||
- **虚拟化**: @tanstack/react-virtual 3.13.12(性能优化)
|
- **虚拟化**: @tanstack/react-virtual 3.13.12(性能优化)
|
||||||
- **其他**: Draft.js(富文本编辑)、React Markdown、React Quill
|
- **其他**: Draft.js(富文本编辑)、React Markdown、React Quill
|
||||||
|
- Use HeroUI v3 documentation from https://v3.heroui.com/llms.txt
|
||||||
|
|
||||||
**后端**
|
**后端**
|
||||||
- Flask + SQLAlchemy ORM
|
- Flask + SQLAlchemy ORM
|
||||||
|
|||||||
@@ -1,18 +1,34 @@
|
|||||||
/** @type {import('tailwindcss').Config} */
|
/** @type {import('tailwindcss').Config} */
|
||||||
const { heroui } = require("@heroui/react");
|
const { heroui } = require("@heroui/react");
|
||||||
|
const path = require("path");
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
content: [
|
content: {
|
||||||
// React 组件(排除 node_modules)
|
relative: true,
|
||||||
"./src/**/*.{js,jsx,ts,tsx}",
|
files: [
|
||||||
"./public/index.html",
|
// 只扫描项目源码(不包含 node_modules)
|
||||||
|
"./src/**/*.{js,jsx,ts,tsx}",
|
||||||
|
"./public/index.html",
|
||||||
|
|
||||||
|
// Hero UI 必需的文件(精确路径)
|
||||||
|
"./node_modules/@heroui/theme/dist/**/*.{js,mjs}",
|
||||||
|
"./node_modules/@heroui/react/dist/**/*.{js,mjs}",
|
||||||
|
],
|
||||||
|
// 明确排除 node_modules 的其他部分
|
||||||
|
transform: {
|
||||||
|
// 排除 node_modules 中非 heroui 的文件
|
||||||
|
DEFAULT: (content, { path: filePath }) => {
|
||||||
|
// 如果是 node_modules 中的文件,但不是 @heroui,则跳过
|
||||||
|
if (filePath.includes('node_modules') && !filePath.includes('@heroui')) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
return content;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
darkMode: "class", // 支持深色模式
|
||||||
|
|
||||||
// Hero UI 组件(只扫描必要的路径)
|
|
||||||
"./node_modules/@heroui/theme/dist/**/*.{js,ts,jsx,tsx}",
|
|
||||||
"./node_modules/@heroui/react/dist/**/*.{js,ts,jsx,tsx}",
|
|
||||||
],
|
|
||||||
// 添加 JIT 模式优化
|
|
||||||
mode: 'jit',
|
|
||||||
theme: {
|
theme: {
|
||||||
extend: {
|
extend: {
|
||||||
// Brainwave 自定义颜色
|
// Brainwave 自定义颜色
|
||||||
@@ -41,15 +57,18 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
darkMode: "class", // 支持深色模式(class 或 media)
|
|
||||||
plugins: [heroui()],
|
plugins: [heroui()],
|
||||||
|
|
||||||
// 性能优化
|
// 性能优化
|
||||||
safelist: [
|
safelist: [
|
||||||
// Hero UI 动态类名(避免被 purge)
|
// Hero UI 动态类名
|
||||||
'bg-gradient-to-br',
|
'bg-gradient-to-br',
|
||||||
'from-blue-500',
|
'from-blue-500',
|
||||||
'to-purple-500',
|
'to-purple-500',
|
||||||
'backdrop-blur-xl',
|
'backdrop-blur-xl',
|
||||||
],
|
],
|
||||||
|
|
||||||
|
// 优化缓存
|
||||||
|
cacheLocation: path.resolve(__dirname, 'node_modules/.cache/tailwindcss'),
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user