shanxia-mp-pattern-index.html 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  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, maximum-scale=1.0, user-scalable=no" />
  6. <title>山峡化工 · UI Pattern 索引</title>
  7. <link rel="stylesheet" href="shanxia-mp-base.css" />
  8. <style>
  9. body { background: #eef3f0; }
  10. .index-wrap { max-width: 720px; margin: 0 auto; padding: 24px 16px 40px; }
  11. .index-hero { background: var(--header-gradient); color: #fff; border-radius: 20px; padding: 24px 20px; box-shadow: var(--shadow-md); margin-bottom: 20px; }
  12. .index-hero h1 { font-size: 22px; margin-bottom: 8px; }
  13. .index-hero p { font-size: 13px; opacity: 0.9; line-height: 1.6; }
  14. .index-grid { display: grid; gap: 12px; }
  15. .index-card { background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 16px; display: flex; gap: 14px; align-items: flex-start; }
  16. .index-card:hover { box-shadow: var(--shadow-sm); }
  17. .index-card__icon { width: 44px; height: 44px; border-radius: 12px; color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; flex-shrink: 0; font-size: 12px; }
  18. .index-card h2 { font-size: 16px; margin-bottom: 4px; }
  19. .index-card p { font-size: 12px; color: var(--text-muted); line-height: 1.5; }
  20. .index-card__tag { display: inline-block; margin-top: 8px; font-size: 11px; color: var(--brand-green-dark); background: var(--brand-green-soft); padding: 2px 8px; border-radius: 999px; }
  21. .index-section-title { font-size: 13px; color: var(--text-muted); margin: 20px 0 10px; font-weight: 600; }
  22. .token-box { background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 16px; margin-top: 20px; }
  23. .token-box h3 { font-size: 14px; margin-bottom: 10px; }
  24. .class-list { font-size: 11px; color: var(--text-muted); line-height: 1.9; font-family: ui-monospace, monospace; }
  25. .class-list code { color: var(--brand-green-dark); }
  26. </style>
  27. </head>
  28. <body>
  29. <div class="index-wrap">
  30. <header class="index-hero">
  31. <h1>UI Pattern 组件库</h1>
  32. <p>山峡化工小程序通用页面模式。所有样式集中在 <strong>shanxia-mp-base.css</strong>,落地 uni-app 时按 class 映射复用。</p>
  33. </header>
  34. <p class="index-section-title">页面模式(4 个核心 Pattern)</p>
  35. <div class="index-grid">
  36. <a class="index-card" href="shanxia-mp-pattern-list.html">
  37. <div class="index-card__icon" style="background:linear-gradient(145deg,#087f57,#0a9f6d)">LIST</div>
  38. <div>
  39. <h2>P-LIST · 标准列表</h2>
  40. <p>Header / 筛选 Tab / 可点击卡片列表 / 空态 / 骨架屏 / 触底提示</p>
  41. <span class="index-card__tag">列表办理入口</span>
  42. </div>
  43. </a>
  44. <a class="index-card" href="shanxia-mp-pattern-view.html">
  45. <div class="index-card__icon" style="background:linear-gradient(145deg,#0a9f6d,#11b37a)">VIEW</div>
  46. <div>
  47. <h2>P-VIEW · 查看详情</h2>
  48. <p>Hero 摘要 + 分块 KV + 时间线 + 附件 + 底栏操作 + 抽屉快捷预览</p>
  49. <span class="index-card__tag">只读详情</span>
  50. </div>
  51. </a>
  52. <a class="index-card" href="shanxia-mp-pattern-form.html">
  53. <div class="index-card__icon" style="background:linear-gradient(145deg,#c9922f,#d6a343)">FORM</div>
  54. <div>
  55. <h2>P-FORM · 新增/编辑表单</h2>
  56. <p>分组面板 + 堆叠输入 + 行式选择器 + 附件上传 + 底栏提交</p>
  57. <span class="index-card__tag">数据录入</span>
  58. </div>
  59. </a>
  60. <a class="index-card" href="shanxia-mp-pattern-feedback.html">
  61. <div class="index-card__icon" style="background:linear-gradient(145deg,#247a70,#2b8a7e)">UI</div>
  62. <div>
  63. <h2>P-FEEDBACK · 弹窗与反馈</h2>
  64. <p>确认弹窗 / 底部抽屉 / Action Sheet / Toast / 空态 / 骨架屏</p>
  65. <span class="index-card__tag">交互反馈</span>
  66. </div>
  67. </a>
  68. </div>
  69. <p class="index-section-title">推荐页面流转</p>
  70. <div class="token-box">
  71. <p style="font-size:13px;line-height:1.8;color:var(--text-primary)">
  72. 工作台菜单 → <strong>列表页</strong> → 点击卡片 → <strong>查看详情</strong><br>
  73. 列表 Header「新增」→ <strong>表单页</strong> → 提交 → 返回列表<br>
  74. 详情「更多」→ Action Sheet → 删除 → 确认弹窗 → Toast
  75. </p>
  76. </div>
  77. <section class="token-box">
  78. <h3>核心 Class 速查</h3>
  79. <div class="class-list">
  80. 布局:<code>.mp-navbar</code> <code>.mp-header</code> <code>.mp-footer-bar</code><br>
  81. 列表:<code>.mp-tabs</code> <code>.mp-card--clickable</code> <code>.mp-list-end</code> <code>.mp-empty</code>(方案 B · 组件 <code>mp-empty</code>)<br>
  82. 详情:<code>.mp-detail-hero</code> <code>.mp-block</code> <code>.mp-kv-list</code> <code>.mp-timeline</code><br>
  83. 表单:<code>.mp-form-group</code> <code>.mp-field</code> <code>.mp-field-row</code> <code>.mp-attach-upload</code><br>
  84. 弹窗:<code>.mp-overlay</code> <code>.mp-sheet</code> <code>.mp-dialog</code> <code>.mp-action-sheet</code> <code>.mp-toast</code><br>
  85. 状态:<code>.mp-tag--success|warning|danger|info|muted</code>
  86. </div>
  87. <p style="margin-top:12px;font-size:12px;color:var(--text-muted)">
  88. <a href="shanxia-mp-index.html" style="color:var(--brand-green-dark)">← 返回小程序 Demo 总索引</a>
  89. </p>
  90. </section>
  91. </div>
  92. </body>
  93. </html>