- UI框架:从 antd-mobile 迁移到 Ant Design,支持更好的跨平台体验 - 响应式设计:实现移动端、平板、PC端全方位适配 - 移动端:保留底部导航栏,优化触摸交互 - PC端:隐藏底部导航,采用居中布局 - 样式重构:所有组件样式迁移到 CSS Modules(.module.less) - 功能优化: - 练习题答题改进:始终返回正确答案便于用户学习 - 添加题目编号字段(question_id) - 修复判断题选项:由 A/B 改为 true/false - 组件优化: - TabBarLayout 重构,支持响应式显示/隐藏 - 所有页面组件采用 Ant Design 组件替换原 antd-mobile 组件 - 统一使用 @ant-design/icons 图标库 - 文档同步:更新 CLAUDE.md 中 UI 组件使用规范和响应式设计说明 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
40 lines
801 B
TypeScript
40 lines
801 B
TypeScript
import { defineConfig } from 'vite'
|
|
import react from '@vitejs/plugin-react'
|
|
import path from 'path'
|
|
|
|
// https://vitejs.dev/config/
|
|
export default defineConfig({
|
|
plugins: [react()],
|
|
resolve: {
|
|
alias: {
|
|
'@': path.resolve(__dirname, './src'),
|
|
},
|
|
},
|
|
css: {
|
|
preprocessorOptions: {
|
|
less: {
|
|
javascriptEnabled: true,
|
|
// antd 主题定制
|
|
modifyVars: {
|
|
'@primary-color': '#1677ff', // 主色调
|
|
'@link-color': '#1677ff', // 链接色
|
|
'@border-radius-base': '8px', // 组件圆角
|
|
},
|
|
},
|
|
},
|
|
},
|
|
server: {
|
|
port: 3000,
|
|
proxy: {
|
|
'/api': {
|
|
target: 'http://localhost:8080',
|
|
changeOrigin: true,
|
|
},
|
|
},
|
|
},
|
|
build: {
|
|
outDir: 'dist',
|
|
assetsDir: 'assets',
|
|
},
|
|
})
|