03-icon-cards.html 3.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. <!doctype html>
  2. <html lang="zh-CN">
  3. <head>
  4. <meta charset="UTF-8" />
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  6. <title>03 图标信息卡片 · 我的物料领用记录 Tab Demo</title>
  7. <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet" />
  8. <link rel="stylesheet" href="_shared.css" />
  9. <style>
  10. .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; }
  11. .btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
  12. </style>
  13. </head>
  14. <body>
  15. <header class="demo-banner">
  16. <div>
  17. <h1><span class="demo-badge">03 图标信息卡片</span> 我的物料领用记录 · Tab 样式 Demo</h1>
  18. <p>图标 + 标题 + 副标题说明,双列大卡片 · 业务含义一目了然</p>
  19. </div>
  20. <div class="demo-banner__actions">
  21. <a href="index.html">← 选型索引</a>
  22. <a href="02-full-width-track.html">02 全宽滑轨</a>
  23. </div>
  24. </header>
  25. <div class="page-wrap">
  26. <section class="panel" id="panel-root">
  27. <div class="panel-top"><h2>我的物料领用记录</h2></div>
  28. <div class="panel-tab-zone">
  29. <nav class="tabs-03" role="tablist">
  30. <button type="button" class="tab-btn is-active" data-tab="usage" role="tab">
  31. <span class="tab-icon" aria-hidden="true">
  32. <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/><path d="M14 2v6h6"/><path d="M16 13H8"/><path d="M16 17H8"/><path d="M10 9H8"/></svg>
  33. </span>
  34. <span class="tab-text">
  35. <span class="tab-title">领用记录</span>
  36. <span class="tab-desc">查看本人出库、任务使用等变动</span>
  37. </span>
  38. </button>
  39. <button type="button" class="tab-btn" data-tab="consumption" role="tab">
  40. <span class="tab-icon" aria-hidden="true">
  41. <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M18 20V10"/><path d="M12 20V4"/><path d="M6 20v-6"/></svg>
  42. </span>
  43. <span class="tab-text">
  44. <span class="tab-title">消耗明细</span>
  45. <span class="tab-desc">配制消耗的子物料明细</span>
  46. </span>
  47. </button>
  48. </nav>
  49. </div>
  50. <div class="tab-panel is-active" data-panel="usage" id="content"></div>
  51. </section>
  52. <p class="style-note">
  53. <strong>推荐:</strong>副标题帮助用户理解两个 Tab 的区别,图标增强模块识别度。落地时图标可用 Element Plus Icons(如 Document / DataLine)。
  54. <div class="pros-cons">
  55. <div class="pro">✓ 信息量大、可发现性最强、适合业务含义不易区分的场景</div>
  56. <div class="con">✗ 占用约 72px 纵向空间,横向在小屏需考虑换行</div>
  57. </div>
  58. </p>
  59. </div>
  60. <script src="_demo-shell.js"></script>
  61. <script>
  62. document.getElementById('content').innerHTML = mockContent('usage')
  63. initPanelTabs('panel-root')
  64. </script>
  65. </body>
  66. </html>