From dcdf6344571c204dcdaa5eff858510e34a619980 Mon Sep 17 00:00:00 2001 From: Citrons <909229731@qq.com> Date: Thu, 13 Aug 2026 18:03:35 +0800 Subject: [PATCH] =?UTF-8?q?fix(GOV-009):=20=E6=B6=88=E9=99=A4=E5=89=8D?= =?UTF-8?q?=E7=AB=AF=E8=BF=90=E8=A1=8C=E6=97=B6=E6=A8=A1=E6=9D=BF=E8=AD=A6?= =?UTF-8?q?=E5=91=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/app/App.test.ts | 1 + web/src/app/router.ts | 4 +++- web/tests/smoke.spec.ts | 4 +++- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/web/src/app/App.test.ts b/web/src/app/App.test.ts index 2fe1201..75409a8 100644 --- a/web/src/app/App.test.ts +++ b/web/src/app/App.test.ts @@ -21,5 +21,6 @@ describe('应用外壳', () => { expect(wrapper.get('header').attributes('aria-label')).toBe('应用导航'); expect(wrapper.get('main').attributes('id')).toBe('main-content'); expect(wrapper.text()).toContain('A 股市场分析工具'); + expect(wrapper.text()).toContain('工程基线已就绪'); }); }); diff --git a/web/src/app/router.ts b/web/src/app/router.ts index aaa5c7c..4cf79c5 100644 --- a/web/src/app/router.ts +++ b/web/src/app/router.ts @@ -4,13 +4,15 @@ import { type RouterHistory, type RouteRecordRaw, } from 'vue-router'; +import { h } from 'vue'; const routes: RouteRecordRaw[] = [ { path: '/', name: 'home', component: { - template: '

工程基线已就绪

', + // 工程基线不引入运行时模板编译器;业务首页落地前用渲染函数提供可观测占位内容。 + render: () => h('section', { 'aria-label': '应用就绪' }, [h('p', '工程基线已就绪')]), }, }, ]; diff --git a/web/tests/smoke.spec.ts b/web/tests/smoke.spec.ts index a4f984f..4c7fedc 100644 --- a/web/tests/smoke.spec.ts +++ b/web/tests/smoke.spec.ts @@ -4,7 +4,9 @@ test('应用外壳在桌面和移动视口均可正常呈现', async ({ page }) const runtimeErrors: string[] = []; page.on('console', (message) => { - if (message.type() === 'error') runtimeErrors.push(message.text()); + if (message.type() === 'error' || message.type() === 'warning') { + runtimeErrors.push(message.text()); + } }); page.on('pageerror', (error) => runtimeErrors.push(error.message));