feat(P4): precompute移植+app.js sources双向回填+回归1003/1003+验收体积/文件/data.json
Deploy to GitHub Pages / deploy (push) Failing after 16s
Regression / regression (push) Failing after 15m2s

This commit is contained in:
aurora-admin
2026-09-12 14:18:41 +08:00
parent 16f365a045
commit c65a69c34e
401 changed files with 22932 additions and 140 deletions
+43
View File
@@ -0,0 +1,43 @@
<!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 · ButtonGroup(普通 H5)</title>
<link rel="stylesheet" href="../.design_library/aurora-admin/colors_and_type.css" />
<link rel="stylesheet" href="ButtonGroup.css" />
<style>body{margin:0;padding:24px;background: var(--au-color-page-bg);display:flex;flex-direction:column;gap:16px;}</style>
</head>
<body>
<div class="aa-btngroup" id="single"></div>
<div class="aa-btngroup" id="multi"></div>
<script>
function paint(el, options, selected, multiple) {
el.innerHTML = options.map(function (o) {
var on = multiple ? selected.indexOf(o.value) >= 0 : selected === o.value;
var cls = 'aa-btngroup-btn' + (on ? ' is-selected' : '') + (o.disabled ? ' is-disabled' : '');
return '<button class="' + cls + '" data-value="' + o.value + '" ' + (o.disabled ? 'disabled' : '') + '>' + o.label + '</button>';
}).join('');
el.querySelectorAll('button').forEach(function (b) {
b.addEventListener('click', function () {
var v = b.dataset.value;
if (multiple) {
var i = selected.indexOf(v);
if (i >= 0) selected.splice(i, 1); else selected.push(v);
} else {
selected = v;
}
paint(el, options, selected, multiple);
});
});
}
paint(document.getElementById('single'),
[{ label: '日', value: 'day' }, { label: '周', value: 'week' }, { label: '月', value: 'month' }], 'week', false);
paint(document.getElementById('multi'),
[{ label: '红', value: 'r' }, { label: '绿', value: 'g' }, { label: '蓝', value: 'b', disabled: true }], ['r'], true);
</script>
</body>
</html>