fix:Transition 白屏——组件多根节点 + Vite 模块请求拦截

- Welcome.vue:回忆卡片 el-dialog 和根 section 共存导致多根节点,<Transition>
  无法动画。包裹一层 <div>
- Study.vue:同上(权重配置对话框)
- MindMapViewer.vue:事件名 selectNode→selectNewNode(类型错误)
- e2e/study.spec.ts + navigation.spec.ts:地址栏 Vite 在模块 URL 后追加
  ?t=... 时间戳,.endsWith('.ts') 匹配失效,改用 url.includes('/src/')
This commit is contained in:
2026-07-04 09:43:07 +08:00
parent 104ae78a2b
commit 3adbeb183c
6 changed files with 14 additions and 7 deletions
+6 -3
View File
@@ -38,7 +38,8 @@ test.describe('Study page', () => {
await page.route('**/api/tasks**', (route) => {
const url = route.request().url();
// 排除 Vite 模块加载请求(.ts 文件),只拦截真正的 API 请求
if (url.endsWith('.ts')) return route.continue();
// Vite 模块请求都走 /src/ 路径,跳过它们只拦截真正的 API 请求
if (url.includes('/src/')) return route.continue();
if (url.includes('/tasks') && !url.includes('/tasks/')) {
return route.fulfill({
status: 200,
@@ -87,7 +88,8 @@ test.describe('Study page', () => {
test('delete task removes it from the list', async ({ page }) => {
await page.route('**/api/tasks/1', (route) => {
const url = route.request().url();
if (url.endsWith('.ts')) return route.continue();
// Vite 模块请求都走 /src/ 路径,跳过它们只拦截真正的 API 请求
if (url.includes('/src/')) return route.continue();
route.fulfill({
status: 200,
contentType: 'application/json',
@@ -102,7 +104,8 @@ test.describe('Study page', () => {
test('shows empty state when no tasks', async ({ page }) => {
await page.route('**/api/tasks**', (route) => {
const url = route.request().url();
if (url.endsWith('.ts')) return route.continue();
// Vite 模块请求都走 /src/ 路径,跳过它们只拦截真正的 API 请求
if (url.includes('/src/')) return route.continue();
route.fulfill({
status: 200,
contentType: 'application/json',