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

45 lines
1.7 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 · BottomSheet(普通 H5)</title>
<link rel="stylesheet" href="../.design_library/aurora-admin/colors_and_type.css" />
<link rel="stylesheet" href="BottomSheet.css" />
<style>body{margin:0;padding:24px;background: var(--au-color-page-bg);}</style>
</head>
<body>
<button id="open">打开底部面板</button>
<div class="aa-sheet-mask" id="mask"></div>
<div class="aa-sheet" id="sheet">
<div class="aa-sheet-handle" id="handle"></div>
<div class="aa-sheet-header">筛选订单</div>
<div class="aa-sheet-body">
在这里放置筛选条件、操作列表等内容。面板可从底部滑动出现,点击遮罩或向下拖动可关闭。
</div>
<div class="aa-sheet-footer">
<button class="aa-sheet-btn" id="cancel">取消</button>
<button class="aa-sheet-btn primary" id="apply">应用</button>
</div>
</div>
<script>
var mask = document.getElementById('mask');
var sheet = document.getElementById('sheet');
function open() { mask.classList.add('is-open'); sheet.classList.add('is-open'); }
function close() { mask.classList.remove('is-open'); sheet.classList.remove('is-open'); }
document.getElementById('open').onclick = open;
mask.onclick = close;
document.getElementById('cancel').onclick = close;
document.getElementById('apply').onclick = close;
var startY = 0;
sheet.addEventListener('pointerdown', function (e) { startY = e.clientY; });
sheet.addEventListener('pointerup', function (e) {
if (startY - e.clientY < -80) close();
});
</script>
</body>
</html>