create-yss-spec 2.2.0 → 2.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (461) hide show
  1. package/README.md +1 -1
  2. package/package.json +1 -1
  3. package/template/.agents/rules/yss-ai-skills.md +59 -0
  4. package/template/.agents/skills/.yss-skills-manifest.json +28 -0
  5. package/template/.agents/skills/component-selection-imports/SKILL.md +64 -0
  6. package/template/.agents/skills/file-export-download/SKILL.md +160 -0
  7. package/template/.agents/skills/file-export-download/agents/openai.yaml +4 -0
  8. package/template/.agents/skills/formily-foundation/SKILL.md +176 -0
  9. package/template/.agents/skills/formily-foundation/references/examples.md +486 -0
  10. package/template/.agents/skills/formily-linkage-effects/SKILL.md +167 -0
  11. package/template/.agents/skills/formily-mode-slot-detail/SKILL.md +137 -0
  12. package/template/.agents/skills/formily-step-flow/SKILL.md +194 -0
  13. package/template/.agents/skills/frontend-commit/SKILL.md +118 -0
  14. package/template/.agents/skills/frontend-commit/agents/openai.yaml +7 -0
  15. package/template/.agents/skills/frontend-commit/references/scope-and-examples.md +111 -0
  16. package/template/.agents/skills/java-backend-commit/SKILL.md +121 -0
  17. package/template/.agents/skills/java-backend-commit/agents/openai.yaml +7 -0
  18. package/template/.agents/skills/java-backend-commit/references/scope-and-examples.md +118 -0
  19. package/template/.agents/skills/page-form-module/SKILL.md +168 -0
  20. package/template/.agents/skills/page-list-module/SKILL.md +137 -0
  21. package/template/.agents/skills/page-skeleton/SKILL.md +76 -0
  22. package/template/.agents/skills/page-skeleton/examples/AdvancedFormPage/constant.ts +34 -0
  23. package/template/.agents/skills/page-skeleton/examples/AdvancedFormPage/hooks/useRuleConfig.ts +75 -0
  24. package/template/.agents/skills/page-skeleton/examples/AdvancedFormPage/index.vue +107 -0
  25. package/template/.agents/skills/page-skeleton/examples/AdvancedFormPage/schemas/ruleConfigSchema.ts +256 -0
  26. package/template/.agents/skills/page-skeleton/examples/AdvancedFormPage/style.less +30 -0
  27. package/template/.agents/skills/page-skeleton/examples/StandardListPage/constant.ts +28 -0
  28. package/template/.agents/skills/page-skeleton/examples/StandardListPage/hooks/useQualityRuleList.ts +58 -0
  29. package/template/.agents/skills/page-skeleton/examples/StandardListPage/hooks/useRuleActions.ts +65 -0
  30. package/template/.agents/skills/page-skeleton/examples/StandardListPage/index.vue +91 -0
  31. package/template/.agents/skills/page-skeleton/examples/StandardListPage/style.less +49 -0
  32. package/template/.agents/skills/prototype-page-acceptance/SKILL.md +62 -0
  33. package/template/.agents/skills/theme-token-usage/SKILL.md +123 -0
  34. package/template/.agents/skills/theme-token-usage/agents/openai.yaml +4 -0
  35. package/template/.agents/skills/vue3-best-practices/SKILL.md +68 -0
  36. package/template/.agents/skills/yedit-table-usage/SKILL.md +227 -0
  37. package/template/.agents/skills/yss-api-integration/SKILL.md +12 -2
  38. package/template/.agents/skills/yss-components/SKILL.md +1 -1
  39. package/template/.agents/skills/yss-design-system/SKILL.md +1 -1
  40. package/template/.agents/skills/yss-formily/SKILL.md +233 -265
  41. package/template/.agents/skills/yss-frontend-scaffold-generator/SKILL.md +1 -1
  42. package/template/.agents/skills/yss-hook/SKILL.md +1 -1
  43. package/template/.agents/skills/yss-openapi-governance/SKILL.md +2 -2
  44. package/template/.agents/skills/yss-page-module-development/SKILL.md +12 -2
  45. package/template/.agents/skills/yss-page-module-development/references/component-map.md +34 -0
  46. package/template/.agents/skills/yss-page-module-development/references/hooks-map.md +11 -0
  47. package/template/.agents/skills/yss-page-module-development/references/utils-map.md +14 -0
  48. package/template/.agents/skills/yss-product-lifecycle/references/orchestration-contract.yaml +62 -1
  49. package/template/.agents/skills/yss-router/references/boundaries.md +1 -1
  50. package/template/.agents/skills/yss-router/references/router-contract.yaml +6 -2
  51. package/template/.agents/skills/yss-ui/SKILL.md +1 -1
  52. package/template/.agents/skills/yss-use-table-height/SKILL.md +9 -0
  53. package/template/.agents/skills/yss-use-tree-height/SKILL.md +9 -0
  54. package/template/.agents/skills/ytable-usage/SKILL.md +251 -0
  55. package/template/.agents/skills/ytree-usage/SKILL.md +132 -0
  56. package/template/.claude/skills/.yss-skills-manifest.json +29 -0
  57. package/template/.claude/skills/component-selection-imports/SKILL.md +64 -0
  58. package/template/.claude/skills/file-export-download/SKILL.md +160 -0
  59. package/template/.claude/skills/file-export-download/agents/openai.yaml +4 -0
  60. package/template/.claude/skills/formily-foundation/SKILL.md +176 -0
  61. package/template/.claude/skills/formily-foundation/references/examples.md +486 -0
  62. package/template/.claude/skills/formily-linkage-effects/SKILL.md +167 -0
  63. package/template/.claude/skills/formily-mode-slot-detail/SKILL.md +137 -0
  64. package/template/.claude/skills/formily-step-flow/SKILL.md +194 -0
  65. package/template/.claude/skills/frontend-commit/SKILL.md +118 -0
  66. package/template/.claude/skills/frontend-commit/agents/openai.yaml +7 -0
  67. package/template/.claude/skills/frontend-commit/references/scope-and-examples.md +111 -0
  68. package/template/.claude/skills/java-backend-commit/SKILL.md +121 -0
  69. package/template/.claude/skills/java-backend-commit/agents/openai.yaml +7 -0
  70. package/template/.claude/skills/java-backend-commit/references/scope-and-examples.md +118 -0
  71. package/template/.claude/skills/page-form-module/SKILL.md +168 -0
  72. package/template/.claude/skills/page-list-module/SKILL.md +137 -0
  73. package/template/.claude/skills/page-skeleton/SKILL.md +76 -0
  74. package/template/.claude/skills/page-skeleton/examples/AdvancedFormPage/constant.ts +34 -0
  75. package/template/.claude/skills/page-skeleton/examples/AdvancedFormPage/hooks/useRuleConfig.ts +75 -0
  76. package/template/.claude/skills/page-skeleton/examples/AdvancedFormPage/index.vue +107 -0
  77. package/template/.claude/skills/page-skeleton/examples/AdvancedFormPage/schemas/ruleConfigSchema.ts +256 -0
  78. package/template/.claude/skills/page-skeleton/examples/AdvancedFormPage/style.less +30 -0
  79. package/template/.claude/skills/page-skeleton/examples/StandardListPage/constant.ts +28 -0
  80. package/template/.claude/skills/page-skeleton/examples/StandardListPage/hooks/useQualityRuleList.ts +58 -0
  81. package/template/.claude/skills/page-skeleton/examples/StandardListPage/hooks/useRuleActions.ts +65 -0
  82. package/template/.claude/skills/page-skeleton/examples/StandardListPage/index.vue +91 -0
  83. package/template/.claude/skills/page-skeleton/examples/StandardListPage/style.less +49 -0
  84. package/template/.claude/skills/prototype-page-acceptance/SKILL.md +62 -0
  85. package/template/.claude/skills/theme-token-usage/SKILL.md +123 -0
  86. package/template/.claude/skills/theme-token-usage/agents/openai.yaml +4 -0
  87. package/template/.claude/skills/vue3-best-practices/SKILL.md +68 -0
  88. package/template/.claude/skills/yedit-table-usage/SKILL.md +227 -0
  89. package/template/.claude/skills/yss-api-integration/SKILL.md +12 -2
  90. package/template/.claude/skills/yss-components/SKILL.md +1 -1
  91. package/template/.claude/skills/yss-design-system/SKILL.md +1 -1
  92. package/template/.claude/skills/yss-formily/SKILL.md +233 -265
  93. package/template/.claude/skills/yss-frontend-scaffold-generator/SKILL.md +1 -1
  94. package/template/.claude/skills/yss-hook/SKILL.md +1 -1
  95. package/template/.claude/skills/yss-openapi-governance/SKILL.md +2 -2
  96. package/template/.claude/skills/yss-page-module-development/SKILL.md +12 -2
  97. package/template/.claude/skills/yss-page-module-development/references/component-map.md +34 -0
  98. package/template/.claude/skills/yss-page-module-development/references/hooks-map.md +11 -0
  99. package/template/.claude/skills/yss-page-module-development/references/utils-map.md +14 -0
  100. package/template/.claude/skills/yss-product-lifecycle/references/orchestration-contract.yaml +62 -1
  101. package/template/.claude/skills/yss-router/references/boundaries.md +1 -1
  102. package/template/.claude/skills/yss-router/references/router-contract.yaml +6 -2
  103. package/template/.claude/skills/yss-ui/SKILL.md +1 -1
  104. package/template/.claude/skills/yss-use-table-height/SKILL.md +9 -0
  105. package/template/.claude/skills/yss-use-tree-height/SKILL.md +9 -0
  106. package/template/.claude/skills/ytable-usage/SKILL.md +251 -0
  107. package/template/.claude/skills/ytree-usage/SKILL.md +132 -0
  108. package/template/.codex/skills/component-selection-imports/SKILL.md +64 -0
  109. package/template/.codex/skills/file-export-download/SKILL.md +160 -0
  110. package/template/.codex/skills/file-export-download/agents/openai.yaml +4 -0
  111. package/template/.codex/skills/formily-foundation/SKILL.md +176 -0
  112. package/template/.codex/skills/formily-foundation/references/examples.md +486 -0
  113. package/template/.codex/skills/formily-linkage-effects/SKILL.md +167 -0
  114. package/template/.codex/skills/formily-mode-slot-detail/SKILL.md +137 -0
  115. package/template/.codex/skills/formily-step-flow/SKILL.md +194 -0
  116. package/template/.codex/skills/frontend-commit/SKILL.md +118 -0
  117. package/template/.codex/skills/frontend-commit/agents/openai.yaml +7 -0
  118. package/template/.codex/skills/frontend-commit/references/scope-and-examples.md +111 -0
  119. package/template/.codex/skills/java-backend-commit/SKILL.md +121 -0
  120. package/template/.codex/skills/java-backend-commit/agents/openai.yaml +7 -0
  121. package/template/.codex/skills/java-backend-commit/references/scope-and-examples.md +118 -0
  122. package/template/.codex/skills/page-form-module/SKILL.md +168 -0
  123. package/template/.codex/skills/page-list-module/SKILL.md +137 -0
  124. package/template/.codex/skills/page-skeleton/SKILL.md +76 -0
  125. package/template/.codex/skills/page-skeleton/examples/AdvancedFormPage/constant.ts +34 -0
  126. package/template/.codex/skills/page-skeleton/examples/AdvancedFormPage/hooks/useRuleConfig.ts +75 -0
  127. package/template/.codex/skills/page-skeleton/examples/AdvancedFormPage/index.vue +107 -0
  128. package/template/.codex/skills/page-skeleton/examples/AdvancedFormPage/schemas/ruleConfigSchema.ts +256 -0
  129. package/template/.codex/skills/page-skeleton/examples/AdvancedFormPage/style.less +30 -0
  130. package/template/.codex/skills/page-skeleton/examples/StandardListPage/constant.ts +28 -0
  131. package/template/.codex/skills/page-skeleton/examples/StandardListPage/hooks/useQualityRuleList.ts +58 -0
  132. package/template/.codex/skills/page-skeleton/examples/StandardListPage/hooks/useRuleActions.ts +65 -0
  133. package/template/.codex/skills/page-skeleton/examples/StandardListPage/index.vue +91 -0
  134. package/template/.codex/skills/page-skeleton/examples/StandardListPage/style.less +49 -0
  135. package/template/.codex/skills/prototype-page-acceptance/SKILL.md +62 -0
  136. package/template/.codex/skills/theme-token-usage/SKILL.md +123 -0
  137. package/template/.codex/skills/theme-token-usage/agents/openai.yaml +4 -0
  138. package/template/.codex/skills/vue3-best-practices/SKILL.md +68 -0
  139. package/template/.codex/skills/yedit-table-usage/SKILL.md +227 -0
  140. package/template/.codex/skills/yss-api-integration/SKILL.md +12 -2
  141. package/template/.codex/skills/yss-components/SKILL.md +1 -1
  142. package/template/.codex/skills/yss-design-system/SKILL.md +1 -1
  143. package/template/.codex/skills/yss-formily/SKILL.md +233 -265
  144. package/template/.codex/skills/yss-frontend-scaffold-generator/SKILL.md +1 -1
  145. package/template/.codex/skills/yss-hook/SKILL.md +1 -1
  146. package/template/.codex/skills/yss-openapi-governance/SKILL.md +2 -2
  147. package/template/.codex/skills/yss-page-module-development/SKILL.md +12 -2
  148. package/template/.codex/skills/yss-page-module-development/references/component-map.md +34 -0
  149. package/template/.codex/skills/yss-page-module-development/references/hooks-map.md +11 -0
  150. package/template/.codex/skills/yss-page-module-development/references/utils-map.md +14 -0
  151. package/template/.codex/skills/yss-product-lifecycle/references/orchestration-contract.yaml +62 -1
  152. package/template/.codex/skills/yss-router/references/boundaries.md +1 -1
  153. package/template/.codex/skills/yss-router/references/router-contract.yaml +6 -2
  154. package/template/.codex/skills/yss-ui/SKILL.md +1 -1
  155. package/template/.codex/skills/yss-use-table-height/SKILL.md +9 -0
  156. package/template/.codex/skills/yss-use-tree-height/SKILL.md +9 -0
  157. package/template/.codex/skills/ytable-usage/SKILL.md +251 -0
  158. package/template/.codex/skills/ytree-usage/SKILL.md +132 -0
  159. package/template/.cursor/skills/.yss-skills-manifest.json +29 -0
  160. package/template/.cursor/skills/component-selection-imports/SKILL.md +64 -0
  161. package/template/.cursor/skills/file-export-download/SKILL.md +160 -0
  162. package/template/.cursor/skills/file-export-download/agents/openai.yaml +4 -0
  163. package/template/.cursor/skills/formily-foundation/SKILL.md +176 -0
  164. package/template/.cursor/skills/formily-foundation/references/examples.md +486 -0
  165. package/template/.cursor/skills/formily-linkage-effects/SKILL.md +167 -0
  166. package/template/.cursor/skills/formily-mode-slot-detail/SKILL.md +137 -0
  167. package/template/.cursor/skills/formily-step-flow/SKILL.md +194 -0
  168. package/template/.cursor/skills/frontend-commit/SKILL.md +118 -0
  169. package/template/.cursor/skills/frontend-commit/agents/openai.yaml +7 -0
  170. package/template/.cursor/skills/frontend-commit/references/scope-and-examples.md +111 -0
  171. package/template/.cursor/skills/java-backend-commit/SKILL.md +121 -0
  172. package/template/.cursor/skills/java-backend-commit/agents/openai.yaml +7 -0
  173. package/template/.cursor/skills/java-backend-commit/references/scope-and-examples.md +118 -0
  174. package/template/.cursor/skills/page-form-module/SKILL.md +168 -0
  175. package/template/.cursor/skills/page-list-module/SKILL.md +137 -0
  176. package/template/.cursor/skills/page-skeleton/SKILL.md +76 -0
  177. package/template/.cursor/skills/page-skeleton/examples/AdvancedFormPage/constant.ts +34 -0
  178. package/template/.cursor/skills/page-skeleton/examples/AdvancedFormPage/hooks/useRuleConfig.ts +75 -0
  179. package/template/.cursor/skills/page-skeleton/examples/AdvancedFormPage/index.vue +107 -0
  180. package/template/.cursor/skills/page-skeleton/examples/AdvancedFormPage/schemas/ruleConfigSchema.ts +256 -0
  181. package/template/.cursor/skills/page-skeleton/examples/AdvancedFormPage/style.less +30 -0
  182. package/template/.cursor/skills/page-skeleton/examples/StandardListPage/constant.ts +28 -0
  183. package/template/.cursor/skills/page-skeleton/examples/StandardListPage/hooks/useQualityRuleList.ts +58 -0
  184. package/template/.cursor/skills/page-skeleton/examples/StandardListPage/hooks/useRuleActions.ts +65 -0
  185. package/template/.cursor/skills/page-skeleton/examples/StandardListPage/index.vue +91 -0
  186. package/template/.cursor/skills/page-skeleton/examples/StandardListPage/style.less +49 -0
  187. package/template/.cursor/skills/prototype-page-acceptance/SKILL.md +62 -0
  188. package/template/.cursor/skills/theme-token-usage/SKILL.md +123 -0
  189. package/template/.cursor/skills/theme-token-usage/agents/openai.yaml +4 -0
  190. package/template/.cursor/skills/vue3-best-practices/SKILL.md +68 -0
  191. package/template/.cursor/skills/yedit-table-usage/SKILL.md +227 -0
  192. package/template/.cursor/skills/yss-api-integration/SKILL.md +12 -2
  193. package/template/.cursor/skills/yss-components/SKILL.md +1 -1
  194. package/template/.cursor/skills/yss-design-system/SKILL.md +1 -1
  195. package/template/.cursor/skills/yss-formily/SKILL.md +233 -265
  196. package/template/.cursor/skills/yss-frontend-scaffold-generator/SKILL.md +1 -1
  197. package/template/.cursor/skills/yss-hook/SKILL.md +1 -1
  198. package/template/.cursor/skills/yss-openapi-governance/SKILL.md +2 -2
  199. package/template/.cursor/skills/yss-page-module-development/SKILL.md +12 -2
  200. package/template/.cursor/skills/yss-page-module-development/references/component-map.md +34 -0
  201. package/template/.cursor/skills/yss-page-module-development/references/hooks-map.md +11 -0
  202. package/template/.cursor/skills/yss-page-module-development/references/utils-map.md +14 -0
  203. package/template/.cursor/skills/yss-product-lifecycle/references/orchestration-contract.yaml +62 -1
  204. package/template/.cursor/skills/yss-router/references/boundaries.md +1 -1
  205. package/template/.cursor/skills/yss-router/references/router-contract.yaml +6 -2
  206. package/template/.cursor/skills/yss-ui/SKILL.md +1 -1
  207. package/template/.cursor/skills/yss-use-table-height/SKILL.md +9 -0
  208. package/template/.cursor/skills/yss-use-tree-height/SKILL.md +9 -0
  209. package/template/.cursor/skills/ytable-usage/SKILL.md +251 -0
  210. package/template/.cursor/skills/ytree-usage/SKILL.md +132 -0
  211. package/template/.cursorrules +32 -0
  212. package/template/.hermes/skills/component-selection-imports/SKILL.md +64 -0
  213. package/template/.hermes/skills/file-export-download/SKILL.md +160 -0
  214. package/template/.hermes/skills/file-export-download/agents/openai.yaml +4 -0
  215. package/template/.hermes/skills/formily-foundation/SKILL.md +176 -0
  216. package/template/.hermes/skills/formily-foundation/references/examples.md +486 -0
  217. package/template/.hermes/skills/formily-linkage-effects/SKILL.md +167 -0
  218. package/template/.hermes/skills/formily-mode-slot-detail/SKILL.md +137 -0
  219. package/template/.hermes/skills/formily-step-flow/SKILL.md +194 -0
  220. package/template/.hermes/skills/frontend-commit/SKILL.md +118 -0
  221. package/template/.hermes/skills/frontend-commit/agents/openai.yaml +7 -0
  222. package/template/.hermes/skills/frontend-commit/references/scope-and-examples.md +111 -0
  223. package/template/.hermes/skills/java-backend-commit/SKILL.md +121 -0
  224. package/template/.hermes/skills/java-backend-commit/agents/openai.yaml +7 -0
  225. package/template/.hermes/skills/java-backend-commit/references/scope-and-examples.md +118 -0
  226. package/template/.hermes/skills/page-form-module/SKILL.md +168 -0
  227. package/template/.hermes/skills/page-list-module/SKILL.md +137 -0
  228. package/template/.hermes/skills/page-skeleton/SKILL.md +76 -0
  229. package/template/.hermes/skills/page-skeleton/examples/AdvancedFormPage/constant.ts +34 -0
  230. package/template/.hermes/skills/page-skeleton/examples/AdvancedFormPage/hooks/useRuleConfig.ts +75 -0
  231. package/template/.hermes/skills/page-skeleton/examples/AdvancedFormPage/index.vue +107 -0
  232. package/template/.hermes/skills/page-skeleton/examples/AdvancedFormPage/schemas/ruleConfigSchema.ts +256 -0
  233. package/template/.hermes/skills/page-skeleton/examples/AdvancedFormPage/style.less +30 -0
  234. package/template/.hermes/skills/page-skeleton/examples/StandardListPage/constant.ts +28 -0
  235. package/template/.hermes/skills/page-skeleton/examples/StandardListPage/hooks/useQualityRuleList.ts +58 -0
  236. package/template/.hermes/skills/page-skeleton/examples/StandardListPage/hooks/useRuleActions.ts +65 -0
  237. package/template/.hermes/skills/page-skeleton/examples/StandardListPage/index.vue +91 -0
  238. package/template/.hermes/skills/page-skeleton/examples/StandardListPage/style.less +49 -0
  239. package/template/.hermes/skills/prototype-page-acceptance/SKILL.md +62 -0
  240. package/template/.hermes/skills/theme-token-usage/SKILL.md +123 -0
  241. package/template/.hermes/skills/theme-token-usage/agents/openai.yaml +4 -0
  242. package/template/.hermes/skills/vue3-best-practices/SKILL.md +68 -0
  243. package/template/.hermes/skills/yedit-table-usage/SKILL.md +227 -0
  244. package/template/.hermes/skills/yss-api-integration/SKILL.md +12 -2
  245. package/template/.hermes/skills/yss-components/SKILL.md +1 -1
  246. package/template/.hermes/skills/yss-design-system/SKILL.md +1 -1
  247. package/template/.hermes/skills/yss-formily/SKILL.md +233 -265
  248. package/template/.hermes/skills/yss-frontend-scaffold-generator/SKILL.md +1 -1
  249. package/template/.hermes/skills/yss-hook/SKILL.md +1 -1
  250. package/template/.hermes/skills/yss-openapi-governance/SKILL.md +2 -2
  251. package/template/.hermes/skills/yss-page-module-development/SKILL.md +12 -2
  252. package/template/.hermes/skills/yss-page-module-development/references/component-map.md +34 -0
  253. package/template/.hermes/skills/yss-page-module-development/references/hooks-map.md +11 -0
  254. package/template/.hermes/skills/yss-page-module-development/references/utils-map.md +14 -0
  255. package/template/.hermes/skills/yss-product-lifecycle/references/orchestration-contract.yaml +62 -1
  256. package/template/.hermes/skills/yss-router/references/boundaries.md +1 -1
  257. package/template/.hermes/skills/yss-router/references/router-contract.yaml +6 -2
  258. package/template/.hermes/skills/yss-ui/SKILL.md +1 -1
  259. package/template/.hermes/skills/yss-use-table-height/SKILL.md +9 -0
  260. package/template/.hermes/skills/yss-use-tree-height/SKILL.md +9 -0
  261. package/template/.hermes/skills/ytable-usage/SKILL.md +251 -0
  262. package/template/.hermes/skills/ytree-usage/SKILL.md +132 -0
  263. package/template/.pi/skills/component-selection-imports/SKILL.md +64 -0
  264. package/template/.pi/skills/file-export-download/SKILL.md +160 -0
  265. package/template/.pi/skills/file-export-download/agents/openai.yaml +4 -0
  266. package/template/.pi/skills/formily-foundation/SKILL.md +176 -0
  267. package/template/.pi/skills/formily-foundation/references/examples.md +486 -0
  268. package/template/.pi/skills/formily-linkage-effects/SKILL.md +167 -0
  269. package/template/.pi/skills/formily-mode-slot-detail/SKILL.md +137 -0
  270. package/template/.pi/skills/formily-step-flow/SKILL.md +194 -0
  271. package/template/.pi/skills/frontend-commit/SKILL.md +118 -0
  272. package/template/.pi/skills/frontend-commit/agents/openai.yaml +7 -0
  273. package/template/.pi/skills/frontend-commit/references/scope-and-examples.md +111 -0
  274. package/template/.pi/skills/java-backend-commit/SKILL.md +121 -0
  275. package/template/.pi/skills/java-backend-commit/agents/openai.yaml +7 -0
  276. package/template/.pi/skills/java-backend-commit/references/scope-and-examples.md +118 -0
  277. package/template/.pi/skills/page-form-module/SKILL.md +168 -0
  278. package/template/.pi/skills/page-list-module/SKILL.md +137 -0
  279. package/template/.pi/skills/page-skeleton/SKILL.md +76 -0
  280. package/template/.pi/skills/page-skeleton/examples/AdvancedFormPage/constant.ts +34 -0
  281. package/template/.pi/skills/page-skeleton/examples/AdvancedFormPage/hooks/useRuleConfig.ts +75 -0
  282. package/template/.pi/skills/page-skeleton/examples/AdvancedFormPage/index.vue +107 -0
  283. package/template/.pi/skills/page-skeleton/examples/AdvancedFormPage/schemas/ruleConfigSchema.ts +256 -0
  284. package/template/.pi/skills/page-skeleton/examples/AdvancedFormPage/style.less +30 -0
  285. package/template/.pi/skills/page-skeleton/examples/StandardListPage/constant.ts +28 -0
  286. package/template/.pi/skills/page-skeleton/examples/StandardListPage/hooks/useQualityRuleList.ts +58 -0
  287. package/template/.pi/skills/page-skeleton/examples/StandardListPage/hooks/useRuleActions.ts +65 -0
  288. package/template/.pi/skills/page-skeleton/examples/StandardListPage/index.vue +91 -0
  289. package/template/.pi/skills/page-skeleton/examples/StandardListPage/style.less +49 -0
  290. package/template/.pi/skills/prototype-page-acceptance/SKILL.md +62 -0
  291. package/template/.pi/skills/theme-token-usage/SKILL.md +123 -0
  292. package/template/.pi/skills/theme-token-usage/agents/openai.yaml +4 -0
  293. package/template/.pi/skills/vue3-best-practices/SKILL.md +68 -0
  294. package/template/.pi/skills/yedit-table-usage/SKILL.md +227 -0
  295. package/template/.pi/skills/yss-api-integration/SKILL.md +12 -2
  296. package/template/.pi/skills/yss-components/SKILL.md +1 -1
  297. package/template/.pi/skills/yss-design-system/SKILL.md +1 -1
  298. package/template/.pi/skills/yss-formily/SKILL.md +233 -265
  299. package/template/.pi/skills/yss-frontend-scaffold-generator/SKILL.md +1 -1
  300. package/template/.pi/skills/yss-hook/SKILL.md +1 -1
  301. package/template/.pi/skills/yss-openapi-governance/SKILL.md +2 -2
  302. package/template/.pi/skills/yss-page-module-development/SKILL.md +12 -2
  303. package/template/.pi/skills/yss-page-module-development/references/component-map.md +34 -0
  304. package/template/.pi/skills/yss-page-module-development/references/hooks-map.md +11 -0
  305. package/template/.pi/skills/yss-page-module-development/references/utils-map.md +14 -0
  306. package/template/.pi/skills/yss-product-lifecycle/references/orchestration-contract.yaml +62 -1
  307. package/template/.pi/skills/yss-router/references/boundaries.md +1 -1
  308. package/template/.pi/skills/yss-router/references/router-contract.yaml +6 -2
  309. package/template/.pi/skills/yss-ui/SKILL.md +1 -1
  310. package/template/.pi/skills/yss-use-table-height/SKILL.md +9 -0
  311. package/template/.pi/skills/yss-use-tree-height/SKILL.md +9 -0
  312. package/template/.pi/skills/ytable-usage/SKILL.md +251 -0
  313. package/template/.pi/skills/ytree-usage/SKILL.md +132 -0
  314. package/template/.qoder/skills/component-selection-imports/SKILL.md +64 -0
  315. package/template/.qoder/skills/file-export-download/SKILL.md +160 -0
  316. package/template/.qoder/skills/file-export-download/agents/openai.yaml +4 -0
  317. package/template/.qoder/skills/formily-foundation/SKILL.md +176 -0
  318. package/template/.qoder/skills/formily-foundation/references/examples.md +486 -0
  319. package/template/.qoder/skills/formily-linkage-effects/SKILL.md +167 -0
  320. package/template/.qoder/skills/formily-mode-slot-detail/SKILL.md +137 -0
  321. package/template/.qoder/skills/formily-step-flow/SKILL.md +194 -0
  322. package/template/.qoder/skills/frontend-commit/SKILL.md +118 -0
  323. package/template/.qoder/skills/frontend-commit/agents/openai.yaml +7 -0
  324. package/template/.qoder/skills/frontend-commit/references/scope-and-examples.md +111 -0
  325. package/template/.qoder/skills/java-backend-commit/SKILL.md +121 -0
  326. package/template/.qoder/skills/java-backend-commit/agents/openai.yaml +7 -0
  327. package/template/.qoder/skills/java-backend-commit/references/scope-and-examples.md +118 -0
  328. package/template/.qoder/skills/page-form-module/SKILL.md +168 -0
  329. package/template/.qoder/skills/page-list-module/SKILL.md +137 -0
  330. package/template/.qoder/skills/page-skeleton/SKILL.md +76 -0
  331. package/template/.qoder/skills/page-skeleton/examples/AdvancedFormPage/constant.ts +34 -0
  332. package/template/.qoder/skills/page-skeleton/examples/AdvancedFormPage/hooks/useRuleConfig.ts +75 -0
  333. package/template/.qoder/skills/page-skeleton/examples/AdvancedFormPage/index.vue +107 -0
  334. package/template/.qoder/skills/page-skeleton/examples/AdvancedFormPage/schemas/ruleConfigSchema.ts +256 -0
  335. package/template/.qoder/skills/page-skeleton/examples/AdvancedFormPage/style.less +30 -0
  336. package/template/.qoder/skills/page-skeleton/examples/StandardListPage/constant.ts +28 -0
  337. package/template/.qoder/skills/page-skeleton/examples/StandardListPage/hooks/useQualityRuleList.ts +58 -0
  338. package/template/.qoder/skills/page-skeleton/examples/StandardListPage/hooks/useRuleActions.ts +65 -0
  339. package/template/.qoder/skills/page-skeleton/examples/StandardListPage/index.vue +91 -0
  340. package/template/.qoder/skills/page-skeleton/examples/StandardListPage/style.less +49 -0
  341. package/template/.qoder/skills/prototype-page-acceptance/SKILL.md +62 -0
  342. package/template/.qoder/skills/theme-token-usage/SKILL.md +123 -0
  343. package/template/.qoder/skills/theme-token-usage/agents/openai.yaml +4 -0
  344. package/template/.qoder/skills/vue3-best-practices/SKILL.md +68 -0
  345. package/template/.qoder/skills/yedit-table-usage/SKILL.md +227 -0
  346. package/template/.qoder/skills/yss-api-integration/SKILL.md +12 -2
  347. package/template/.qoder/skills/yss-components/SKILL.md +1 -1
  348. package/template/.qoder/skills/yss-design-system/SKILL.md +1 -1
  349. package/template/.qoder/skills/yss-formily/SKILL.md +233 -265
  350. package/template/.qoder/skills/yss-frontend-scaffold-generator/SKILL.md +1 -1
  351. package/template/.qoder/skills/yss-hook/SKILL.md +1 -1
  352. package/template/.qoder/skills/yss-openapi-governance/SKILL.md +2 -2
  353. package/template/.qoder/skills/yss-page-module-development/SKILL.md +12 -2
  354. package/template/.qoder/skills/yss-page-module-development/references/component-map.md +34 -0
  355. package/template/.qoder/skills/yss-page-module-development/references/hooks-map.md +11 -0
  356. package/template/.qoder/skills/yss-page-module-development/references/utils-map.md +14 -0
  357. package/template/.qoder/skills/yss-product-lifecycle/references/orchestration-contract.yaml +62 -1
  358. package/template/.qoder/skills/yss-router/references/boundaries.md +1 -1
  359. package/template/.qoder/skills/yss-router/references/router-contract.yaml +6 -2
  360. package/template/.qoder/skills/yss-ui/SKILL.md +1 -1
  361. package/template/.qoder/skills/yss-use-table-height/SKILL.md +9 -0
  362. package/template/.qoder/skills/yss-use-tree-height/SKILL.md +9 -0
  363. package/template/.qoder/skills/ytable-usage/SKILL.md +251 -0
  364. package/template/.qoder/skills/ytree-usage/SKILL.md +132 -0
  365. package/template/.trae/skills/.yss-skills-manifest.json +29 -0
  366. package/template/.trae/skills/component-selection-imports/SKILL.md +64 -0
  367. package/template/.trae/skills/file-export-download/SKILL.md +160 -0
  368. package/template/.trae/skills/file-export-download/agents/openai.yaml +4 -0
  369. package/template/.trae/skills/formily-foundation/SKILL.md +176 -0
  370. package/template/.trae/skills/formily-foundation/references/examples.md +486 -0
  371. package/template/.trae/skills/formily-linkage-effects/SKILL.md +167 -0
  372. package/template/.trae/skills/formily-mode-slot-detail/SKILL.md +137 -0
  373. package/template/.trae/skills/formily-step-flow/SKILL.md +194 -0
  374. package/template/.trae/skills/frontend-commit/SKILL.md +118 -0
  375. package/template/.trae/skills/frontend-commit/agents/openai.yaml +7 -0
  376. package/template/.trae/skills/frontend-commit/references/scope-and-examples.md +111 -0
  377. package/template/.trae/skills/java-backend-commit/SKILL.md +121 -0
  378. package/template/.trae/skills/java-backend-commit/agents/openai.yaml +7 -0
  379. package/template/.trae/skills/java-backend-commit/references/scope-and-examples.md +118 -0
  380. package/template/.trae/skills/page-form-module/SKILL.md +168 -0
  381. package/template/.trae/skills/page-list-module/SKILL.md +137 -0
  382. package/template/.trae/skills/page-skeleton/SKILL.md +76 -0
  383. package/template/.trae/skills/page-skeleton/examples/AdvancedFormPage/constant.ts +34 -0
  384. package/template/.trae/skills/page-skeleton/examples/AdvancedFormPage/hooks/useRuleConfig.ts +75 -0
  385. package/template/.trae/skills/page-skeleton/examples/AdvancedFormPage/index.vue +107 -0
  386. package/template/.trae/skills/page-skeleton/examples/AdvancedFormPage/schemas/ruleConfigSchema.ts +256 -0
  387. package/template/.trae/skills/page-skeleton/examples/AdvancedFormPage/style.less +30 -0
  388. package/template/.trae/skills/page-skeleton/examples/StandardListPage/constant.ts +28 -0
  389. package/template/.trae/skills/page-skeleton/examples/StandardListPage/hooks/useQualityRuleList.ts +58 -0
  390. package/template/.trae/skills/page-skeleton/examples/StandardListPage/hooks/useRuleActions.ts +65 -0
  391. package/template/.trae/skills/page-skeleton/examples/StandardListPage/index.vue +91 -0
  392. package/template/.trae/skills/page-skeleton/examples/StandardListPage/style.less +49 -0
  393. package/template/.trae/skills/prototype-page-acceptance/SKILL.md +62 -0
  394. package/template/.trae/skills/theme-token-usage/SKILL.md +123 -0
  395. package/template/.trae/skills/theme-token-usage/agents/openai.yaml +4 -0
  396. package/template/.trae/skills/vue3-best-practices/SKILL.md +68 -0
  397. package/template/.trae/skills/yedit-table-usage/SKILL.md +227 -0
  398. package/template/.trae/skills/yss-api-integration/SKILL.md +12 -2
  399. package/template/.trae/skills/yss-components/SKILL.md +1 -1
  400. package/template/.trae/skills/yss-design-system/SKILL.md +1 -1
  401. package/template/.trae/skills/yss-formily/SKILL.md +233 -265
  402. package/template/.trae/skills/yss-frontend-scaffold-generator/SKILL.md +1 -1
  403. package/template/.trae/skills/yss-hook/SKILL.md +1 -1
  404. package/template/.trae/skills/yss-openapi-governance/SKILL.md +2 -2
  405. package/template/.trae/skills/yss-page-module-development/SKILL.md +12 -2
  406. package/template/.trae/skills/yss-page-module-development/references/component-map.md +34 -0
  407. package/template/.trae/skills/yss-page-module-development/references/hooks-map.md +11 -0
  408. package/template/.trae/skills/yss-page-module-development/references/utils-map.md +14 -0
  409. package/template/.trae/skills/yss-product-lifecycle/references/orchestration-contract.yaml +62 -1
  410. package/template/.trae/skills/yss-router/references/boundaries.md +1 -1
  411. package/template/.trae/skills/yss-router/references/router-contract.yaml +6 -2
  412. package/template/.trae/skills/yss-ui/SKILL.md +1 -1
  413. package/template/.trae/skills/yss-use-table-height/SKILL.md +9 -0
  414. package/template/.trae/skills/yss-use-tree-height/SKILL.md +9 -0
  415. package/template/.trae/skills/ytable-usage/SKILL.md +251 -0
  416. package/template/.trae/skills/ytree-usage/SKILL.md +132 -0
  417. package/template/docs/agents/skill-migrations.md +16 -0
  418. package/template/docs/agents/skills-maintenance.md +1 -1
  419. package/template/docs/agents/yss-skill-registry.yaml +125 -25
  420. package/template/docs/user-guide//344/272/247/345/223/201/347/240/224/345/217/221/345/205/250/347/224/237/345/221/275/345/221/250/346/234/237/346/234/200/344/275/263/345/256/236/350/267/265.md +4 -4
  421. package/template/docs/user-guide//347/224/237/345/221/275/345/221/250/346/234/237/346/234/200/344/275/263/345/256/236/350/267/265.md +1 -1
  422. package/template/scripts/lib/scenario-checks.mjs +21 -0
  423. package/template/scripts/lib/skill-governance.mjs +50 -0
  424. package/template/scripts/lib/skill-registry.mjs +82 -5
  425. package/template/scripts/lib/skill-supply-chain.mjs +5 -1
  426. package/template/scripts/verify-skill-governance +10 -0
  427. package/template/scripts/verify-template +3 -2
  428. package/template/skills-lock.json +285 -29
  429. package/template.snapshot.json +4 -4
  430. package/template/.agents/skills/high-fidelity-html-prototype/SKILL.md +0 -89
  431. package/template/.agents/skills/high-fidelity-html-prototype/agents/openai.yaml +0 -5
  432. package/template/.agents/skills/yss-formily/agents/openai.yaml +0 -5
  433. package/template/.agents/skills/yss-formily/references/examples.md +0 -65
  434. package/template/.claude/skills/high-fidelity-html-prototype/SKILL.md +0 -89
  435. package/template/.claude/skills/high-fidelity-html-prototype/agents/openai.yaml +0 -5
  436. package/template/.claude/skills/yss-formily/agents/openai.yaml +0 -5
  437. package/template/.claude/skills/yss-formily/references/examples.md +0 -65
  438. package/template/.codex/skills/high-fidelity-html-prototype/SKILL.md +0 -89
  439. package/template/.codex/skills/high-fidelity-html-prototype/agents/openai.yaml +0 -5
  440. package/template/.codex/skills/yss-formily/agents/openai.yaml +0 -5
  441. package/template/.codex/skills/yss-formily/references/examples.md +0 -65
  442. package/template/.cursor/skills/high-fidelity-html-prototype/SKILL.md +0 -89
  443. package/template/.cursor/skills/high-fidelity-html-prototype/agents/openai.yaml +0 -5
  444. package/template/.cursor/skills/yss-formily/agents/openai.yaml +0 -5
  445. package/template/.cursor/skills/yss-formily/references/examples.md +0 -65
  446. package/template/.hermes/skills/high-fidelity-html-prototype/SKILL.md +0 -89
  447. package/template/.hermes/skills/high-fidelity-html-prototype/agents/openai.yaml +0 -5
  448. package/template/.hermes/skills/yss-formily/agents/openai.yaml +0 -5
  449. package/template/.hermes/skills/yss-formily/references/examples.md +0 -65
  450. package/template/.pi/skills/high-fidelity-html-prototype/SKILL.md +0 -89
  451. package/template/.pi/skills/high-fidelity-html-prototype/agents/openai.yaml +0 -5
  452. package/template/.pi/skills/yss-formily/agents/openai.yaml +0 -5
  453. package/template/.pi/skills/yss-formily/references/examples.md +0 -65
  454. package/template/.qoder/skills/high-fidelity-html-prototype/SKILL.md +0 -89
  455. package/template/.qoder/skills/high-fidelity-html-prototype/agents/openai.yaml +0 -5
  456. package/template/.qoder/skills/yss-formily/agents/openai.yaml +0 -5
  457. package/template/.qoder/skills/yss-formily/references/examples.md +0 -65
  458. package/template/.trae/skills/high-fidelity-html-prototype/SKILL.md +0 -89
  459. package/template/.trae/skills/high-fidelity-html-prototype/agents/openai.yaml +0 -5
  460. package/template/.trae/skills/yss-formily/agents/openai.yaml +0 -5
  461. package/template/.trae/skills/yss-formily/references/examples.md +0 -65
