platform-assistant/apps/web/tailwind.config.ts
Sisyphus 68f6fc5c16 feat(ui): 前端 UI 组件化重构 + 发布表单增强
【新组件】
- ErrorBoundary: 全局错误边界,渲染崩溃时显示重试/刷新按钮
- ui/Toast: 全局 Toast 通知系统 (success/error/warning/info),Context Provider 模式
- ui/Modal: 统一弹窗 (ESC关闭 + loading遮罩 + 自定义footer)
- ui/Skeleton: 骨架屏 (SkeletonTable / SkeletonCard)
- ui/Lightbox: 图片放大灯箱

【页面迁移】
- InquiryPage: useToast + Modal + SkeletonTable 替换手写代码,新增 pubForm
  发布前预填联系人/电话/地址 + 发布时传 body 给后端
- LeadDetailPage: 迁移到 Toast + Modal
- ProductPage: 迁移到 Toast + Modal + SkeletonTable
- AdminPage: 迁移到 useToast
- ComparisonPage: 迁移到 Toast + SkeletonTable
- ImagePage: 迁移到 Toast + SkeletonCard

【基础设施】
- globals.css: 新增 fadeIn/slideUp 动画
- page.tsx: SPA 根接入 ToastProvider + ErrorBoundary
- tailwind.config.ts: 新增 animate keyframes

【后端】
- integration.service.ts: MCP session 管理 + charset 修复
- lead.controller.ts/lead.service.ts: 发布端点增强 + 物料提取服务注入
2026-07-16 15:46:37 +08:00

45 lines
1.5 KiB
TypeScript

import type { Config } from 'tailwindcss'
const config: Config = {
content: ['./src/**/*.{ts,tsx}'],
theme: {
extend: {
colors: {
primary: '#000000',
secondary: '#0051d5',
'border-subtle': '#E2E8F0',
'success-green': '#10B981',
'error-red': '#EF4444',
'info-blue': '#3B82F6',
'warning-amber': '#F59E0B',
background: '#f7f9fb',
'surface-white': '#FFFFFF',
'surface-container': '#eceef0',
'surface-container-high': '#e6e8ea',
'surface-container-highest': '#e0e3e5',
'surface-container-low': '#f2f4f6',
'on-surface': '#191c1e',
'on-surface-variant': '#45464d',
'on-secondary': '#ffffff',
'on-primary': '#ffffff',
outline: '#76777d',
'outline-variant': '#c6c6cd',
},
fontSize: {
'headline-sm': ['20px', { lineHeight: '28px', fontWeight: '600' }],
'headline-md': ['24px', { lineHeight: '32px', fontWeight: '600' }],
'headline-lg': ['32px', { lineHeight: '40px', fontWeight: '600' }],
'display-lg': ['48px', { lineHeight: '1.1', fontWeight: '700' }],
'body-sm': ['14px', { lineHeight: '20px' }],
'body-md': ['16px', { lineHeight: '24px' }],
'body-lg': ['18px', { lineHeight: '28px' }],
'label-sm': ['12px', { lineHeight: '16px', letterSpacing: '0.02em', fontWeight: '500' }],
'label-md': ['14px', { lineHeight: '16px', letterSpacing: '0.01em', fontWeight: '600' }],
},
},
},
plugins: [],
}
export default config