Commit 0360e06
committed
feat: Optimize and upgrade project architecture and style system
🎨 Architecture Optimization
- Refactor router configuration: Split into modular structure (routes/index.ts, constant.ts, async.ts)
- Create centralized API management (src/api/index.ts)
- Add comprehensive TypeScript type definitions (src/types/index.ts)
- Implement environment-based configuration (src/config/env.ts)
- Create reusable window resize hooks (src/hooks/useWindowResize.ts)
- Implement Logger utility to replace console.log (src/utils/logger.ts)
✨ Style System Upgrade
- Create modern common styles library (src/styles/common.scss)
- Add gradient buttons, cards, tables and other component styles
- Implement smooth animation effects (fadeIn, slideInRight)
- Unified spacing utility classes (mt-10, mb-20, etc.)
🔧 Technical Upgrades
- Update Element Plus import paths: lib/ → es/ (better tree-shaking)
- Optimize App.vue: Use useWindowResize hook
- Enhance request.ts: Add TypeScript generics and error handling
- Fix Vite optimizeDeps configuration paths
🐛 Bug Fixes
- Fix menu display issue: Initialize accessRoutes with asyncRoutes
- Fix Dashboard chart rendering: Add nextTick and delayed initialization
- Resolve dependency import errors: Remove non-existent dayjs, @fullcalendar, cropperjs
- Fix TypeScript type errors and most ESLint violations
📦 Dependency Management
- Add pnpm-lock.yaml
- Update project dependency versions
📈 Performance Improvements
- Router file reduced from 584 lines to 45 lines (92% reduction)
- Implement debounced window resize handling
- Optimize chart initialization timing
Files changed: 23 files, 8100+ insertions, 650+ deletions1 parent 1b762fc commit 0360e06
File tree
23 files changed
+8167
-647
lines changed- .vscode
- src
- api
- config
- hooks
- router
- routes
- store/modules/permission
- styles
- types
- utils
- views
- Calendar
- Cropper
- Dashboard
- Personal/components/fullCalendar
23 files changed
+8167
-647
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
0 commit comments