@@ -0,0 +1,75 @@
1
+ import { reactive, ref } from 'vue';
2
+ import { message } from 'ant-design-vue';
3
+ import type { ConditionGroup, OptionItem } from '@yss-ui/components';
4
+ import { FIELD_OPTIONS, RULE_OPERATOR_OPTIONS } from '../constant';
5
+
6
+ /** 创建空条件组。 */
7
+ const createEmptyGroup = (id: string): ConditionGroup => ({
8
+ id,
9
+ type: 'GROUP',
10
+ logicalOp: 'AND',
11
+ children: [],
12
+ });
13
+
14
+ /** 按关键词筛选条件字段。 */
15
+ const filterFields = (keyword: string): OptionItem[] => {
16
+ const normalizedKeyword = keyword.trim().toLowerCase();
17
+ if (!normalizedKeyword) return FIELD_OPTIONS;
18
+ return FIELD_OPTIONS.filter(item =>
19
+ [item.label, item.value].some(value =>
20
+ String(value ?? '')
21
+ .toLowerCase()
22
+ .includes(normalizedKeyword)
23
+ )
24
+ );
25
+ };
26
+
27
+ /** 管理条件构建器与预览状态。 */
28
+ export const useRuleConfig = () => {
29
+ const filterCondition = ref<ConditionGroup>(createEmptyGroup('filter-root'));
30
+ const checkCondition = ref<ConditionGroup>(createEmptyGroup('check-root'));
31
+ const filterPreview = ref('');
32
+ const checkPreview = ref('');
33
+ const loading = reactive({ filterPreview: false, checkPreview: false });
34
+
35
+ /** 为 YConditionBuilder 加载可搜索字段。 */
36
+ const loadFields = async (keyword: string): Promise<OptionItem[]> => filterFields(keyword);
37
+
38
+ /** 生成条件 JSON 预览。 */
39
+ const generatePreview = async (
40
+ condition: ConditionGroup,
41
+ target: 'filterPreview' | 'checkPreview'
42
+ ): Promise<void> => {
43
+ if (!condition.children.length) {
44
+ message.warning('请先配置完整条件');
45
+ return;
46
+ }
47
+
48
+ loading[target] = true;
49
+ try {
50
+ const preview = JSON.stringify(condition, null, 2);
51
+ if (target === 'filterPreview') filterPreview.value = preview;
52
+ else checkPreview.value = preview;
53
+ } finally {
54
+ loading[target] = false;
55
+ }
56
+ };
57
+
58
+ /** 生成校验范围预览。 */
59
+ const generateFilterPreview = (): Promise<void> => generatePreview(filterCondition.value, 'filterPreview');
60
+
61
+ /** 生成校验表达式预览。 */
62
+ const generateCheckPreview = (): Promise<void> => generatePreview(checkCondition.value, 'checkPreview');
63
+
64
+ return {
65
+ filterCondition,
66
+ checkCondition,
67
+ filterPreview,
68
+ checkPreview,
69
+ loading,
70
+ operatorOptions: RULE_OPERATOR_OPTIONS,
71
+ loadFields,
72
+ generateFilterPreview,
73
+ generateCheckPreview,
74
+ };
75
+ };
@@ -0,0 +1,107 @@
1
+ <script setup lang="ts">
2
+ import { computed, ref } from 'vue';
3
+ import { YButton, YCard, YConditionBuilder, YFormily } from '@yss-ui/components';
4
+ import { FORM_OPTIONS } from './constant';
5
+ import { useRuleConfig } from './hooks/useRuleConfig';
6
+ import { ruleConfigSchema } from './schemas/ruleConfigSchema';
7
+
8
+ defineOptions({ name: 'AdvancedFormPage' });
9
+
10
+ /** YFormily 校验实例。 */
11
+ interface FormilyRef {
12
+ submit: () => Promise<Record<string, unknown>>;
13
+ }
14
+
15
+ /** YConditionBuilder 校验实例。 */
16
+ interface ConditionBuilderRef {
17
+ validate: () => boolean;
18
+ }
19
+
20
+ const formData = ref<Record<string, unknown>>({
21
+ intensity: 'WEAK',
22
+ errorStorage: true,
23
+ errorStorageLimit: 1000,
24
+ errorStorageType: 'FILE_SYSTEM',
25
+ });
26
+ const schema = computed(() => ruleConfigSchema(FORM_OPTIONS));
27
+ const formRef = ref<FormilyRef>();
28
+ const filterBuilderRef = ref<ConditionBuilderRef>();
29
+ const checkBuilderRef = ref<ConditionBuilderRef>();
30
+ const {
31
+ filterCondition,
32
+ checkCondition,
33
+ filterPreview,
34
+ checkPreview,
35
+ loading,
36
+ operatorOptions,
37
+ loadFields,
38
+ generateFilterPreview,
39
+ generateCheckPreview,
40
+ } = useRuleConfig();
41
+
42
+ /** 校验表单与指定条件构建器。 */
43
+ const validateBeforeGenerate = async (builder?: ConditionBuilderRef): Promise<boolean> => {
44
+ if (!formRef.value || !builder) return false;
45
+ try {
46
+ await formRef.value.submit();
47
+ } catch {
48
+ return false;
49
+ }
50
+ return builder.validate();
51
+ };
52
+
53
+ /** 校验后生成校验范围预览。 */
54
+ const handleGenerateFilterPreview = async (): Promise<void> => {
55
+ if (await validateBeforeGenerate(filterBuilderRef.value)) await generateFilterPreview();
56
+ };
57
+
58
+ /** 校验后生成校验表达式预览。 */
59
+ const handleGenerateCheckPreview = async (): Promise<void> => {
60
+ if (await validateBeforeGenerate(checkBuilderRef.value)) await generateCheckPreview();
61
+ };
62
+ </script>
63
+
64
+ <template>
65
+ <div class="rule-config-page">
66
+ <YCard class="rule-config-page__content">
67
+ <YFormily ref="formRef" v-model="formData" :schema="schema">
68
+ <template #conditionFilter>
69
+ <YConditionBuilder
70
+ ref="filterBuilderRef"
71
+ v-model="filterCondition"
72
+ :load-fields="loadFields"
73
+ :operator-options="operatorOptions"
74
+ />
75
+ </template>
76
+ <template #filterPreview>
77
+ <div class="rule-config-page__preview">
78
+ <pre>{{ filterPreview || '配置校验范围后生成预览' }}</pre>
79
+ <YButton type="primary" :loading="loading.filterPreview" @click="handleGenerateFilterPreview">
80
+ 生成校验范围
81
+ </YButton>
82
+ </div>
83
+ </template>
84
+ <template #checkCondition>
85
+ <YConditionBuilder
86
+ ref="checkBuilderRef"
87
+ v-model="checkCondition"
88
+ :load-fields="loadFields"
89
+ :operator-options="operatorOptions"
90
+ />
91
+ </template>
92
+ <template #checkPreview>
93
+ <div class="rule-config-page__preview">
94
+ <pre>{{ checkPreview || '配置校验表达式后生成预览' }}</pre>
95
+ <YButton type="primary" :loading="loading.checkPreview" @click="handleGenerateCheckPreview">
96
+ 生成校验表达式
97
+ </YButton>
98
+ </div>
99
+ </template>
100
+ </YFormily>
101
+ </YCard>
102
+ </div>
103
+ </template>
104
+
105
+ <style scoped lang="less">
106
+ @import url('./style.less');
107
+ </style>
@@ -0,0 +1,256 @@
1
+ /**
2
+ * 规则配置表单Schema
3
+ * 包含:Grid布局、表单分组、字段联动 (Reactions)、Slot插槽
4
+ */
5
+ import type { FormOptions } from '../constant';
6
+
7
+ /**
8
+ * 规则配置Schema
9
+ * @param formOptions 表单选项数据
10
+ */
11
+ export const ruleConfigSchema = (formOptions: FormOptions): Record<string, any> => ({
12
+ type: 'object',
13
+ properties: {
14
+ layout: {
15
+ type: 'void',
16
+ 'x-component': 'FormLayout',
17
+ 'x-component-props': {
18
+ layout: 'horizontal',
19
+ labelWidth: 110, // ← 根据最长 label 确定(一般 5 个字约 100px,这里稍大)
20
+ labelAlign: 'right', // ← 必须右对齐
21
+ },
22
+ properties: {
23
+ grid: {
24
+ type: 'void',
25
+ 'x-component': 'FormGrid',
26
+ 'x-component-props': {
27
+ maxColumns: 3,
28
+ minColumns: 1,
29
+ columnGap: 16,
30
+ rowGap: 0,
31
+ },
32
+ properties: {
33
+ // -------------------------------------------------------------
34
+ // 分组1:规则配置
35
+ // -------------------------------------------------------------
36
+ ruleConfigHeader: {
37
+ type: 'void',
38
+ title: '规则配置',
39
+ 'x-decorator': 'FormItem',
40
+ 'x-decorator-props': {
41
+ feedbackLayout: 'none',
42
+ colon: false,
43
+ gridSpan: 3,
44
+ labelWidth: 0,
45
+ wrapperCol: { span: 24 },
46
+ },
47
+ 'x-component': 'GroupHeader', // 自定义组件 or 标题组件
48
+ },
49
+ intensity: {
50
+ type: 'string',
51
+ title: '规则强度',
52
+ required: true,
53
+ 'x-decorator': 'FormItem',
54
+ 'x-component': 'Radio.Group',
55
+ enum: formOptions.intensity,
56
+ },
57
+ // 开关字段,控制其他字段显示
58
+ errorStorage: {
59
+ type: 'boolean',
60
+ title: '异常存储',
61
+ required: true,
62
+ 'x-decorator': 'FormItem',
63
+ 'x-component': 'Switch',
64
+ 'x-component-props': {
65
+ checkedChildren: '开',
66
+ unCheckedChildren: '关',
67
+ },
68
+ },
69
+ // 受控字段:异常限制 (当 errorStorage=true 时显示)
70
+ errorStorageLimit: {
71
+ type: 'number',
72
+ title: '异常限制',
73
+ 'x-decorator': 'FormItem',
74
+ 'x-component': 'NumberPicker',
75
+ 'x-component-props': {
76
+ placeholder: '请输入异常限制',
77
+ style: { width: '100%' },
78
+ },
79
+ 'x-reactions': {
80
+ dependencies: ['errorStorage'],
81
+ fulfill: {
82
+ state: {
83
+ visible: '{{$deps[0]}}',
84
+ },
85
+ },
86
+ },
87
+ },
88
+
89
+ // -------------------------------------------------------------
90
+ // 分组2:异常数据存储
91
+ // 这里的 GroupHeader 本身也受 errorStorage 控制显示
92
+ // -------------------------------------------------------------
93
+ exceptionDataHeader: {
94
+ type: 'void',
95
+ title: '异常数据存储',
96
+ 'x-decorator': 'FormItem',
97
+ 'x-decorator-props': {
98
+ feedbackLayout: 'none',
99
+ colon: false,
100
+ gridSpan: 3,
101
+ labelWidth: 0,
102
+ wrapperCol: { span: 24 },
103
+ },
104
+ 'x-component': 'GroupHeader',
105
+ 'x-reactions': {
106
+ dependencies: ['errorStorage'],
107
+ fulfill: {
108
+ state: {
109
+ visible: '{{$deps[0]}}',
110
+ },
111
+ },
112
+ },
113
+ },
114
+ errorStorageType: {
115
+ type: 'string',
116
+ title: '存储方式',
117
+ required: true,
118
+ 'x-decorator': 'FormItem',
119
+ 'x-component': 'Select',
120
+ 'x-component-props': {
121
+ placeholder: '请选择存储方式',
122
+ },
123
+ enum: formOptions.errorStorageType,
124
+ 'x-reactions': {
125
+ dependencies: ['errorStorage'],
126
+ fulfill: {
127
+ state: {
128
+ visible: '{{$deps[0]}}',
129
+ },
130
+ },
131
+ },
132
+ },
133
+ errorStorageName: {
134
+ type: 'string',
135
+ title: '存储名称',
136
+ required: true,
137
+ 'x-decorator': 'FormItem',
138
+ 'x-decorator-props': {
139
+ gridSpan: 1,
140
+ },
141
+ 'x-component': 'Input',
142
+ 'x-component-props': {
143
+ placeholder: '请选择异常数据存储名称',
144
+ },
145
+ 'x-reactions': {
146
+ dependencies: ['errorStorage'],
147
+ fulfill: {
148
+ state: {
149
+ visible: '{{$deps[0]}}',
150
+ },
151
+ },
152
+ },
153
+ },
154
+ errorStoragePath: {
155
+ type: 'string',
156
+ title: '存储地址',
157
+ 'x-decorator': 'FormItem',
158
+ 'x-decorator-props': {
159
+ gridSpan: 1,
160
+ },
161
+ 'x-component': 'Input',
162
+ 'x-component-props': {
163
+ placeholder: '请输入异常数据存储地址',
164
+ },
165
+ // 也可以配置 reactions
166
+ },
167
+
168
+ // -------------------------------------------------------------
169
+ // 分组3:校验规则 (使用 Slot 自定义渲染)
170
+ // -------------------------------------------------------------
171
+ filterHeader: {
172
+ type: 'void',
173
+ title: '校验规则',
174
+ 'x-decorator': 'FormItem',
175
+ 'x-decorator-props': {
176
+ feedbackLayout: 'none',
177
+ colon: false,
178
+ gridSpan: 3,
179
+ labelWidth: 0,
180
+ wrapperCol: { span: 24 },
181
+ },
182
+ 'x-component': 'GroupHeader',
183
+ },
184
+ // Slot:校验范围构建器
185
+ conditionFilter: {
186
+ type: 'object',
187
+ title: '校验范围',
188
+ 'x-decorator': 'FormItem',
189
+ 'x-decorator-props': {
190
+ gridSpan: 3, // 占满一行
191
+ },
192
+ 'x-component': 'Slot', // 关键:使用 Slot 组件
193
+ 'x-component-props': {
194
+ name: 'conditionFilter', // 对应 <template #conditionFilter>
195
+ },
196
+ },
197
+ // Slot:条件结构预览
198
+ filterPreview: {
199
+ type: 'string',
200
+ title: '预览',
201
+ 'x-decorator': 'FormItem',
202
+ 'x-decorator-props': {
203
+ gridSpan: 3,
204
+ },
205
+ 'x-component': 'Slot',
206
+ 'x-component-props': {
207
+ name: 'filterPreview',
208
+ },
209
+ },
210
+
211
+ // -------------------------------------------------------------
212
+ // 分组4:校验设置
213
+ // -------------------------------------------------------------
214
+ checkHeader: {
215
+ type: 'void',
216
+ title: '校验设置',
217
+ 'x-decorator': 'FormItem',
218
+ 'x-decorator-props': {
219
+ feedbackLayout: 'none',
220
+ colon: false,
221
+ gridSpan: 3,
222
+ labelWidth: 0,
223
+ wrapperCol: { span: 24 },
224
+ },
225
+ 'x-component': 'GroupHeader',
226
+ },
227
+ checkCondition: {
228
+ type: 'object',
229
+ title: '校验配置',
230
+ 'x-decorator': 'FormItem',
231
+ 'x-decorator-props': {
232
+ gridSpan: 3,
233
+ },
234
+ 'x-component': 'Slot',
235
+ 'x-component-props': {
236
+ name: 'checkCondition',
237
+ },
238
+ },
239
+ checkPreview: {
240
+ type: 'string',
241
+ title: '预览',
242
+ 'x-decorator': 'FormItem',
243
+ 'x-decorator-props': {
244
+ gridSpan: 3,
245
+ },
246
+ 'x-component': 'Slot',
247
+ 'x-component-props': {
248
+ name: 'checkPreview',
249
+ },
250
+ },
251
+ },
252
+ },
253
+ },
254
+ },
255
+ },
256
+ });
@@ -0,0 +1,30 @@
1
+ .rule-config-page {
2
+ width: 100%;
3
+ height: 100%;
4
+
5
+ &__content {
6
+ height: 100%;
7
+ overflow: auto;
8
+ }
9
+
10
+ &__preview {
11
+ display: flex;
12
+ align-items: flex-start;
13
+ gap: 12px;
14
+
15
+ pre {
16
+ flex: 1;
17
+ min-height: 72px;
18
+ max-height: 220px;
19
+ margin: 0;
20
+ padding: 12px;
21
+ overflow: auto;
22
+ color: var(--text-color, rgb(0 0 0 / 88%));
23
+ background: var(--bg-color, #f0f2f5);
24
+ border: 1px solid var(--border-color-split, #f0f0f0);
25
+ border-radius: 6px;
26
+ white-space: pre-wrap;
27
+ word-break: break-word;
28
+ }
29
+ }
30
+ }
@@ -0,0 +1,28 @@
1
+ import type { YTableColumn } from '@yss-ui/components';
2
+ import type { QualityBusinessRuleVO } from '@/api/generated/quality/schemas';
3
+
4
+ /** 质量规则列表行数据。 */
5
+ export type QualityRuleItem = QualityBusinessRuleVO;
6
+
7
+ /** 质量规则查询表单。 */
8
+ export interface SearchFormData {
9
+ ruleName: string;
10
+ }
11
+
12
+ /** 状态文案映射。 */
13
+ export const STATUS_LABELS: Record<number, string> = {
14
+ 0: '禁用',
15
+ 1: '启用',
16
+ };
17
+
18
+ /** 质量规则表格列。 */
19
+ export const TABLE_COLUMNS: YTableColumn[] = [
20
+ { field: 'ruleName', title: '质量规则名称', minWidth: 180, slots: { default: 'ruleName' } },
21
+ { field: 'ruleCode', title: '规则编码', minWidth: 160 },
22
+ {
23
+ field: 'status',
24
+ title: '状态',
25
+ width: 100,
26
+ formatter: ({ cellValue }: { cellValue?: number }) => STATUS_LABELS[cellValue ?? -1] ?? '-',
27
+ },
28
+ ];
@@ -0,0 +1,58 @@
1
+ import { reactive, ref } from 'vue';
2
+ import { getApiApi } from '@/api/generated/quality';
3
+ import type { QualityRulePage } from '@/api/generated/quality/schemas';
4
+ import type { QualityRuleItem, SearchFormData } from '../constant';
5
+
6
+ const { pageQualityRule } = getApiApi();
7
+
8
+ /** 管理质量规则列表、查询和远程分页。 */
9
+ export const useQualityRuleList = () => {
10
+ const tableData = ref<QualityRuleItem[]>([]);
11
+ const loading = ref(false);
12
+ const pagination = reactive({ current: 1, pageSize: 20, total: 0, remote: true });
13
+ const searchForm = reactive<SearchFormData>({ ruleName: '' });
14
+
15
+ /** 组装 Orval 查询 DTO。 */
16
+ const getQueryParams = (): QualityRulePage => ({
17
+ pageIndex: pagination.current,
18
+ pageSize: pagination.pageSize,
19
+ ruleName: searchForm.ruleName || undefined,
20
+ });
21
+
22
+ /** 加载列表;错误提示由 mutator 统一处理。 */
23
+ const fetchList = async (): Promise<void> => {
24
+ loading.value = true;
25
+ try {
26
+ const res = await pageQualityRule(getQueryParams());
27
+ tableData.value = res.data ?? [];
28
+ pagination.total = res.totalCount ?? 0;
29
+ } catch {
30
+ tableData.value = [];
31
+ pagination.total = 0;
32
+ } finally {
33
+ loading.value = false;
34
+ }
35
+ };
36
+
37
+ /** 处理分页变化。 */
38
+ const handlePageChange = ({ current, pageSize }: { current: number; pageSize: number }): void => {
39
+ pagination.current = current;
40
+ pagination.pageSize = pageSize;
41
+ void fetchList();
42
+ };
43
+
44
+ /** 从第一页执行查询。 */
45
+ const handleSearch = (): void => {
46
+ pagination.current = 1;
47
+ void fetchList();
48
+ };
49
+
50
+ /** 重置查询条件并刷新。 */
51
+ const handleReset = (): void => {
52
+ searchForm.ruleName = '';
53
+ pagination.current = 1;
54
+ void fetchList();
55
+ };
56
+
57
+ return { tableData, loading, pagination, searchForm, fetchList, handlePageChange, handleSearch, handleReset };
58
+ };
@@ -0,0 +1,65 @@
1
+ import { computed } from 'vue';
2
+ import { message } from 'ant-design-vue';
3
+ import type { YTableActionConfig } from '@yss-ui/components';
4
+ import { getApiApi } from '@/api/generated/quality';
5
+ import type { QualityRuleItem } from '../constant';
6
+
7
+ const { deleteQualityRule } = getApiApi();
8
+
9
+ /** 行操作与页面容器的通信回调。 */
10
+ export interface RuleActionCallbacks {
11
+ refreshList: () => Promise<void>;
12
+ onCreate: () => void;
13
+ onEdit: (row: QualityRuleItem) => void;
14
+ onView: (row: QualityRuleItem) => void;
15
+ }
16
+
17
+ /** YTable 气泡确认助手。 */
18
+ interface ActionHelpers {
19
+ close: () => void;
20
+ hideLoading: () => void;
21
+ }
22
+
23
+ /** 管理质量规则行操作和 YTable 操作列配置。 */
24
+ export const useRuleActions = (callbacks: RuleActionCallbacks) => {
25
+ /** 删除规则并刷新列表。 */
26
+ const handleDelete = async (row: QualityRuleItem): Promise<void> => {
27
+ if (!row.id) return;
28
+
29
+ try {
30
+ await deleteQualityRule(row.id);
31
+ message.success('删除成功');
32
+ await callbacks.refreshList();
33
+ } catch {
34
+ // mutator 已展示错误,此处不重复 message.error。
35
+ }
36
+ };
37
+
38
+ /** 标准操作列:查看/编辑立即执行,删除使用气泡确认。 */
39
+ const actionConfig = computed<YTableActionConfig>(() => ({
40
+ title: '操作',
41
+ width: 180,
42
+ fixed: 'right',
43
+ buttons: [
44
+ { label: '查看', value: 'view', click: ({ row }) => callbacks.onView(row) },
45
+ { label: '编辑', value: 'edit', click: ({ row }) => callbacks.onEdit(row) },
46
+ {
47
+ label: '删除',
48
+ value: 'delete',
49
+ type: 'link',
50
+ isConfirm: true,
51
+ confirmProps: { title: '确认删除此规则吗?删除后无法恢复', needLoading: true },
52
+ click: async ({ row }, _button, helpers: ActionHelpers) => {
53
+ try {
54
+ await handleDelete(row);
55
+ } finally {
56
+ helpers.hideLoading();
57
+ helpers.close();
58
+ }
59
+ },
60
+ },
61
+ ],
62
+ }));
63
+
64
+ return { actionConfig, handleCreate: callbacks.onCreate };
65
+ };