52 lines
2.3 KiB
HTML
52 lines
2.3 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>04 左对齐下划线 · 我的物料领用记录 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">04 左对齐下划线</span> 我的物料领用记录 · Tab 样式 Demo</h1>
|
|
<p>加大字号 + 左对齐 + 绿色底边指示 · 经典 Tab 模式</p>
|
|
</div>
|
|
<div class="demo-banner__actions">
|
|
<a href="index.html">← 选型索引</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">
|
|
<nav class="tabs-04" 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>
|
|
</nav>
|
|
</div>
|
|
<div class="tab-panel is-active" data-panel="usage" id="content"></div>
|
|
</section>
|
|
<p class="style-note">
|
|
<strong>经典方案:</strong>左对齐 + 15px 字号 + 3px 绿色底边,符合用户对 Tab 的认知习惯。改动适中,可与 Element Plus 默认 tabs 风格接近。
|
|
<div class="pros-cons">
|
|
<div class="pro">✓ 用户认知成本低、实现简单、纵向占用适中</div>
|
|
<div class="con">✗ 相比全宽滑轨/图标卡片,视觉冲击力略弱</div>
|
|
</div>
|
|
</p>
|
|
</div>
|
|
|
|
<script src="_demo-shell.js"></script>
|
|
<script>
|
|
document.getElementById('content').innerHTML = mockContent('usage')
|
|
initPanelTabs('panel-root')
|
|
</script>
|
|
</body>
|
|
</html>
|