From e635fa8dcd520d6c5f223a8118983685fd022804 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=BB=84=E8=87=AA=E8=BE=BE?= <980324341@qq.com>
Date: Tue, 6 Oct 2026 13:44:41 +0800
Subject: [PATCH] =?UTF-8?q?chore(=E6=B8=85=E7=90=86):=20=E5=88=A0=E9=99=A4?=
=?UTF-8?q?=2010=20=E4=B8=AA=E9=9B=B6=E5=BC=95=E7=94=A8=E6=96=87=E4=BB=B6?=
=?UTF-8?q?=E5=B9=B6=E8=A3=81=E5=89=AA=E9=92=89=E4=BD=8F=E5=AE=83=E4=BB=AC?=
=?UTF-8?q?=E7=9A=84=E6=8A=A4=E6=A0=8F=E6=96=AD=E8=A8=80?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
admin-frontend-vue:AdminConfirm.vue 只是 openAdminConfirm 的空壳包装(调用方走
imperative 入口);StatusPill/ModalShell/DrawerShell 与各自的 status-pill-model、
modal-model 构成孤儿岛,无任何页面 import;MaskReveal.vue 无引用点(掩码语义仍由
店铺侧 secret-mask 承担);duplicate-api.ts 是被 duplicate-console-api.ts 取代的
平行实现,DuplicateCheckPage 只用后者。frontend-vue:shared/utils/bootstrap.ts 全仓零命中。
护栏随之收口:task-248.test.ts 整支删除(8 个用例全在钉 modal-model 与两个 Shell),
task-247 去掉 status-pill-model 的 6 个用例与三个组件的钉(保留 CopyText/copy-model),
task-245 去掉 AdminConfirm.vue 的两行,task-115/117/118 去掉 duplicate-api.ts 的端点钉。
---
.../src/components/AdminConfirm.vue | 16 ----
.../src/components/DrawerShell.vue | 42 ----------
.../src/components/MaskReveal.vue | 81 -------------------
.../src/components/ModalShell.vue | 42 ----------
.../src/components/StatusPill.vue | 25 ------
.../src/components/admin-confirm-model.ts | 2 +-
.../src/components/modal-model.ts | 30 -------
.../src/components/status-pill-model.ts | 37 ---------
.../src/pages/tasks/duplicate-api.ts | 43 ----------
admin-frontend-vue/tests/task-115.test.ts | 5 +-
admin-frontend-vue/tests/task-117.test.ts | 5 +-
admin-frontend-vue/tests/task-118.test.ts | 5 +-
admin-frontend-vue/tests/task-245.test.ts | 4 +-
admin-frontend-vue/tests/task-247.test.ts | 56 +------------
admin-frontend-vue/tests/task-248.test.ts | 74 -----------------
frontend-vue/src/shared/utils/bootstrap.ts | 16 ----
16 files changed, 7 insertions(+), 476 deletions(-)
delete mode 100644 admin-frontend-vue/src/components/AdminConfirm.vue
delete mode 100644 admin-frontend-vue/src/components/DrawerShell.vue
delete mode 100644 admin-frontend-vue/src/components/MaskReveal.vue
delete mode 100644 admin-frontend-vue/src/components/ModalShell.vue
delete mode 100644 admin-frontend-vue/src/components/StatusPill.vue
delete mode 100644 admin-frontend-vue/src/components/modal-model.ts
delete mode 100644 admin-frontend-vue/src/components/status-pill-model.ts
delete mode 100644 admin-frontend-vue/src/pages/tasks/duplicate-api.ts
delete mode 100644 admin-frontend-vue/tests/task-248.test.ts
delete mode 100644 frontend-vue/src/shared/utils/bootstrap.ts
diff --git a/admin-frontend-vue/src/components/AdminConfirm.vue b/admin-frontend-vue/src/components/AdminConfirm.vue
deleted file mode 100644
index f7597bc8a..000000000
--- a/admin-frontend-vue/src/components/AdminConfirm.vue
+++ /dev/null
@@ -1,16 +0,0 @@
-
diff --git a/admin-frontend-vue/src/components/DrawerShell.vue b/admin-frontend-vue/src/components/DrawerShell.vue
deleted file mode 100644
index b83eadf1c..000000000
--- a/admin-frontend-vue/src/components/DrawerShell.vue
+++ /dev/null
@@ -1,42 +0,0 @@
-
-
-
-
- {{ head.subtitle }}
-
-
-
-
-
-
-
-
diff --git a/admin-frontend-vue/src/components/MaskReveal.vue b/admin-frontend-vue/src/components/MaskReveal.vue
deleted file mode 100644
index f29094c22..000000000
--- a/admin-frontend-vue/src/components/MaskReveal.vue
+++ /dev/null
@@ -1,81 +0,0 @@
-
-
-
-
- {{ revealed && value ? value : secretPlaceholder() }}
-
-
-
-
-
diff --git a/admin-frontend-vue/src/components/ModalShell.vue b/admin-frontend-vue/src/components/ModalShell.vue
deleted file mode 100644
index 50457e025..000000000
--- a/admin-frontend-vue/src/components/ModalShell.vue
+++ /dev/null
@@ -1,42 +0,0 @@
-
-
-
-
- {{ head.subtitle }}
-
-
-
-
-
-
-
-
diff --git a/admin-frontend-vue/src/components/StatusPill.vue b/admin-frontend-vue/src/components/StatusPill.vue
deleted file mode 100644
index 3727df5bc..000000000
--- a/admin-frontend-vue/src/components/StatusPill.vue
+++ /dev/null
@@ -1,25 +0,0 @@
-
-
-
- {{ text }}
-
-
-
diff --git a/admin-frontend-vue/src/components/admin-confirm-model.ts b/admin-frontend-vue/src/components/admin-confirm-model.ts
index cf71fa4d7..4dbc18c88 100644
--- a/admin-frontend-vue/src/components/admin-confirm-model.ts
+++ b/admin-frontend-vue/src/components/admin-confirm-model.ts
@@ -2,7 +2,7 @@
* 二次确认模型(module 13 task 245):文案/按钮键规则对齐 admin-interactions.js ——
* 优先显式 message,否则由行名拼接「确认删除“X”吗?此操作可能影响已有数据。」;
* danger(删除/清空/删除导入类)默认标题「删除前确认」、确认键「确认删除」。
- * 纯逻辑、无 UI 依赖,便于单测;打开入口见 admin-confirm.ts / AdminConfirm.vue。
+ * 纯逻辑、无 UI 依赖,便于单测;打开入口见 admin-confirm.ts。
*/
export const ADMIN_CONFIRM = {
dangerTitle: '删除前确认',
diff --git a/admin-frontend-vue/src/components/modal-model.ts b/admin-frontend-vue/src/components/modal-model.ts
deleted file mode 100644
index 4bd32a6cb..000000000
--- a/admin-frontend-vue/src/components/modal-model.ts
+++ /dev/null
@@ -1,30 +0,0 @@
-/**
- * 模态/抽屉布局模型(module 13 task 248):统一两种承载容器的尺寸与关闭语义,
- * 对齐 admin.html —— 居中 modal width min(920px,100vw-48)、radius14;右侧 drawer
- * width min(460px,100%);遮罩点击与 Esc 均关闭。页面接入统一尺寸与头/脚槽。
- */
-export const ADMIN_MODAL_WIDTH = 'min(920px, 100vw - 48px)'
-export const ADMIN_DRAWER_WIDTH = 'min(460px, 100%)'
-export const ADMIN_MODAL_RADIUS = 14
-
-export interface AdminContainerSpec {
- width: string
- radius?: number
- maskClosable: boolean
- escClosable: boolean
-}
-
-export function modalLayoutSpec(): AdminContainerSpec {
- return { width: ADMIN_MODAL_WIDTH, radius: ADMIN_MODAL_RADIUS, maskClosable: true, escClosable: true }
-}
-
-export function drawerLayoutSpec(): AdminContainerSpec {
- return { width: ADMIN_DRAWER_WIDTH, maskClosable: true, escClosable: true }
-}
-
-/** 页面头标题归一:空/空白标题兜底「操作」,副标题去空白后无则省略。 */
-export function dialogTitleOf(opts: { title?: string; subtitle?: string }): { title: string; subtitle?: string } {
- const title = opts.title?.trim()
- const subtitle = opts.subtitle?.trim()
- return { title: title || '操作', ...(subtitle ? { subtitle } : {}) }
-}
diff --git a/admin-frontend-vue/src/components/status-pill-model.ts b/admin-frontend-vue/src/components/status-pill-model.ts
deleted file mode 100644
index 0a331f05b..000000000
--- a/admin-frontend-vue/src/components/status-pill-model.ts
+++ /dev/null
@@ -1,37 +0,0 @@
-/**
- * 状态药丸配色/分类模型(module 13 task 247):统一 admin.html 的三态语义色
- * (success 绿 / danger 红 / warning 琥珀 / info 蓝 / primary 深蓝),供视频任务、
- * 店铺数据任务、数字人版本等页面复用;未知文本回落 info。
- */
-export type PillTone = 'success' | 'danger' | 'warning' | 'info' | 'primary'
-
-export interface PillToneStyle {
- text: string
- bg: string
-}
-
-export const PILL_TONES: Record = {
- success: { text: '#4e806d', bg: '#e6f6ec' },
- danger: { text: '#b35f6a', bg: '#fdecec' },
- warning: { text: '#a8793e', bg: '#fdf0dc' },
- info: { text: '#4f78a5', bg: '#e7f0f8' },
- primary: { text: '#2f5d8b', bg: '#e6f0f8' },
-}
-
-/** 取某 tone 的配色;未知 tone 回退 info(不抛错)。 */
-export function pillToneStyle(tone: PillTone): PillToneStyle {
- return PILL_TONES[tone] ?? PILL_TONES.info
-}
-
-const SUCCESS_PATTERN = /success|succeed|已发布|发布|成功|正常|可用/
-const DANGER_PATTERN = /fail|error|已废弃|失败|不可用|异常/
-const WARNING_PATTERN = /running|pending|waiting|进行|处理中|草稿|待执行|待/
-
-/** 由状态文本(中英文)归类语义 tone。 */
-export function statusTone(raw: string): PillTone {
- const s = (raw || '').toLowerCase()
- if (SUCCESS_PATTERN.test(s)) return 'success'
- if (DANGER_PATTERN.test(s)) return 'danger'
- if (WARNING_PATTERN.test(s)) return 'warning'
- return 'info'
-}
diff --git a/admin-frontend-vue/src/pages/tasks/duplicate-api.ts b/admin-frontend-vue/src/pages/tasks/duplicate-api.ts
deleted file mode 100644
index bb77b637a..000000000
--- a/admin-frontend-vue/src/pages/tasks/duplicate-api.ts
+++ /dev/null
@@ -1,43 +0,0 @@
-/** 店铺数据重复检查适配(任务 115-119):/api/admin/shop-data-crawl/duplicate-check-* 系列端点。 */
-import { http } from '@/api/http'
-import {
- parseDuplicateDetailPage,
- parseDuplicateItemsPage,
- parseDuplicateOverview,
- type DuplicateOverview,
-} from './duplicate-model.ts'
-import { toDuplicateItemsQuery, type DuplicateFilter } from './duplicate-filter.ts'
-
-export const DUPLICATE_CHECK_ENDPOINT = '/api/admin/shop-data-crawl'
-
-/** 加载撞款总览(可选 force=1 触发同步重扫)。 */
-export async function fetchDuplicateOverview(force = false): Promise {
- const { data } = await http.get(`${DUPLICATE_CHECK_ENDPOINT}/duplicate-check-overview`, {
- params: force ? { force: '1' } : undefined,
- })
- return parseDuplicateOverview(data)
-}
-
-/** 加载撞款明细分页列表:GET /duplicate-check-items。 */
-export async function fetchDuplicateItems(
- filter: DuplicateFilter,
- page: number,
- pageSize: number,
-): Promise> {
- const { data } = await http.get(`${DUPLICATE_CHECK_ENDPOINT}/duplicate-check-items`, {
- params: toDuplicateItemsQuery(filter, page, pageSize),
- })
- return parseDuplicateItemsPage(data)
-}
-
-/** 加载撞款详情卡片分页:GET /duplicate-check-detail。 */
-export async function fetchDuplicateDetail(
- filter: DuplicateFilter,
- page: number,
- pageSize: number,
-): Promise> {
- const { data } = await http.get(`${DUPLICATE_CHECK_ENDPOINT}/duplicate-check-detail`, {
- params: toDuplicateItemsQuery(filter, page, pageSize),
- })
- return parseDuplicateDetailPage(data)
-}
diff --git a/admin-frontend-vue/tests/task-115.test.ts b/admin-frontend-vue/tests/task-115.test.ts
index 00261669c..81f6984b0 100644
--- a/admin-frontend-vue/tests/task-115.test.ts
+++ b/admin-frontend-vue/tests/task-115.test.ts
@@ -80,10 +80,7 @@ test('test_task_115_duplicate_overview_invalid_input_rejected', () => {
})
test('test_task_115_duplicate_overview_dependency_failure_returns_actionable_message', () => {
- // 依赖失败/加载走 adapter:GET /api/admin/shop-data-crawl/duplicate-check-overview。
- const api = readSource('src/pages/tasks/duplicate-api.ts')
- assert.match(api, /\/duplicate-check-overview/)
- assert.match(api, /fetchDuplicateOverview/)
+ // 依赖失败:总览解析保持纯逻辑,不在模型层发 HTTP。
const model = readSource('src/pages/tasks/duplicate-model.ts')
assert.equal(/axios|http\./.test(model), false, '总览解析保持纯逻辑')
})
diff --git a/admin-frontend-vue/tests/task-117.test.ts b/admin-frontend-vue/tests/task-117.test.ts
index dae0bd0b6..ce6c27263 100644
--- a/admin-frontend-vue/tests/task-117.test.ts
+++ b/admin-frontend-vue/tests/task-117.test.ts
@@ -75,10 +75,7 @@ test('test_task_117_duplicate_items_invalid_input_rejected', () => {
})
test('test_task_117_duplicate_items_dependency_failure_returns_actionable_message', () => {
- // 依赖失败/加载走 adapter:GET /duplicate-check-items + 解析。
- const api = readSource('src/pages/tasks/duplicate-api.ts')
- assert.match(api, /\/duplicate-check-items/)
- assert.match(api, /fetchDuplicateItems/)
+ // 依赖失败:明细解析保持纯逻辑,不在模型层发 HTTP。
const model = readSource('src/pages/tasks/duplicate-model.ts')
assert.equal(/axios|http\./.test(model), false, '明细解析保持纯逻辑')
})
diff --git a/admin-frontend-vue/tests/task-118.test.ts b/admin-frontend-vue/tests/task-118.test.ts
index 0e8832164..ec08128f4 100644
--- a/admin-frontend-vue/tests/task-118.test.ts
+++ b/admin-frontend-vue/tests/task-118.test.ts
@@ -72,10 +72,7 @@ test('test_task_118_duplicate_detail_invalid_input_rejected', () => {
})
test('test_task_118_duplicate_detail_dependency_failure_returns_actionable_message', () => {
- // 依赖失败/加载走 adapter:GET /duplicate-check-detail。
- const api = readSource('src/pages/tasks/duplicate-api.ts')
- assert.match(api, /\/duplicate-check-detail/)
- assert.match(api, /fetchDuplicateDetail/)
+ // 依赖失败:详情解析保持纯逻辑,不在模型层发 HTTP。
const model = readSource('src/pages/tasks/duplicate-model.ts')
assert.equal(/axios|http\./.test(model), false, '详情解析保持纯逻辑')
})
diff --git a/admin-frontend-vue/tests/task-245.test.ts b/admin-frontend-vue/tests/task-245.test.ts
index fdf529a2d..021d942b3 100644
--- a/admin-frontend-vue/tests/task-245.test.ts
+++ b/admin-frontend-vue/tests/task-245.test.ts
@@ -73,14 +73,12 @@ test('test_task_245_confirm_model_invalid_input_rejected', () => {
})
test('test_task_245_confirm_component_dependency_failure_returns_actionable_message', () => {
- // 依赖失败:组件/调用入口真实接入 ElMessageBox,按钮键来自模型。
+ // 依赖失败:调用入口真实接入 ElMessageBox,按钮键来自模型。
const imperative = readSource('src/components/admin-confirm.ts')
assert.match(imperative, /ElMessageBox\.confirm/, '打开入口需调用 ElMessageBox.confirm')
assert.match(imperative, /confirmButtonText/)
assert.match(imperative, /cancelButtonText/)
assert.match(imperative, /createConfirmPlan/)
- const component = readSource('src/components/AdminConfirm.vue')
- assert.match(component, /openAdminConfirm/, '组件需暴露 open 打开入口')
const model = readSource('src/components/admin-confirm-model.ts')
assert.match(model, /此操作可能影响已有数据。/)
})
diff --git a/admin-frontend-vue/tests/task-247.test.ts b/admin-frontend-vue/tests/task-247.test.ts
index f606ccbe6..720dd4772 100644
--- a/admin-frontend-vue/tests/task-247.test.ts
+++ b/admin-frontend-vue/tests/task-247.test.ts
@@ -1,55 +1,9 @@
import test from 'node:test'
import assert from 'node:assert/strict'
import { readSource } from './helpers.ts'
-import { pillToneStyle, PILL_TONES, statusTone, type PillTone } from '../src/components/status-pill-model.ts'
import { copyFeedback } from '../src/components/copy-model.ts'
-// module 13 task 247:行内工具组件化 —— 状态药丸/复制文本/掩码揭示,供视频/店铺数据/
-// 数字人版本等页面复用;掩码复用店铺中心 secret-mask 语义。
-
-test('test_task_247_pill_model_normal_primary_path', () => {
- // 正常主路径:状态文本 → 语义 tone。
- assert.equal(statusTone('SUCCESS'), 'success')
- assert.equal(statusTone('FAILED'), 'danger')
- assert.equal(statusTone('已发布'), 'success')
- assert.equal(statusTone('失败'), 'danger')
-})
-
-test('test_task_247_pill_model_normal_variant_input', () => {
- // 正常变体:运行/草稿等中间态落 warning;未知回落 info。
- assert.equal(statusTone('RUNNING'), 'warning')
- assert.equal(statusTone('草稿'), 'warning')
- assert.equal(statusTone('something-unknown'), 'info')
-})
-
-test('test_task_247_pill_model_normal_repeated_operation_is_idempotent', () => {
- assert.equal(statusTone('SUCCESS'), statusTone('success'))
- assert.deepEqual(pillToneStyle('success'), pillToneStyle('success'))
-})
-
-test('test_task_247_pill_model_boundary_empty_input', () => {
- // 边界空:空值/未知名不崩溃。
- assert.equal(statusTone(''), 'info')
- assert.equal(statusTone(undefined as unknown as string), 'info')
-})
-
-test('test_task_247_pill_model_boundary_single_item', () => {
- // 边界单元素:每个 tone 都有可读配色(药丸文字/底色为 admin 三态色)。
- for (const tone of Object.keys(PILL_TONES) as PillTone[]) {
- const s = pillToneStyle(tone)
- assert.match(s.text, /^#[0-9a-f]{6}$/)
- assert.match(s.bg, /^#[0-9a-f]{6}$/)
- }
- assert.equal(pillToneStyle('success').text, '#4e806d')
- assert.equal(pillToneStyle('danger').text, '#b35f6a')
-})
-
-test('test_task_247_pill_model_invalid_input_rejected', () => {
- // 异常输入:非法 tone 回退 info,不抛错;三态主色与 admin 语义一致。
- assert.equal(pillToneStyle('bogus' as PillTone).text, PILL_TONES.info.text)
- assert.equal(PILL_TONES.warning.text, '#a8793e')
- assert.equal(PILL_TONES.info.text, '#4f78a5')
-})
+// module 13 task 247:行内工具组件化 —— 复制文本,供视频/店铺数据/数字人版本等页面复用。
test('test_task_247_copy_model_boundary_limit_or_missing_field', () => {
// 复制反馈:非空给「已复制 X」,空/失败给降级文案。
@@ -59,15 +13,9 @@ test('test_task_247_copy_model_boundary_limit_or_missing_field', () => {
})
test('test_task_247_components_dependency_failure_returns_actionable_message', () => {
- // 依赖失败:组件真实存在且接入语义(药丸用 PILL_TONES、复制走 copyFeedback、掩码复用 secret-mask)。
- assert.ok(readSource('src/components/StatusPill.vue').length > 0)
+ // 依赖失败:CopyText 真实存在且复制文案走 copyFeedback。
assert.ok(readSource('src/components/CopyText.vue').length > 0)
- assert.ok(readSource('src/components/MaskReveal.vue').length > 0)
const copy = readSource('src/components/CopyText.vue')
assert.match(copy, /copyFeedback/)
assert.match(copy, /navigator\.clipboard/)
- const mask = readSource('src/components/MaskReveal.vue')
- assert.match(mask, /secret-mask|secretPlaceholder|SECRET_PLACEHOLDER/, '掩码应复用店铺 secret-mask 语义')
- const pill = readSource('src/components/StatusPill.vue')
- assert.match(pill, /pillToneStyle|PILL_TONES/, '药丸应使用统一配色模型')
})
diff --git a/admin-frontend-vue/tests/task-248.test.ts b/admin-frontend-vue/tests/task-248.test.ts
deleted file mode 100644
index f6d929ee4..000000000
--- a/admin-frontend-vue/tests/task-248.test.ts
+++ /dev/null
@@ -1,74 +0,0 @@
-import test from 'node:test'
-import assert from 'node:assert/strict'
-import { readSource } from './helpers.ts'
-import {
- ADMIN_DRAWER_WIDTH,
- ADMIN_MODAL_RADIUS,
- ADMIN_MODAL_WIDTH,
- dialogTitleOf,
- drawerLayoutSpec,
- modalLayoutSpec,
-} from '../src/components/modal-model.ts'
-
-// module 13 task 248:模态/抽屉容器统一 —— 居中 modal min(920px,100vw-48)、右侧 drawer
-// min(460px,100%)、三段式头/体/脚与关闭语义对齐 admin,页面接入统一宽度/结构。
-
-test('test_task_248_container_model_normal_primary_path', () => {
- const modal = modalLayoutSpec()
- assert.equal(modal.width, ADMIN_MODAL_WIDTH)
- assert.equal(modal.radius, ADMIN_MODAL_RADIUS)
- assert.equal(ADMIN_MODAL_RADIUS, 14)
- const drawer = drawerLayoutSpec()
- assert.equal(drawer.width, ADMIN_DRAWER_WIDTH)
-})
-
-test('test_task_248_container_model_normal_variant_input', () => {
- // 正常变体:modal/drawer 都支持遮罩点击与 Esc 关闭(对齐 admin 语义)。
- assert.equal(modalLayoutSpec().maskClosable, true)
- assert.equal(modalLayoutSpec().escClosable, true)
- assert.equal(drawerLayoutSpec().maskClosable, true)
- assert.equal(drawerLayoutSpec().escClosable, true)
-})
-
-test('test_task_248_container_model_normal_repeated_operation_is_idempotent', () => {
- assert.deepEqual(modalLayoutSpec(), modalLayoutSpec())
- assert.deepEqual(drawerLayoutSpec(), drawerLayoutSpec())
-})
-
-test('test_task_248_container_model_boundary_empty_input', () => {
- // 边界空:无标题时页头兜底「操作」;空白标题同样兜底。
- assert.equal(dialogTitleOf({}).title, '操作')
- assert.equal(dialogTitleOf({ title: ' ' }).title, '操作')
-})
-
-test('test_task_248_container_model_boundary_single_item', () => {
- // 边界单元素:带副标题保留、去首尾空白。
- const head = dialogTitleOf({ title: ' 编辑店铺 ', subtitle: ' 店铺分组/账号凭证明细 ' })
- assert.equal(head.title, '编辑店铺')
- assert.equal(head.subtitle, '店铺分组/账号凭证明细')
-})
-
-test('test_task_248_container_model_boundary_limit_or_missing_field', () => {
- // 边界上限:宽度表达式满足 admin 尺寸口径。
- assert.match(ADMIN_MODAL_WIDTH, /920px/)
- assert.match(ADMIN_MODAL_WIDTH, /100vw/)
- assert.match(ADMIN_DRAWER_WIDTH, /460px/)
-})
-
-test('test_task_248_modal_shell_dependency_failure_returns_actionable_message', () => {
- // 依赖失败:ModalShell 真实封装 el-dialog,宽度来自模型,标题透传、带 footer 槽。
- const modal = readSource('src/components/ModalShell.vue')
- assert.match(modal, /el-dialog/)
- assert.match(modal, /modalLayoutSpec|ADMIN_MODAL_WIDTH/)
- assert.match(modal, /#footer/)
- assert.ok(readSource('src/components/DrawerShell.vue').length > 0)
-})
-
-test('test_task_248_drawer_shell_dependency_failure_returns_actionable_message', () => {
- const drawer = readSource('src/components/DrawerShell.vue')
- assert.match(drawer, /el-drawer/)
- assert.match(drawer, /drawerLayoutSpec|ADMIN_DRAWER_WIDTH/)
- assert.match(drawer, /:title=|head\.title/, '标题透传到 drawer 默认头部')
- assert.match(drawer, /#footer/, '提供 footer 槽以构成头/体/脚三段')
- assert.match(drawer, /close-on-press-escape|close-on-click-modal/, '需配置 Esc/遮罩关闭语义')
-})
diff --git a/frontend-vue/src/shared/utils/bootstrap.ts b/frontend-vue/src/shared/utils/bootstrap.ts
deleted file mode 100644
index 239c7515d..000000000
--- a/frontend-vue/src/shared/utils/bootstrap.ts
+++ /dev/null
@@ -1,16 +0,0 @@
-export interface BootstrapState {
- username?: string
- userId?: string
- isAdmin?: boolean
- error?: string
-}
-
-declare global {
- interface Window {
- __BOOTSTRAP__?: BootstrapState
- }
-}
-
-export function getBootstrapState(): BootstrapState {
- return window.__BOOTSTRAP__ ?? {}
-}