update pay function

This commit is contained in:
2025-11-22 15:40:21 +08:00
parent 59a5a03637
commit 9b436523ff
3 changed files with 10 additions and 79 deletions

View File

@@ -1,33 +1,19 @@
/** @type {import('tailwindcss').Config} */
const { heroui } = require("@heroui/react");
const path = require("path");
module.exports = {
content: {
relative: true,
files: [
// 只扫描项目源码(不包含 node_modules
"./src/**/*.{js,jsx,ts,tsx}",
"./public/index.html",
content: [
// 只扫描 src 目录(明确指定 js 和 jsx避免 ts 匹配 node_modules
"./src/**/*.js",
"./src/**/*.jsx",
"./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;
},
},
},
// Hero UI 组件库(精确路径)
"./node_modules/@heroui/theme/dist/**/*.js",
"./node_modules/@heroui/react/dist/**/*.js",
],
darkMode: "class", // 支持深色模式
darkMode: "class",
theme: {
extend: {
@@ -60,15 +46,10 @@ module.exports = {
plugins: [heroui()],
// 性能优化
safelist: [
// Hero UI 动态类名
'bg-gradient-to-br',
'from-blue-500',
'to-purple-500',
'backdrop-blur-xl',
],
// 优化缓存
cacheLocation: path.resolve(__dirname, 'node_modules/.cache/tailwindcss'),
}