diff --git a/config/config.ts b/config/config.ts index d023093f..619dbf50 100644 --- a/config/config.ts +++ b/config/config.ts @@ -1,7 +1,6 @@ // https://umijs.org/config/ import { join } from 'node:path'; -import tailwindcss from '@tailwindcss/postcss'; import { defineConfig } from '@umijs/max'; import defaultSettings from './defaultSettings'; import proxy from './proxy'; @@ -202,5 +201,8 @@ export default defineConfig({ 'process.env.COMMIT_HASH': process.env.COMMIT_HASH || '', 'process.env.CF_PAGES_COMMIT_SHA': process.env.CF_PAGES_COMMIT_SHA || '', }, - extraPostCSSPlugins: [tailwindcss], + tailwindcss: { + // 这里可以配置 tailwindcss 的选项,具体配置项可以参考 tailwindcss 官方文档 + // https://tailwindcss.com/docs/configuration + }, }); diff --git a/package.json b/package.json index 66e75947..cd73a9e3 100644 --- a/package.json +++ b/package.json @@ -57,7 +57,6 @@ "@biomejs/biome": "^2.1.1", "@commitlint/cli": "^20.1.0", "@commitlint/config-conventional": "^20.0.0", - "@tailwindcss/postcss": "^4", "@testing-library/dom": "^10.4.0", "@testing-library/react": "^16.3.0", "@types/express": "^5.0.6", @@ -79,7 +78,7 @@ "jest-environment-jsdom": "^30.0.5", "lint-staged": "^16.1.2", "mockjs": "^1.1.0", - "tailwindcss": "^4", + "tailwindcss": "^3.3.2", "ts-node": "^10.9.2", "typescript": "^6.0.2", "umi-serve": "^1.9.11" diff --git a/src/global.less b/src/global.less index 799214cf..0bfe7bff 100644 --- a/src/global.less +++ b/src/global.less @@ -1,5 +1,3 @@ -@import '../tailwind.css'; - @font-face { font-family: "AlibabaSans"; font-style: normal; diff --git a/src/pages/Welcome.tsx b/src/pages/Welcome.tsx index 5216d7fd..7b77a531 100644 --- a/src/pages/Welcome.tsx +++ b/src/pages/Welcome.tsx @@ -3,158 +3,138 @@ import { useModel } from '@umijs/max'; import { Card, theme } from 'antd'; import React from 'react'; -/** - * 每个单独的卡片,为了复用样式抽成了组件 - * @param param0 - * @returns - */ const InfoCard: React.FC<{ title: string; index: number; desc: string; href: string; -}> = ({ title, href, index, desc }) => { - const { useToken } = theme; - - const { token } = useToken(); + isDark?: boolean; +}> = ({ title, href, index, desc, isDark }) => { + const { token } = theme.useToken(); return ( -
+ Ant Design Pro 是一个整合了 umi,Ant Design 和 ProComponents + 的脚手架方案。致力于在设计规范和基础组件的基础上,继续向上构建,提炼出典型模板/业务组件/配套设计资源,进一步提升企业级中后台产品设计研发过程中的『用户』和『设计者』的体验。 +
- Ant Design Pro 是一个整合了 umi,Ant Design 和 ProComponents - 的脚手架方案。致力于在设计规范和基础组件的基础上,继续向上构建,提炼出典型模板/业务组件/配套设计资源,进一步提升企业级中后台产品设计研发过程中的『用户』和『设计者』的体验。 -
-