【本次核心 · S6-P21】 - 族层数据:families.json + 44 份契约注入 family/familyRole/familyParams; data.json / data.js / site/details 同步。13 族 / 44 成员 / 35 独立 → 概念组件 79→48。 - 79 个 slug 全保留、集合逐一不变(铁律 5 对外承诺未破);frameworks 仍 395 文件、薄壳仍 79。 - 归族判据为契约中可核对字段(semanticTypeCandidates 重叠 / anatomy 为同一骨架子集 / 变体维度同构 / doNotInvent 显式从属声明),每族 mergeBasis 写明依据,不按名字猜。 - 实现层合并(导航族端到端切片):tools/gen-family-impl.mjs 从 5 端模板生成 TopMenu / SideMenu / MixedNavigation 共 15 文件,参数 direction=top|side|mixed; 三份 CSS md5 完全相同 = 一份样式表服务三个组件。 - 新增 tools/gen-families.mjs、tools/gen-family-impl.mjs、tools/verify-families.mjs、 tools/lib/family-model.mjs、tools/lib/family-impl/nav-menu/*.tpl。 【同时清掉此前已完成但未提交的批次】 生成物(data.json / data.js / site/sources / site/components 薄壳 / sitemap.xml / tests 报告) 跨阶段交织,无法拆成互相自洽的多个提交,故按既有批量风格合并提交: - Package:三端可 import(S5-P18)+ 发布到私有 npm 源 - Docs site:导航语言改下拉(S5-P19)、详情页代码块默认展开、中英切换完整性 - Security:生产部署链审计修复(2026-09-19)+ 线上部署 - Theme modes 日间/夜间/自动;S1-P4 data.js 瘦身;S2-P5 暗色;S2-P6 跨端一致性; S2-P7 行为断言;S2-P9 FAQ;S3-P8 RTL;S3-P9 契约缺口解释层;S4-P12 发布流程 - 补入 tools/pack-deploy.mjs、run-site-smoke.mjs、verify-*.mjs,.dockerignore、 安全审计修复与待决策项.md 【验收】 - node tools/verify-families.mjs → OK: 族层端到端一致(13 族 / 44 成员 / 79 组件不变 / 395 文件不变) - node tools/verify-cross-platform.mjs → 79/79 identical(HEAD 基线 high 44) - node tools/run-regression.mjs → 100%(79/79 页,1017/1017 断言,N/A 34),连跑 8 次一致,0 超时 - 逐页实测:topmenu / sidemenu / mixednavigation 各 13/13,帧内 direction 参数正确,0 JS 错误 - 零运行时依赖 OK;build-site.ps1 ASCII-only OK 【未纳入】site/components/<slug>/ 平台薄壳 316 个 —— 历史从未跟踪且属构建产物,保持现状。
75 lines
3.6 KiB
Plaintext
75 lines
3.6 KiB
Plaintext
<!DOCTYPE html>
|
||
<html lang="zh-CN">
|
||
<head>
|
||
<meta charset="UTF-8">
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||
<title>Aurora Admin · Modal (H5)</title>
|
||
<link rel="stylesheet" href="../.design_library/aurora-admin/colors_and_type.css">
|
||
<style>
|
||
/* 对齐 components.css 与 modal.json 契约 */
|
||
.demo { padding: 24px; background: var(--au-color-page-bg); color: var(--au-color-text-body); font-family: var(--font-family); }
|
||
h1 { font-size: 20px; margin: 0 0 4px; }
|
||
.sub { color: var(--au-color-text-secondary); margin: 0 0 24px; font-size: 12px; }
|
||
|
||
.aa-mask {
|
||
position: fixed; inset: 0; background: rgba(0,0,0,0.45);
|
||
display: flex; align-items: center; justify-content: center; z-index: 1000;
|
||
}
|
||
.aa-modal {
|
||
background: var(--au-color-card-bg); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,0.12);
|
||
display: flex; flex-direction: column; max-width: 90vw;
|
||
}
|
||
.aa-modal--small { width: 320px; }
|
||
.aa-modal--default { width: 480px; }
|
||
.aa-modal--large { width: 680px; }
|
||
.aa-modal__header {
|
||
display: flex; align-items: center; justify-content: space-between;
|
||
padding: 16px 24px; font-size: 16px; font-weight: 600; color: var(--au-color-text-title);
|
||
}
|
||
.aa-modal__close { border: none; background: none; cursor: pointer; color: var(--au-color-text-secondary); font-size: 16px; line-height: 1; }
|
||
.aa-modal__close:hover { color: var(--au-color-text-body); }
|
||
.aa-modal__body { padding: 0 24px 24px; color: var(--au-color-text-body); font-size: 14px; line-height: 22px; }
|
||
.aa-modal__footer { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 24px 16px; }
|
||
.btn-base { border-radius: 4px; padding: 4px 16px; height: 32px; cursor: pointer; font-size: 14px; }
|
||
.btn-ghost { border: 1px solid var(--au-color-border); background: var(--au-color-card-bg); color: var(--au-color-text-body); }
|
||
.btn-primary { border: 1px solid var(--au-color-brand); background: var(--au-color-brand); color: var(--au-color-text-inverse); }
|
||
</style>
|
||
</head>
|
||
<body>
|
||
<div class="demo">
|
||
<h1>Aurora Admin · Modal 组件(纯 H5)</h1>
|
||
<p class="sub">对齐 modal.json 契约:宽度480(默认)/680(大)/320(小),圆角8px,遮罩 rgba(0,0,0,0.45),右下角操作按钮</p>
|
||
|
||
<button class="btn-base btn-primary" onclick="openModal('default')" data-behavior="click-adds-node:@doc.aa-mask">打开默认对话框</button>
|
||
<button class="btn-base btn-ghost" onclick="openModal('large')" style="margin-left:8px">打开大对话框</button>
|
||
<button class="btn-base btn-ghost" onclick="openModal('small')" style="margin-left:8px">打开小对话框</button>
|
||
</div>
|
||
|
||
<div id="mount"></div>
|
||
|
||
<script>
|
||
function openModal(size) {
|
||
const mount = document.getElementById('mount');
|
||
mount.innerHTML = `
|
||
<div class="aa-mask" data-mask>
|
||
<div class="aa-modal aa-modal--${size}" role="dialog">
|
||
<div class="aa-modal__header">
|
||
<span>提示</span>
|
||
<button class="aa-modal__close" data-close aria-label="关闭">✕</button>
|
||
</div>
|
||
<div class="aa-modal__body">
|
||
这是 ${size === 'small' ? '小' : size === 'large' ? '大' : '默认'} 尺寸对话框的内容区,可放置表单或说明文字。
|
||
</div>
|
||
<div class="aa-modal__footer">
|
||
<button class="btn-base btn-ghost" data-close>取消</button>
|
||
<button class="btn-base btn-primary" data-close>确定</button>
|
||
</div>
|
||
</div>
|
||
</div>`;
|
||
const mask = mount.querySelector('[data-mask]');
|
||
mask.addEventListener('click', (e) => { if (e.target === mask || e.target.hasAttribute('data-close')) mount.innerHTML = ''; });
|
||
}
|
||
</script>
|
||
</body>
|
||
</html>
|