ui-richness-P01-empty-state.html 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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>P01 · 空状态 + 引导</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="ui-richness-shared.css" />
  9. </head>
  10. <body>
  11. <div class="demo-banner">
  12. <div><span class="level-tag level-PAT">模式 P01</span> <strong>空状态 + 引导</strong> — 无数据时不显示空白表格</div>
  13. <a href="ui-richness-index.html">← 返回对比入口</a>
  14. </div>
  15. <div class="page-wrap">
  16. <header class="page-head">
  17. <h1>质检工单</h1>
  18. <p class="page-desc">列表为空时展示引导空态,而非 0 行的 el-table。</p>
  19. </header>
  20. <div class="compare-row">
  21. <div class="compare-col plain">
  22. <h3>❌ 素:空白表格</h3>
  23. <section class="panel">
  24. <div class="panel-top"><h2>工单列表</h2></div>
  25. <table class="data-table"><thead><tr><th>工单号</th><th>状态</th></tr></thead><tbody><tr><td colspan="2" style="padding:32px;color:var(--text-muted)">暂无数据</td></tr></tbody></table>
  26. </section>
  27. </div>
  28. <div class="compare-col rich">
  29. <h3>✓ 丰:引导空态</h3>
  30. <section class="panel">
  31. <div class="panel-top"><h2 class="title-bar-heading">工单列表</h2></div>
  32. <div class="empty-state">
  33. <div class="empty-ic">
  34. <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5"><path d="M9 11l3 3L22 4"/><path d="M21 12v7a2 2 0 01-2 2H5a2 2 0 01-2-2V5a2 2 0 012-2h11"/></svg>
  35. </div>
  36. <h3>暂无质检工单</h3>
  37. <p>样本接收完成后可在此创建质检工单。您也可以从样本列表批量发起。</p>
  38. <button class="btn btn-main" type="button"><svg class="ic" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M12 5v14M5 12h14"/></svg>新建工单</button>
  39. </div>
  40. </section>
  41. </div>
  42. </div>
  43. <p class="dim-note"><strong>适用:</strong>任意 CRUD 列表首次进入、筛选无结果。Vue 侧用 <code>el-empty</code> + 自定义插槽,或 v-if 切换整块空态。</p>
  44. </div>
  45. </body>
  46. </html>