task-11(壳层/路由): 实现无菜单权限空状态
empty-state 定义标题/引导文案与 shouldShowEmptyMenu 纯判定(Boolean 化防 undefined); AdminLayout 侧边栏与内容区(根路由)共用空态,加载中不闪现,未初始化不误报。
This commit is contained in:
@@ -31,8 +31,8 @@ test('test_task_003_layout_contract_normal_repeated_operation_is_idempotent', ()
|
||||
test('test_task_003_layout_contract_boundary_empty_input', () => {
|
||||
// 边界空值:菜单为空时应展示无菜单状态,且页面容器本身仍保留。
|
||||
const layout = readSource(LAYOUT)
|
||||
assert.ok(layout.includes('暂无可用菜单'), '无菜单需有空状态文案')
|
||||
assert.ok(layout.includes('menuEntries.length'), '空菜单由映射结果长度驱动')
|
||||
assert.ok(layout.includes('el-empty'), '无菜单需有空状态占位')
|
||||
assert.ok(layout.includes('emptyMenu'), '空菜单由空态判定驱动')
|
||||
assert.equal(occurrences(layout, '<RouterView'), 1)
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user