59 lines
2.6 KiB
HTML
59 lines
2.6 KiB
HTML
<!doctype html>
|
|
<html lang="zh-CN">
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
<title>02 全宽双轨滑块 · 我的物料领用记录 Tab Demo</title>
|
|
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet" />
|
|
<link rel="stylesheet" href="_shared.css" />
|
|
<style>
|
|
.btn { height: 36px; padding: 0 14px; border-radius: 8px; font-size: 13px; font-weight: 500; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: default; }
|
|
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<header class="demo-banner">
|
|
<div>
|
|
<h1><span class="demo-badge">02 全宽双轨滑块</span> 我的物料领用记录 · Tab 样式 Demo</h1>
|
|
<p>50/50 等分全宽轨道,白色滑块随 Tab 平滑移动 · 点击区域最大</p>
|
|
</div>
|
|
<div class="demo-banner__actions">
|
|
<a href="index.html">← 选型索引</a>
|
|
<a href="01-current-baseline.html">01 基线</a>
|
|
<a href="03-icon-cards.html">03 图标卡片 →</a>
|
|
</div>
|
|
</header>
|
|
|
|
<div class="page-wrap">
|
|
<section class="panel" id="panel-root">
|
|
<div class="panel-top"><h2>我的物料领用记录</h2></div>
|
|
<div class="panel-tab-zone">
|
|
<div class="tabs-02" data-active="0">
|
|
<div class="tabs-02-inner">
|
|
<div class="tabs-02-slider"></div>
|
|
<div class="tabs-02-track" role="tablist">
|
|
<button type="button" class="tab-btn is-active" data-tab="usage" role="tab">领用记录</button>
|
|
<button type="button" class="tab-btn" data-tab="consumption" role="tab">消耗明细</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="tab-panel is-active" data-panel="usage" id="content"></div>
|
|
</section>
|
|
<p class="style-note">
|
|
<strong>强烈推荐:</strong>双 Tab 场景下全宽等分最协调,滑块动画提供明确的「选中」反馈,用户一眼就能看出这是可切换的控制器。
|
|
<div class="pros-cons">
|
|
<div class="pro">✓ 点击区域大、视觉权重高、动画反馈好</div>
|
|
<div class="con">✗ 占用约 48px 纵向空间,与三 Tab 以上场景需调整 grid</div>
|
|
</div>
|
|
</p>
|
|
</div>
|
|
|
|
<script src="_demo-shell.js"></script>
|
|
<script>
|
|
document.getElementById('content').innerHTML = mockContent('usage')
|
|
initPanelTabs('panel-root')
|
|
</script>
|
|
</body>
|
|
</html>
|