From 2e9d8e57671c53816c0388b0b58b312ed28bc536 Mon Sep 17 00:00:00 2001 From: Nixevol Date: Mon, 1 Jun 2026 12:08:02 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96=E5=89=8D=E7=AB=AF?= =?UTF-8?q?=E5=85=A5=E5=8F=A3=E5=8C=85=E4=BD=93=E7=A7=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/project_context.md | 6 ++ frontend/src/AppShell.vue | 74 ++---------------- .../src/components/LicenseActivationModal.vue | 78 +++++++++++++++++++ frontend/src/router.ts | 3 +- 4 files changed, 92 insertions(+), 69 deletions(-) create mode 100644 frontend/src/components/LicenseActivationModal.vue diff --git a/docs/project_context.md b/docs/project_context.md index 7fa9bc6..7934d01 100644 --- a/docs/project_context.md +++ b/docs/project_context.md @@ -593,3 +593,9 @@ - `frontend/src/components/ApiDocs.vue` no longer registers a page-header `copy sample` action, avoiding duplicate `复制传参示例` buttons on the API documentation page. - The API documentation card still keeps its local toolbar actions: `复制传参示例` and `OpenAPI JSON`. - Verification performed: `npm run build` passed, and generated frontend build output was removed after verification. + +## 2026-06-01: Frontend entry chunk reduction + +- `frontend/src/router.ts` now lazy-loads `FileWorkflow.vue`, matching the other main pages and keeping the data processing page out of the base entry chunk until the route is opened. +- `frontend/src/AppShell.vue` now lazy-loads `LoginView.vue` and the hidden license activation dialog; the dialog UI and activation API flow moved to `frontend/src/components/LicenseActivationModal.vue`. +- Build verification: `npm run build` passed. The base `index` chunk dropped from about `572 kB` to about `461 kB`; the remaining large chunks are still `ApiDocs` (`swagger-ui-dist`) and `ScriptPanel` (`monaco-editor`). diff --git a/frontend/src/AppShell.vue b/frontend/src/AppShell.vue index d7a4802..4f87b0a 100644 --- a/frontend/src/AppShell.vue +++ b/frontend/src/AppShell.vue @@ -112,35 +112,11 @@ - -
-

{{ licenseMessage }}

-
key: {{ activationKeyLabel }}
- -
- -
+ diff --git a/frontend/src/router.ts b/frontend/src/router.ts index 8da1d5f..4b5ce4b 100644 --- a/frontend/src/router.ts +++ b/frontend/src/router.ts @@ -1,7 +1,6 @@ import { createRouter, createWebHistory, type RouteRecordRaw } from 'vue-router'; -import FileWorkflow from './components/FileWorkflow.vue'; - +const FileWorkflow = () => import('./components/FileWorkflow.vue'); const HistoryPanel = () => import('./components/HistoryPanel.vue'); const DatabasePanel = () => import('./components/DatabasePanel.vue'); const SettingsPanel = () => import('./components/SettingsPanel.vue');