Files
aurora-admin/site/sources/steps/html.txt
T
aurora-admin c65a69c34e
Deploy to GitHub Pages / deploy (push) Failing after 16s
Regression / regression (push) Failing after 15m2s
feat(P4): precompute移植+app.js sources双向回填+回归1003/1003+验收体积/文件/data.json
2026-09-12 14:18:41 +08:00

62 lines
2.4 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!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 · Steps (H5)</title>
<link rel="stylesheet" href="../.design_library/aurora-admin/colors_and_type.css">
<link rel="stylesheet" href="./Steps.css">
<style>
.demo { padding: 24px; background: var(--au-color-page-bg); font-family: var(--font-family); }
h1 { font-size: 20px; margin: 0 0 4px; color: var(--au-color-text-title); }
.sub { color: var(--au-color-text-secondary); margin: 0 0 24px; font-size: 12px; }
.demo-block { background: var(--au-color-card-bg); border-radius: 8px; padding: 24px; margin-bottom: 20px; }
.demo-block > .hint { color: var(--au-color-text-secondary); font-size: 12px; margin: 0 0 16px; }
</style>
</head>
<body>
<div class="demo">
<h1>Aurora Admin · Steps 组件(纯 H5)</h1>
<p class="sub">对齐 StepList 规范:序号、标题、描述、状态、连接线</p>
<div class="demo-block">
<p class="hint">横向步骤条</p>
<div class="aa-steps horizontal" role="list" data-steps data-current="1"></div>
</div>
<div class="demo-block">
<p class="hint">纵向步骤条(含异常状态)</p>
<div class="aa-steps vertical" role="list" data-steps data-current="2" data-error="3"></div>
</div>
</div>
<script>
const STEPS = [
{ title: '填写订单', desc: '录入客户与商品信息' },
{ title: '审核', desc: '主管确认订单合规' },
{ title: '付款', desc: '完成支付流程' },
{ title: '完成', desc: '生成发货单' }
];
function render(root) {
const current = +root.dataset.current;
const errorAt = root.dataset.error ? +root.dataset.error : -1;
const dir = root.classList.contains('horizontal') ? 'horizontal' : 'vertical';
root.innerHTML = STEPS.map((s, i) => {
let status = i < current ? 'finish' : (i === current ? 'process' : 'wait');
if (i === errorAt) status = 'error';
const icon = status === 'finish' ? '✓' : (status === 'error' ? '!' : (i + 1));
return `<div class="aa-step is-${status}" role="listitem">
<div class="aa-step-icon">${icon}</div>
<div class="aa-step-body">
<div class="aa-step-title">${s.title}</div>
<div class="aa-step-desc">${s.desc || ''}</div>
</div>
</div>`;
}).join('');
}
document.querySelectorAll('[data-steps]').forEach(render);
</script>
</body>
</html>