design.json 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238
  1. {
  2. "schemaVersion": 2,
  3. "generatedAt": "2026-05-14T09:14:00Z",
  4. "title": "Design System: 自助洗车运营管理系统",
  5. "extensions": {
  6. "colorMeta": {
  7. "brand-red": {
  8. "role": "primary",
  9. "displayName": "Brand Red",
  10. "canonical": "oklch(52% 0.16 25)",
  11. "tonalRamp": [
  12. "oklch(15% 0.04 25)",
  13. "oklch(25% 0.08 25)",
  14. "oklch(35% 0.12 25)",
  15. "oklch(45% 0.16 25)",
  16. "oklch(52% 0.16 25)",
  17. "oklch(65% 0.12 25)",
  18. "oklch(78% 0.08 25)",
  19. "oklch(92% 0.03 25)"
  20. ]
  21. },
  22. "surface-white": {
  23. "role": "neutral",
  24. "displayName": "Surface White",
  25. "canonical": "oklch(99% 0.002 25)",
  26. "tonalRamp": [
  27. "oklch(96% 0.001 25)",
  28. "oklch(97% 0.001 25)",
  29. "oklch(98% 0.002 25)",
  30. "oklch(99% 0.002 25)",
  31. "oklch(99.5% 0.001 25)",
  32. "oklch(99% 0.003 25)",
  33. "oklch(98% 0.004 25)",
  34. "oklch(97% 0.005 25)"
  35. ]
  36. },
  37. "content-bg": {
  38. "role": "neutral",
  39. "displayName": "Content Background",
  40. "canonical": "oklch(95% 0.005 255)",
  41. "tonalRamp": [
  42. "oklch(90% 0.003 255)",
  43. "oklch(92% 0.004 255)",
  44. "oklch(94% 0.005 255)",
  45. "oklch(95% 0.005 255)",
  46. "oklch(96% 0.004 255)",
  47. "oklch(97% 0.003 255)",
  48. "oklch(98% 0.002 255)",
  49. "oklch(99% 0.001 255)"
  50. ]
  51. },
  52. "text-primary": {
  53. "role": "neutral",
  54. "displayName": "Text Primary",
  55. "canonical": "oklch(27% 0.005 255)"
  56. },
  57. "text-regular": {
  58. "role": "neutral",
  59. "displayName": "Text Regular",
  60. "canonical": "oklch(45% 0.005 255)"
  61. },
  62. "text-secondary": {
  63. "role": "neutral",
  64. "displayName": "Text Secondary",
  65. "canonical": "oklch(62% 0.005 255)"
  66. },
  67. "sidebar-bg": {
  68. "role": "neutral",
  69. "displayName": "Sidebar Background",
  70. "canonical": "oklch(14% 0.03 255)"
  71. }
  72. },
  73. "typographyMeta": {
  74. "headline": {
  75. "displayName": "Headline",
  76. "purpose": "Page-level headings. At most one per page."
  77. },
  78. "title": {
  79. "displayName": "Title",
  80. "purpose": "Section headers, card titles, dialog titles."
  81. },
  82. "body": {
  83. "displayName": "Body",
  84. "purpose": "Body text, table content, descriptions. Max 75ch line width."
  85. },
  86. "label": {
  87. "displayName": "Label",
  88. "purpose": "Form labels and field names. Weight carries hierarchy, not color."
  89. },
  90. "caption": {
  91. "displayName": "Caption",
  92. "purpose": "Helper text, timestamps, secondary metadata."
  93. }
  94. },
  95. "shadows": [
  96. {
  97. "name": "message-float",
  98. "value": "0 3px 6px -4px rgba(0,0,0,0.12), 0 6px 16px rgba(0,0,0,0.08), 0 9px 28px 8px rgba(0,0,0,0.05)",
  99. "purpose": "Message toasts and notification popups."
  100. },
  101. {
  102. "name": "dialog-footer",
  103. "value": "0 -1px 0 0 #e0e3e8, 0 -3px 6px 0 rgb(69 98 155 / 12%)",
  104. "purpose": "Bottom divider shadow for dialogs and search overlays."
  105. },
  106. {
  107. "name": "table-fixed-column",
  108. "value": "8px 0 10px -5px rgba(0,0,0,0.06)",
  109. "purpose": "Horizontal scroll hint for fixed table columns."
  110. }
  111. ],
  112. "motion": [
  113. {
  114. "name": "ease-standard",
  115. "value": "cubic-bezier(0.4, 0, 0.2, 1)",
  116. "purpose": "Default transition for hover states and UI element changes."
  117. },
  118. {
  119. "name": "sidebar-transition",
  120. "value": "var(--pure-transition-duration, 0.3s)",
  121. "purpose": "Sidebar expand/collapse and layout width transitions."
  122. }
  123. ],
  124. "breakpoints": [
  125. { "name": "mobile", "value": "760px" },
  126. { "name": "collapsed-sidebar", "value": "990px" }
  127. ]
  128. },
  129. "components": [
  130. {
  131. "name": "Primary Button",
  132. "kind": "button",
  133. "refersTo": "button-primary",
  134. "description": "Main action button: confirm, submit, create. Brand red with white text.",
  135. "html": "<button class=\"ds-btn-primary\">确认提交</button>",
  136. "css": ".ds-btn-primary { background: #C83A35; color: #fff; border: none; border-radius: 4px; padding: 8px 15px; font-size: 14px; font-family: \"Helvetica Neue\", Helvetica, \"PingFang SC\", \"Hiragino Sans GB\", \"Microsoft YaHei\", sans-serif; cursor: pointer; transition: background-color 0.2s ease; } .ds-btn-primary:hover { background: oklch(45% 0.16 25); } .ds-btn-primary:focus-visible { outline: 2px solid #C83A35; outline-offset: 2px; } .ds-btn-primary:active { background: oklch(38% 0.15 25); }"
  137. },
  138. {
  139. "name": "Secondary Button",
  140. "kind": "button",
  141. "refersTo": "button-default",
  142. "description": "Secondary actions: cancel, back, batch operations.",
  143. "html": "<button class=\"ds-btn-secondary\">取消</button>",
  144. "css": ".ds-btn-secondary { background: #FEFEFE; color: #303133; border: 1px solid rgb(5 5 5 / 6%); border-radius: 4px; padding: 8px 15px; font-size: 14px; font-family: \"Helvetica Neue\", Helvetica, \"PingFang SC\", \"Hiragino Sans GB\", \"Microsoft YaHei\", sans-serif; cursor: pointer; transition: background-color 0.2s ease; } .ds-btn-secondary:hover { background: #f5f5f5; }"
  145. },
  146. {
  147. "name": "Text Link Button",
  148. "kind": "button",
  149. "refersTo": "button-text",
  150. "description": "Inline table row actions: edit, view, delete.",
  151. "html": "<button class=\"ds-btn-text\">编辑</button>",
  152. "css": ".ds-btn-text { background: transparent; color: #C83A35; border: none; padding: 0; font-size: 14px; cursor: pointer; transition: opacity 0.2s ease; } .ds-btn-text:hover { opacity: 0.8; }"
  153. },
  154. {
  155. "name": "Active Menu Item",
  156. "kind": "nav",
  157. "refersTo": "menu-item-active",
  158. "description": "Currently active sidebar menu item with brand red background pill.",
  159. "html": "<div class=\"ds-menu-item-active\"><span class=\"ds-menu-icon\"><svg width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\"><rect x=\"3\" y=\"3\" width=\"18\" height=\"18\" rx=\"2\"/><line x1=\"9\" y1=\"9\" x2=\"15\" y2=\"9\"/><line x1=\"9\" y1=\"13\" x2=\"15\" y2=\"13\"/><line x1=\"9\" y1=\"17\" x2=\"12\" y2=\"17\"/></svg></span><span>订单管理</span></div>",
  160. "css": ".ds-menu-item-active { position: relative; display: flex; align-items: center; height: 50px; padding: 0 20px; color: #fff; font-size: 14px; font-family: \"Helvetica Neue\", Helvetica, \"PingFang SC\", \"Hiragino Sans GB\", \"Microsoft YaHei\", sans-serif; cursor: pointer; z-index: 1; } .ds-menu-item-active::before { position: absolute; inset: 0 8px; margin: 4px 0; content: \"\"; background: #C83A35; border-radius: 3px; z-index: -1; } .ds-menu-icon { display: flex; align-items: center; margin-right: 5px; width: 18px; height: 18px; }"
  161. },
  162. {
  163. "name": "Content Card",
  164. "kind": "card",
  165. "refersTo": "card",
  166. "description": "Standard page content container with subtle hover shadow feedback.",
  167. "html": "<div class=\"ds-card\"><div class=\"ds-card-body\">卡片内容</div></div>",
  168. "css": ".ds-card { background: #FEFEFE; border-radius: 4px; border: 1px solid rgb(5 5 5 / 6%); overflow: hidden; transition: box-shadow 0.2s ease; } .ds-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.08); } .ds-card-body { padding: 20px; font-size: 14px; color: #303133; font-family: \"Helvetica Neue\", Helvetica, \"PingFang SC\", \"Hiragino Sans GB\", \"Microsoft YaHei\", sans-serif; }"
  169. },
  170. {
  171. "name": "Text Input",
  172. "kind": "input",
  173. "refersTo": "input",
  174. "description": "Standard form input with brand red focus ring.",
  175. "html": "<div class=\"ds-form-item\"><label class=\"ds-label\">字段名</label><input class=\"ds-input\" type=\"text\" placeholder=\"请输入\" /></div>",
  176. "css": ".ds-form-item { display: flex; flex-direction: column; gap: 8px; } .ds-label { font-size: 14px; font-weight: 700; color: #606266; font-family: \"Helvetica Neue\", Helvetica, \"PingFang SC\", \"Hiragino Sans GB\", \"Microsoft YaHei\", sans-serif; } .ds-input { background: #FEFEFE; border: 1px solid rgb(5 5 5 / 6%); border-radius: 4px; padding: 8px 12px; font-size: 14px; color: #303133; font-family: \"Helvetica Neue\", Helvetica, \"PingFang SC\", \"Hiragino Sans GB\", \"Microsoft YaHei\", sans-serif; outline: none; transition: border-color 0.2s ease; } .ds-input:focus { border-color: #C83A35; } .ds-input::placeholder { color: #909399; }"
  177. }
  178. ],
  179. "narrative": {
  180. "northStar": "清晨车间",
  181. "overview": "走进清晨的洗车车间:地面刚冲过,工具归位整齐,阳光从高窗斜射进来,空气里有微微的温热。这不是无菌实验室般的冰冷秩序,而是一个被用心打理过的、有体温的工作空间。系统继承了 vue-pure-admin 的布局骨架和 Element Plus 的组件体系,但配色从默认蓝转向品牌红,在专业工具感中注入洗车行业的识别度。设计追求的是「用得顺手」而非「看了惊艳」。像一个熟悉的老工具——不需要说明书,手感刚好,放在那里就知道该怎么用。",
  182. "keyCharacteristics": [
  183. "功能先行的信息架构,核心操作路径不超过两级菜单",
  184. "红色作为策略性点缀 (≤10% 页面面积),它的力量来自稀缺而非铺张",
  185. "暗色侧边栏 + 亮色内容区的经典双区布局,不跟风全暗模式",
  186. "留白和间距有节奏变化,不追求「每处等距」的机械整齐",
  187. "每个交互都有确定的反馈,错误提示说人话,空状态给引导"
  188. ],
  189. "rules": [
  190. {
  191. "name": "The 10% Rule",
  192. "body": "Brand Red 在任何页面上的总面积不超过 10%。按钮、选中态、关键图标——它的力量来自稀缺,而不是铺张。",
  193. "section": "colors"
  194. },
  195. {
  196. "name": "The Tinted Neutral Rule",
  197. "body": "不在中性色中使用纯黑 (#000) 或纯白 (#fff)。Surface White 向暖色微偏,背景灰向蓝微偏,维持「清晨车间」的微暖而不冰冷。",
  198. "section": "colors"
  199. },
  200. {
  201. "name": "The Warm Restraint Rule",
  202. "body": "不使用冷调灰色作为大面积底色。Content Background (#F0F2F5) 已经带有微弱的蓝灰偏暖,足以提供对比而不产生距离感。如果某个区域让人觉得「冷」,先检查中性色是否偏向了纯灰。",
  203. "section": "colors"
  204. },
  205. {
  206. "name": "The Weight-Only Hierarchy Rule",
  207. "body": "文本层级通过字号和字重区分,不依赖颜色变化。同字号下,Regular vs Bold 的信息差足够大。",
  208. "section": "typography"
  209. },
  210. {
  211. "name": "The Flat-By-Default Rule",
  212. "body": "卡片、表格、表单默认无阴影。阴影只在需要传达「此层浮于彼层之上」时出现。",
  213. "section": "elevation"
  214. }
  215. ],
  216. "dos": [
  217. "Do 用 Brand Red 做页面唯一强调色,按钮、选中态、关键状态指示",
  218. "Do 让信息层级通过字号和字重表达,不依赖多种颜色区分",
  219. "Do 保持侧边栏暗色 + 内容区亮色的经典布局,这是操作者熟悉的心智模型",
  220. "Do 表单标签加粗 (700),用重量而非颜色建立字段层级",
  221. "Do 最大正文行宽控制在 75ch 以内,确保表格和描述文本的可读性",
  222. "Do 为 VXE Table 启用斑马纹和 hover 高亮,密集数据场景下这两者是效率刚需",
  223. "Do 每个交互都给确定的视觉反馈——按钮的 hover 变色、行的悬停高亮、加载态的状态指示",
  224. "Do 空状态和错误提示用友好的人话,给操作者下一步指引而非仅报错"
  225. ],
  226. "donts": [
  227. "Don't 在页面中使用超过 10% 面积的 Brand Red",
  228. "Don't 使用花哨的大色块、多余动画、营销口号式文案",
  229. "Don't 堆砌密集表格、灰色调泛滥、控件挨控件——避免传统 ERP 式的窒息感",
  230. "Don't 追求「专业感」而牺牲温度——无性格的冷灰、机械的等距排列、缺乏反馈的沉默交互",
  231. "Don't 使用 border-left 或 border-right 超过 1px 的彩色强调条",
  232. "Don't 使用渐变文字 (background-clip: text)",
  233. "Don't 默认使用玻璃拟态 (glassmorphism)",
  234. "Don't 用统一尺寸的图标卡片网格铺满页面",
  235. "Don't 模态弹窗套模态弹窗"
  236. ]
  237. }
  238. }