Files
aurora-admin/site/sources/breadcrumb/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

36 lines
1.3 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 · Breadcrumb(普通 H5)</title>
<link rel="stylesheet" href="../.design_library/aurora-admin/colors_and_type.css" />
<link rel="stylesheet" href="Breadcrumb.css" />
<style>body{margin:0;padding:24px;background: var(--au-color-page-bg);}</style>
</head>
<body>
<div class="aa-breadcrumb" role="navigation" id="app"></div>
<script>
var DATA = [
{ label: '首页', key: 'home' },
{ label: '订单管理', key: 'order' },
{ label: '订单详情', key: 'detail' }
];
function render() {
var root = document.getElementById('app');
root.innerHTML = DATA.map(function (it, i) {
var cur = i === DATA.length - 1;
var html = '<span class="aa-breadcrumb-item ' + (cur ? 'is-current' : '') + '" role="link" tabindex="0" data-key="' + it.key + '">' + it.label + '</span>';
if (!cur) html += '<span class="aa-breadcrumb-sep">/</span>';
return html;
}).join('');
root.querySelectorAll('.aa-breadcrumb-item:not(.is-current)').forEach(function (el) {
el.addEventListener('click', function () { alert('跳转到:' + el.dataset.key); });
});
}
render();
</script>
</body>
</html>