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.
- package/README.md +1 -1
- package/package.json +1 -1
- package/template/.agents/rules/yss-ai-skills.md +59 -0
- package/template/.agents/skills/.yss-skills-manifest.json +28 -0
- package/template/.agents/skills/component-selection-imports/SKILL.md +64 -0
- package/template/.agents/skills/file-export-download/SKILL.md +160 -0
- package/template/.agents/skills/file-export-download/agents/openai.yaml +4 -0
- package/template/.agents/skills/formily-foundation/SKILL.md +176 -0
- package/template/.agents/skills/formily-foundation/references/examples.md +486 -0
- package/template/.agents/skills/formily-linkage-effects/SKILL.md +167 -0
- package/template/.agents/skills/formily-mode-slot-detail/SKILL.md +137 -0
- package/template/.agents/skills/formily-step-flow/SKILL.md +194 -0
- package/template/.agents/skills/frontend-commit/SKILL.md +118 -0
- package/template/.agents/skills/frontend-commit/agents/openai.yaml +7 -0
- package/template/.agents/skills/frontend-commit/references/scope-and-examples.md +111 -0
- package/template/.agents/skills/java-backend-commit/SKILL.md +121 -0
- package/template/.agents/skills/java-backend-commit/agents/openai.yaml +7 -0
- package/template/.agents/skills/java-backend-commit/references/scope-and-examples.md +118 -0
- package/template/.agents/skills/page-form-module/SKILL.md +168 -0
- package/template/.agents/skills/page-list-module/SKILL.md +137 -0
- package/template/.agents/skills/page-skeleton/SKILL.md +76 -0
- package/template/.agents/skills/page-skeleton/examples/AdvancedFormPage/constant.ts +34 -0
- package/template/.agents/skills/page-skeleton/examples/AdvancedFormPage/hooks/useRuleConfig.ts +75 -0
- package/template/.agents/skills/page-skeleton/examples/AdvancedFormPage/index.vue +107 -0
- package/template/.agents/skills/page-skeleton/examples/AdvancedFormPage/schemas/ruleConfigSchema.ts +256 -0
- package/template/.agents/skills/page-skeleton/examples/AdvancedFormPage/style.less +30 -0
- package/template/.agents/skills/page-skeleton/examples/StandardListPage/constant.ts +28 -0
- package/template/.agents/skills/page-skeleton/examples/StandardListPage/hooks/useQualityRuleList.ts +58 -0
- package/template/.agents/skills/page-skeleton/examples/StandardListPage/hooks/useRuleActions.ts +65 -0
- package/template/.agents/skills/page-skeleton/examples/StandardListPage/index.vue +91 -0
- package/template/.agents/skills/page-skeleton/examples/StandardListPage/style.less +49 -0
- package/template/.agents/skills/prototype-page-acceptance/SKILL.md +62 -0
- package/template/.agents/skills/theme-token-usage/SKILL.md +123 -0
- package/template/.agents/skills/theme-token-usage/agents/openai.yaml +4 -0
- package/template/.agents/skills/vue3-best-practices/SKILL.md +68 -0
- package/template/.agents/skills/yedit-table-usage/SKILL.md +227 -0
- package/template/.agents/skills/yss-api-integration/SKILL.md +12 -2
- package/template/.agents/skills/yss-components/SKILL.md +1 -1
- package/template/.agents/skills/yss-design-system/SKILL.md +1 -1
- package/template/.agents/skills/yss-formily/SKILL.md +233 -265
- package/template/.agents/skills/yss-frontend-scaffold-generator/SKILL.md +1 -1
- package/template/.agents/skills/yss-hook/SKILL.md +1 -1
- package/template/.agents/skills/yss-openapi-governance/SKILL.md +2 -2
- package/template/.agents/skills/yss-page-module-development/SKILL.md +12 -2
- package/template/.agents/skills/yss-page-module-development/references/component-map.md +34 -0
- package/template/.agents/skills/yss-page-module-development/references/hooks-map.md +11 -0
- package/template/.agents/skills/yss-page-module-development/references/utils-map.md +14 -0
- package/template/.agents/skills/yss-product-lifecycle/references/orchestration-contract.yaml +62 -1
- package/template/.agents/skills/yss-router/references/boundaries.md +1 -1
- package/template/.agents/skills/yss-router/references/router-contract.yaml +6 -2
- package/template/.agents/skills/yss-ui/SKILL.md +1 -1
- package/template/.agents/skills/yss-use-table-height/SKILL.md +9 -0
- package/template/.agents/skills/yss-use-tree-height/SKILL.md +9 -0
- package/template/.agents/skills/ytable-usage/SKILL.md +251 -0
- package/template/.agents/skills/ytree-usage/SKILL.md +132 -0
- package/template/.claude/skills/.yss-skills-manifest.json +29 -0
- package/template/.claude/skills/component-selection-imports/SKILL.md +64 -0
- package/template/.claude/skills/file-export-download/SKILL.md +160 -0
- package/template/.claude/skills/file-export-download/agents/openai.yaml +4 -0
- package/template/.claude/skills/formily-foundation/SKILL.md +176 -0
- package/template/.claude/skills/formily-foundation/references/examples.md +486 -0
- package/template/.claude/skills/formily-linkage-effects/SKILL.md +167 -0
- package/template/.claude/skills/formily-mode-slot-detail/SKILL.md +137 -0
- package/template/.claude/skills/formily-step-flow/SKILL.md +194 -0
- package/template/.claude/skills/frontend-commit/SKILL.md +118 -0
- package/template/.claude/skills/frontend-commit/agents/openai.yaml +7 -0
- package/template/.claude/skills/frontend-commit/references/scope-and-examples.md +111 -0
- package/template/.claude/skills/java-backend-commit/SKILL.md +121 -0
- package/template/.claude/skills/java-backend-commit/agents/openai.yaml +7 -0
- package/template/.claude/skills/java-backend-commit/references/scope-and-examples.md +118 -0
- package/template/.claude/skills/page-form-module/SKILL.md +168 -0
- package/template/.claude/skills/page-list-module/SKILL.md +137 -0
- package/template/.claude/skills/page-skeleton/SKILL.md +76 -0
- package/template/.claude/skills/page-skeleton/examples/AdvancedFormPage/constant.ts +34 -0
- package/template/.claude/skills/page-skeleton/examples/AdvancedFormPage/hooks/useRuleConfig.ts +75 -0
- package/template/.claude/skills/page-skeleton/examples/AdvancedFormPage/index.vue +107 -0
- package/template/.claude/skills/page-skeleton/examples/AdvancedFormPage/schemas/ruleConfigSchema.ts +256 -0
- package/template/.claude/skills/page-skeleton/examples/AdvancedFormPage/style.less +30 -0
- package/template/.claude/skills/page-skeleton/examples/StandardListPage/constant.ts +28 -0
- package/template/.claude/skills/page-skeleton/examples/StandardListPage/hooks/useQualityRuleList.ts +58 -0
- package/template/.claude/skills/page-skeleton/examples/StandardListPage/hooks/useRuleActions.ts +65 -0
- package/template/.claude/skills/page-skeleton/examples/StandardListPage/index.vue +91 -0
- package/template/.claude/skills/page-skeleton/examples/StandardListPage/style.less +49 -0
- package/template/.claude/skills/prototype-page-acceptance/SKILL.md +62 -0
- package/template/.claude/skills/theme-token-usage/SKILL.md +123 -0
- package/template/.claude/skills/theme-token-usage/agents/openai.yaml +4 -0
- package/template/.claude/skills/vue3-best-practices/SKILL.md +68 -0
- package/template/.claude/skills/yedit-table-usage/SKILL.md +227 -0
- package/template/.claude/skills/yss-api-integration/SKILL.md +12 -2
- package/template/.claude/skills/yss-components/SKILL.md +1 -1
- package/template/.claude/skills/yss-design-system/SKILL.md +1 -1
- package/template/.claude/skills/yss-formily/SKILL.md +233 -265
- package/template/.claude/skills/yss-frontend-scaffold-generator/SKILL.md +1 -1
- package/template/.claude/skills/yss-hook/SKILL.md +1 -1
- package/template/.claude/skills/yss-openapi-governance/SKILL.md +2 -2
- package/template/.claude/skills/yss-page-module-development/SKILL.md +12 -2
- package/template/.claude/skills/yss-page-module-development/references/component-map.md +34 -0
- package/template/.claude/skills/yss-page-module-development/references/hooks-map.md +11 -0
- package/template/.claude/skills/yss-page-module-development/references/utils-map.md +14 -0
- package/template/.claude/skills/yss-product-lifecycle/references/orchestration-contract.yaml +62 -1
- package/template/.claude/skills/yss-router/references/boundaries.md +1 -1
- package/template/.claude/skills/yss-router/references/router-contract.yaml +6 -2
- package/template/.claude/skills/yss-ui/SKILL.md +1 -1
- package/template/.claude/skills/yss-use-table-height/SKILL.md +9 -0
- package/template/.claude/skills/yss-use-tree-height/SKILL.md +9 -0
- package/template/.claude/skills/ytable-usage/SKILL.md +251 -0
- package/template/.claude/skills/ytree-usage/SKILL.md +132 -0
- package/template/.codex/skills/component-selection-imports/SKILL.md +64 -0
- package/template/.codex/skills/file-export-download/SKILL.md +160 -0
- package/template/.codex/skills/file-export-download/agents/openai.yaml +4 -0
- package/template/.codex/skills/formily-foundation/SKILL.md +176 -0
- package/template/.codex/skills/formily-foundation/references/examples.md +486 -0
- package/template/.codex/skills/formily-linkage-effects/SKILL.md +167 -0
- package/template/.codex/skills/formily-mode-slot-detail/SKILL.md +137 -0
- package/template/.codex/skills/formily-step-flow/SKILL.md +194 -0
- package/template/.codex/skills/frontend-commit/SKILL.md +118 -0
- package/template/.codex/skills/frontend-commit/agents/openai.yaml +7 -0
- package/template/.codex/skills/frontend-commit/references/scope-and-examples.md +111 -0
- package/template/.codex/skills/java-backend-commit/SKILL.md +121 -0
- package/template/.codex/skills/java-backend-commit/agents/openai.yaml +7 -0
- package/template/.codex/skills/java-backend-commit/references/scope-and-examples.md +118 -0
- package/template/.codex/skills/page-form-module/SKILL.md +168 -0
- package/template/.codex/skills/page-list-module/SKILL.md +137 -0
- package/template/.codex/skills/page-skeleton/SKILL.md +76 -0
- package/template/.codex/skills/page-skeleton/examples/AdvancedFormPage/constant.ts +34 -0
- package/template/.codex/skills/page-skeleton/examples/AdvancedFormPage/hooks/useRuleConfig.ts +75 -0
- package/template/.codex/skills/page-skeleton/examples/AdvancedFormPage/index.vue +107 -0
- package/template/.codex/skills/page-skeleton/examples/AdvancedFormPage/schemas/ruleConfigSchema.ts +256 -0
- package/template/.codex/skills/page-skeleton/examples/AdvancedFormPage/style.less +30 -0
- package/template/.codex/skills/page-skeleton/examples/StandardListPage/constant.ts +28 -0
- package/template/.codex/skills/page-skeleton/examples/StandardListPage/hooks/useQualityRuleList.ts +58 -0
- package/template/.codex/skills/page-skeleton/examples/StandardListPage/hooks/useRuleActions.ts +65 -0
- package/template/.codex/skills/page-skeleton/examples/StandardListPage/index.vue +91 -0
- package/template/.codex/skills/page-skeleton/examples/StandardListPage/style.less +49 -0
- package/template/.codex/skills/prototype-page-acceptance/SKILL.md +62 -0
- package/template/.codex/skills/theme-token-usage/SKILL.md +123 -0
- package/template/.codex/skills/theme-token-usage/agents/openai.yaml +4 -0
- package/template/.codex/skills/vue3-best-practices/SKILL.md +68 -0
- package/template/.codex/skills/yedit-table-usage/SKILL.md +227 -0
- package/template/.codex/skills/yss-api-integration/SKILL.md +12 -2
- package/template/.codex/skills/yss-components/SKILL.md +1 -1
- package/template/.codex/skills/yss-design-system/SKILL.md +1 -1
- package/template/.codex/skills/yss-formily/SKILL.md +233 -265
- package/template/.codex/skills/yss-frontend-scaffold-generator/SKILL.md +1 -1
- package/template/.codex/skills/yss-hook/SKILL.md +1 -1
- package/template/.codex/skills/yss-openapi-governance/SKILL.md +2 -2
- package/template/.codex/skills/yss-page-module-development/SKILL.md +12 -2
- package/template/.codex/skills/yss-page-module-development/references/component-map.md +34 -0
- package/template/.codex/skills/yss-page-module-development/references/hooks-map.md +11 -0
- package/template/.codex/skills/yss-page-module-development/references/utils-map.md +14 -0
- package/template/.codex/skills/yss-product-lifecycle/references/orchestration-contract.yaml +62 -1
- package/template/.codex/skills/yss-router/references/boundaries.md +1 -1
- package/template/.codex/skills/yss-router/references/router-contract.yaml +6 -2
- package/template/.codex/skills/yss-ui/SKILL.md +1 -1
- package/template/.codex/skills/yss-use-table-height/SKILL.md +9 -0
- package/template/.codex/skills/yss-use-tree-height/SKILL.md +9 -0
- package/template/.codex/skills/ytable-usage/SKILL.md +251 -0
- package/template/.codex/skills/ytree-usage/SKILL.md +132 -0
- package/template/.cursor/skills/.yss-skills-manifest.json +29 -0
- package/template/.cursor/skills/component-selection-imports/SKILL.md +64 -0
- package/template/.cursor/skills/file-export-download/SKILL.md +160 -0
- package/template/.cursor/skills/file-export-download/agents/openai.yaml +4 -0
- package/template/.cursor/skills/formily-foundation/SKILL.md +176 -0
- package/template/.cursor/skills/formily-foundation/references/examples.md +486 -0
- package/template/.cursor/skills/formily-linkage-effects/SKILL.md +167 -0
- package/template/.cursor/skills/formily-mode-slot-detail/SKILL.md +137 -0
- package/template/.cursor/skills/formily-step-flow/SKILL.md +194 -0
- package/template/.cursor/skills/frontend-commit/SKILL.md +118 -0
- package/template/.cursor/skills/frontend-commit/agents/openai.yaml +7 -0
- package/template/.cursor/skills/frontend-commit/references/scope-and-examples.md +111 -0
- package/template/.cursor/skills/java-backend-commit/SKILL.md +121 -0
- package/template/.cursor/skills/java-backend-commit/agents/openai.yaml +7 -0
- package/template/.cursor/skills/java-backend-commit/references/scope-and-examples.md +118 -0
- package/template/.cursor/skills/page-form-module/SKILL.md +168 -0
- package/template/.cursor/skills/page-list-module/SKILL.md +137 -0
- package/template/.cursor/skills/page-skeleton/SKILL.md +76 -0
- package/template/.cursor/skills/page-skeleton/examples/AdvancedFormPage/constant.ts +34 -0
- package/template/.cursor/skills/page-skeleton/examples/AdvancedFormPage/hooks/useRuleConfig.ts +75 -0
- package/template/.cursor/skills/page-skeleton/examples/AdvancedFormPage/index.vue +107 -0
- package/template/.cursor/skills/page-skeleton/examples/AdvancedFormPage/schemas/ruleConfigSchema.ts +256 -0
- package/template/.cursor/skills/page-skeleton/examples/AdvancedFormPage/style.less +30 -0
- package/template/.cursor/skills/page-skeleton/examples/StandardListPage/constant.ts +28 -0
- package/template/.cursor/skills/page-skeleton/examples/StandardListPage/hooks/useQualityRuleList.ts +58 -0
- package/template/.cursor/skills/page-skeleton/examples/StandardListPage/hooks/useRuleActions.ts +65 -0
- package/template/.cursor/skills/page-skeleton/examples/StandardListPage/index.vue +91 -0
- package/template/.cursor/skills/page-skeleton/examples/StandardListPage/style.less +49 -0
- package/template/.cursor/skills/prototype-page-acceptance/SKILL.md +62 -0
- package/template/.cursor/skills/theme-token-usage/SKILL.md +123 -0
- package/template/.cursor/skills/theme-token-usage/agents/openai.yaml +4 -0
- package/template/.cursor/skills/vue3-best-practices/SKILL.md +68 -0
- package/template/.cursor/skills/yedit-table-usage/SKILL.md +227 -0
- package/template/.cursor/skills/yss-api-integration/SKILL.md +12 -2
- package/template/.cursor/skills/yss-components/SKILL.md +1 -1
- package/template/.cursor/skills/yss-design-system/SKILL.md +1 -1
- package/template/.cursor/skills/yss-formily/SKILL.md +233 -265
- package/template/.cursor/skills/yss-frontend-scaffold-generator/SKILL.md +1 -1
- package/template/.cursor/skills/yss-hook/SKILL.md +1 -1
- package/template/.cursor/skills/yss-openapi-governance/SKILL.md +2 -2
- package/template/.cursor/skills/yss-page-module-development/SKILL.md +12 -2
- package/template/.cursor/skills/yss-page-module-development/references/component-map.md +34 -0
- package/template/.cursor/skills/yss-page-module-development/references/hooks-map.md +11 -0
- package/template/.cursor/skills/yss-page-module-development/references/utils-map.md +14 -0
- package/template/.cursor/skills/yss-product-lifecycle/references/orchestration-contract.yaml +62 -1
- package/template/.cursor/skills/yss-router/references/boundaries.md +1 -1
- package/template/.cursor/skills/yss-router/references/router-contract.yaml +6 -2
- package/template/.cursor/skills/yss-ui/SKILL.md +1 -1
- package/template/.cursor/skills/yss-use-table-height/SKILL.md +9 -0
- package/template/.cursor/skills/yss-use-tree-height/SKILL.md +9 -0
- package/template/.cursor/skills/ytable-usage/SKILL.md +251 -0
- package/template/.cursor/skills/ytree-usage/SKILL.md +132 -0
- package/template/.cursorrules +32 -0
- package/template/.hermes/skills/component-selection-imports/SKILL.md +64 -0
- package/template/.hermes/skills/file-export-download/SKILL.md +160 -0
- package/template/.hermes/skills/file-export-download/agents/openai.yaml +4 -0
- package/template/.hermes/skills/formily-foundation/SKILL.md +176 -0
- package/template/.hermes/skills/formily-foundation/references/examples.md +486 -0
- package/template/.hermes/skills/formily-linkage-effects/SKILL.md +167 -0
- package/template/.hermes/skills/formily-mode-slot-detail/SKILL.md +137 -0
- package/template/.hermes/skills/formily-step-flow/SKILL.md +194 -0
- package/template/.hermes/skills/frontend-commit/SKILL.md +118 -0
- package/template/.hermes/skills/frontend-commit/agents/openai.yaml +7 -0
- package/template/.hermes/skills/frontend-commit/references/scope-and-examples.md +111 -0
- package/template/.hermes/skills/java-backend-commit/SKILL.md +121 -0
- package/template/.hermes/skills/java-backend-commit/agents/openai.yaml +7 -0
- package/template/.hermes/skills/java-backend-commit/references/scope-and-examples.md +118 -0
- package/template/.hermes/skills/page-form-module/SKILL.md +168 -0
- package/template/.hermes/skills/page-list-module/SKILL.md +137 -0
- package/template/.hermes/skills/page-skeleton/SKILL.md +76 -0
- package/template/.hermes/skills/page-skeleton/examples/AdvancedFormPage/constant.ts +34 -0
- package/template/.hermes/skills/page-skeleton/examples/AdvancedFormPage/hooks/useRuleConfig.ts +75 -0
- package/template/.hermes/skills/page-skeleton/examples/AdvancedFormPage/index.vue +107 -0
- package/template/.hermes/skills/page-skeleton/examples/AdvancedFormPage/schemas/ruleConfigSchema.ts +256 -0
- package/template/.hermes/skills/page-skeleton/examples/AdvancedFormPage/style.less +30 -0
- package/template/.hermes/skills/page-skeleton/examples/StandardListPage/constant.ts +28 -0
- package/template/.hermes/skills/page-skeleton/examples/StandardListPage/hooks/useQualityRuleList.ts +58 -0
- package/template/.hermes/skills/page-skeleton/examples/StandardListPage/hooks/useRuleActions.ts +65 -0
- package/template/.hermes/skills/page-skeleton/examples/StandardListPage/index.vue +91 -0
- package/template/.hermes/skills/page-skeleton/examples/StandardListPage/style.less +49 -0
- package/template/.hermes/skills/prototype-page-acceptance/SKILL.md +62 -0
- package/template/.hermes/skills/theme-token-usage/SKILL.md +123 -0
- package/template/.hermes/skills/theme-token-usage/agents/openai.yaml +4 -0
- package/template/.hermes/skills/vue3-best-practices/SKILL.md +68 -0
- package/template/.hermes/skills/yedit-table-usage/SKILL.md +227 -0
- package/template/.hermes/skills/yss-api-integration/SKILL.md +12 -2
- package/template/.hermes/skills/yss-components/SKILL.md +1 -1
- package/template/.hermes/skills/yss-design-system/SKILL.md +1 -1
- package/template/.hermes/skills/yss-formily/SKILL.md +233 -265
- package/template/.hermes/skills/yss-frontend-scaffold-generator/SKILL.md +1 -1
- package/template/.hermes/skills/yss-hook/SKILL.md +1 -1
- package/template/.hermes/skills/yss-openapi-governance/SKILL.md +2 -2
- package/template/.hermes/skills/yss-page-module-development/SKILL.md +12 -2
- package/template/.hermes/skills/yss-page-module-development/references/component-map.md +34 -0
- package/template/.hermes/skills/yss-page-module-development/references/hooks-map.md +11 -0
- package/template/.hermes/skills/yss-page-module-development/references/utils-map.md +14 -0
- package/template/.hermes/skills/yss-product-lifecycle/references/orchestration-contract.yaml +62 -1
- package/template/.hermes/skills/yss-router/references/boundaries.md +1 -1
- package/template/.hermes/skills/yss-router/references/router-contract.yaml +6 -2
- package/template/.hermes/skills/yss-ui/SKILL.md +1 -1
- package/template/.hermes/skills/yss-use-table-height/SKILL.md +9 -0
- package/template/.hermes/skills/yss-use-tree-height/SKILL.md +9 -0
- package/template/.hermes/skills/ytable-usage/SKILL.md +251 -0
- package/template/.hermes/skills/ytree-usage/SKILL.md +132 -0
- package/template/.pi/skills/component-selection-imports/SKILL.md +64 -0
- package/template/.pi/skills/file-export-download/SKILL.md +160 -0
- package/template/.pi/skills/file-export-download/agents/openai.yaml +4 -0
- package/template/.pi/skills/formily-foundation/SKILL.md +176 -0
- package/template/.pi/skills/formily-foundation/references/examples.md +486 -0
- package/template/.pi/skills/formily-linkage-effects/SKILL.md +167 -0
- package/template/.pi/skills/formily-mode-slot-detail/SKILL.md +137 -0
- package/template/.pi/skills/formily-step-flow/SKILL.md +194 -0
- package/template/.pi/skills/frontend-commit/SKILL.md +118 -0
- package/template/.pi/skills/frontend-commit/agents/openai.yaml +7 -0
- package/template/.pi/skills/frontend-commit/references/scope-and-examples.md +111 -0
- package/template/.pi/skills/java-backend-commit/SKILL.md +121 -0
- package/template/.pi/skills/java-backend-commit/agents/openai.yaml +7 -0
- package/template/.pi/skills/java-backend-commit/references/scope-and-examples.md +118 -0
- package/template/.pi/skills/page-form-module/SKILL.md +168 -0
- package/template/.pi/skills/page-list-module/SKILL.md +137 -0
- package/template/.pi/skills/page-skeleton/SKILL.md +76 -0
- package/template/.pi/skills/page-skeleton/examples/AdvancedFormPage/constant.ts +34 -0
- package/template/.pi/skills/page-skeleton/examples/AdvancedFormPage/hooks/useRuleConfig.ts +75 -0
- package/template/.pi/skills/page-skeleton/examples/AdvancedFormPage/index.vue +107 -0
- package/template/.pi/skills/page-skeleton/examples/AdvancedFormPage/schemas/ruleConfigSchema.ts +256 -0
- package/template/.pi/skills/page-skeleton/examples/AdvancedFormPage/style.less +30 -0
- package/template/.pi/skills/page-skeleton/examples/StandardListPage/constant.ts +28 -0
- package/template/.pi/skills/page-skeleton/examples/StandardListPage/hooks/useQualityRuleList.ts +58 -0
- package/template/.pi/skills/page-skeleton/examples/StandardListPage/hooks/useRuleActions.ts +65 -0
- package/template/.pi/skills/page-skeleton/examples/StandardListPage/index.vue +91 -0
- package/template/.pi/skills/page-skeleton/examples/StandardListPage/style.less +49 -0
- package/template/.pi/skills/prototype-page-acceptance/SKILL.md +62 -0
- package/template/.pi/skills/theme-token-usage/SKILL.md +123 -0
- package/template/.pi/skills/theme-token-usage/agents/openai.yaml +4 -0
- package/template/.pi/skills/vue3-best-practices/SKILL.md +68 -0
- package/template/.pi/skills/yedit-table-usage/SKILL.md +227 -0
- package/template/.pi/skills/yss-api-integration/SKILL.md +12 -2
- package/template/.pi/skills/yss-components/SKILL.md +1 -1
- package/template/.pi/skills/yss-design-system/SKILL.md +1 -1
- package/template/.pi/skills/yss-formily/SKILL.md +233 -265
- package/template/.pi/skills/yss-frontend-scaffold-generator/SKILL.md +1 -1
- package/template/.pi/skills/yss-hook/SKILL.md +1 -1
- package/template/.pi/skills/yss-openapi-governance/SKILL.md +2 -2
- package/template/.pi/skills/yss-page-module-development/SKILL.md +12 -2
- package/template/.pi/skills/yss-page-module-development/references/component-map.md +34 -0
- package/template/.pi/skills/yss-page-module-development/references/hooks-map.md +11 -0
- package/template/.pi/skills/yss-page-module-development/references/utils-map.md +14 -0
- package/template/.pi/skills/yss-product-lifecycle/references/orchestration-contract.yaml +62 -1
- package/template/.pi/skills/yss-router/references/boundaries.md +1 -1
- package/template/.pi/skills/yss-router/references/router-contract.yaml +6 -2
- package/template/.pi/skills/yss-ui/SKILL.md +1 -1
- package/template/.pi/skills/yss-use-table-height/SKILL.md +9 -0
- package/template/.pi/skills/yss-use-tree-height/SKILL.md +9 -0
- package/template/.pi/skills/ytable-usage/SKILL.md +251 -0
- package/template/.pi/skills/ytree-usage/SKILL.md +132 -0
- package/template/.qoder/skills/component-selection-imports/SKILL.md +64 -0
- package/template/.qoder/skills/file-export-download/SKILL.md +160 -0
- package/template/.qoder/skills/file-export-download/agents/openai.yaml +4 -0
- package/template/.qoder/skills/formily-foundation/SKILL.md +176 -0
- package/template/.qoder/skills/formily-foundation/references/examples.md +486 -0
- package/template/.qoder/skills/formily-linkage-effects/SKILL.md +167 -0
- package/template/.qoder/skills/formily-mode-slot-detail/SKILL.md +137 -0
- package/template/.qoder/skills/formily-step-flow/SKILL.md +194 -0
- package/template/.qoder/skills/frontend-commit/SKILL.md +118 -0
- package/template/.qoder/skills/frontend-commit/agents/openai.yaml +7 -0
- package/template/.qoder/skills/frontend-commit/references/scope-and-examples.md +111 -0
- package/template/.qoder/skills/java-backend-commit/SKILL.md +121 -0
- package/template/.qoder/skills/java-backend-commit/agents/openai.yaml +7 -0
- package/template/.qoder/skills/java-backend-commit/references/scope-and-examples.md +118 -0
- package/template/.qoder/skills/page-form-module/SKILL.md +168 -0
- package/template/.qoder/skills/page-list-module/SKILL.md +137 -0
- package/template/.qoder/skills/page-skeleton/SKILL.md +76 -0
- package/template/.qoder/skills/page-skeleton/examples/AdvancedFormPage/constant.ts +34 -0
- package/template/.qoder/skills/page-skeleton/examples/AdvancedFormPage/hooks/useRuleConfig.ts +75 -0
- package/template/.qoder/skills/page-skeleton/examples/AdvancedFormPage/index.vue +107 -0
- package/template/.qoder/skills/page-skeleton/examples/AdvancedFormPage/schemas/ruleConfigSchema.ts +256 -0
- package/template/.qoder/skills/page-skeleton/examples/AdvancedFormPage/style.less +30 -0
- package/template/.qoder/skills/page-skeleton/examples/StandardListPage/constant.ts +28 -0
- package/template/.qoder/skills/page-skeleton/examples/StandardListPage/hooks/useQualityRuleList.ts +58 -0
- package/template/.qoder/skills/page-skeleton/examples/StandardListPage/hooks/useRuleActions.ts +65 -0
- package/template/.qoder/skills/page-skeleton/examples/StandardListPage/index.vue +91 -0
- package/template/.qoder/skills/page-skeleton/examples/StandardListPage/style.less +49 -0
- package/template/.qoder/skills/prototype-page-acceptance/SKILL.md +62 -0
- package/template/.qoder/skills/theme-token-usage/SKILL.md +123 -0
- package/template/.qoder/skills/theme-token-usage/agents/openai.yaml +4 -0
- package/template/.qoder/skills/vue3-best-practices/SKILL.md +68 -0
- package/template/.qoder/skills/yedit-table-usage/SKILL.md +227 -0
- package/template/.qoder/skills/yss-api-integration/SKILL.md +12 -2
- package/template/.qoder/skills/yss-components/SKILL.md +1 -1
- package/template/.qoder/skills/yss-design-system/SKILL.md +1 -1
- package/template/.qoder/skills/yss-formily/SKILL.md +233 -265
- package/template/.qoder/skills/yss-frontend-scaffold-generator/SKILL.md +1 -1
- package/template/.qoder/skills/yss-hook/SKILL.md +1 -1
- package/template/.qoder/skills/yss-openapi-governance/SKILL.md +2 -2
- package/template/.qoder/skills/yss-page-module-development/SKILL.md +12 -2
- package/template/.qoder/skills/yss-page-module-development/references/component-map.md +34 -0
- package/template/.qoder/skills/yss-page-module-development/references/hooks-map.md +11 -0
- package/template/.qoder/skills/yss-page-module-development/references/utils-map.md +14 -0
- package/template/.qoder/skills/yss-product-lifecycle/references/orchestration-contract.yaml +62 -1
- package/template/.qoder/skills/yss-router/references/boundaries.md +1 -1
- package/template/.qoder/skills/yss-router/references/router-contract.yaml +6 -2
- package/template/.qoder/skills/yss-ui/SKILL.md +1 -1
- package/template/.qoder/skills/yss-use-table-height/SKILL.md +9 -0
- package/template/.qoder/skills/yss-use-tree-height/SKILL.md +9 -0
- package/template/.qoder/skills/ytable-usage/SKILL.md +251 -0
- package/template/.qoder/skills/ytree-usage/SKILL.md +132 -0
- package/template/.trae/skills/.yss-skills-manifest.json +29 -0
- package/template/.trae/skills/component-selection-imports/SKILL.md +64 -0
- package/template/.trae/skills/file-export-download/SKILL.md +160 -0
- package/template/.trae/skills/file-export-download/agents/openai.yaml +4 -0
- package/template/.trae/skills/formily-foundation/SKILL.md +176 -0
- package/template/.trae/skills/formily-foundation/references/examples.md +486 -0
- package/template/.trae/skills/formily-linkage-effects/SKILL.md +167 -0
- package/template/.trae/skills/formily-mode-slot-detail/SKILL.md +137 -0
- package/template/.trae/skills/formily-step-flow/SKILL.md +194 -0
- package/template/.trae/skills/frontend-commit/SKILL.md +118 -0
- package/template/.trae/skills/frontend-commit/agents/openai.yaml +7 -0
- package/template/.trae/skills/frontend-commit/references/scope-and-examples.md +111 -0
- package/template/.trae/skills/java-backend-commit/SKILL.md +121 -0
- package/template/.trae/skills/java-backend-commit/agents/openai.yaml +7 -0
- package/template/.trae/skills/java-backend-commit/references/scope-and-examples.md +118 -0
- package/template/.trae/skills/page-form-module/SKILL.md +168 -0
- package/template/.trae/skills/page-list-module/SKILL.md +137 -0
- package/template/.trae/skills/page-skeleton/SKILL.md +76 -0
- package/template/.trae/skills/page-skeleton/examples/AdvancedFormPage/constant.ts +34 -0
- package/template/.trae/skills/page-skeleton/examples/AdvancedFormPage/hooks/useRuleConfig.ts +75 -0
- package/template/.trae/skills/page-skeleton/examples/AdvancedFormPage/index.vue +107 -0
- package/template/.trae/skills/page-skeleton/examples/AdvancedFormPage/schemas/ruleConfigSchema.ts +256 -0
- package/template/.trae/skills/page-skeleton/examples/AdvancedFormPage/style.less +30 -0
- package/template/.trae/skills/page-skeleton/examples/StandardListPage/constant.ts +28 -0
- package/template/.trae/skills/page-skeleton/examples/StandardListPage/hooks/useQualityRuleList.ts +58 -0
- package/template/.trae/skills/page-skeleton/examples/StandardListPage/hooks/useRuleActions.ts +65 -0
- package/template/.trae/skills/page-skeleton/examples/StandardListPage/index.vue +91 -0
- package/template/.trae/skills/page-skeleton/examples/StandardListPage/style.less +49 -0
- package/template/.trae/skills/prototype-page-acceptance/SKILL.md +62 -0
- package/template/.trae/skills/theme-token-usage/SKILL.md +123 -0
- package/template/.trae/skills/theme-token-usage/agents/openai.yaml +4 -0
- package/template/.trae/skills/vue3-best-practices/SKILL.md +68 -0
- package/template/.trae/skills/yedit-table-usage/SKILL.md +227 -0
- package/template/.trae/skills/yss-api-integration/SKILL.md +12 -2
- package/template/.trae/skills/yss-components/SKILL.md +1 -1
- package/template/.trae/skills/yss-design-system/SKILL.md +1 -1
- package/template/.trae/skills/yss-formily/SKILL.md +233 -265
- package/template/.trae/skills/yss-frontend-scaffold-generator/SKILL.md +1 -1
- package/template/.trae/skills/yss-hook/SKILL.md +1 -1
- package/template/.trae/skills/yss-openapi-governance/SKILL.md +2 -2
- package/template/.trae/skills/yss-page-module-development/SKILL.md +12 -2
- package/template/.trae/skills/yss-page-module-development/references/component-map.md +34 -0
- package/template/.trae/skills/yss-page-module-development/references/hooks-map.md +11 -0
- package/template/.trae/skills/yss-page-module-development/references/utils-map.md +14 -0
- package/template/.trae/skills/yss-product-lifecycle/references/orchestration-contract.yaml +62 -1
- package/template/.trae/skills/yss-router/references/boundaries.md +1 -1
- package/template/.trae/skills/yss-router/references/router-contract.yaml +6 -2
- package/template/.trae/skills/yss-ui/SKILL.md +1 -1
- package/template/.trae/skills/yss-use-table-height/SKILL.md +9 -0
- package/template/.trae/skills/yss-use-tree-height/SKILL.md +9 -0
- package/template/.trae/skills/ytable-usage/SKILL.md +251 -0
- package/template/.trae/skills/ytree-usage/SKILL.md +132 -0
- package/template/docs/agents/skill-migrations.md +16 -0
- package/template/docs/agents/skills-maintenance.md +1 -1
- package/template/docs/agents/yss-skill-registry.yaml +125 -25
- 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
- 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
- package/template/scripts/lib/scenario-checks.mjs +21 -0
- package/template/scripts/lib/skill-governance.mjs +50 -0
- package/template/scripts/lib/skill-registry.mjs +82 -5
- package/template/scripts/lib/skill-supply-chain.mjs +5 -1
- package/template/scripts/verify-skill-governance +10 -0
- package/template/scripts/verify-template +3 -2
- package/template/skills-lock.json +285 -29
- package/template.snapshot.json +4 -4
- package/template/.agents/skills/high-fidelity-html-prototype/SKILL.md +0 -89
- package/template/.agents/skills/high-fidelity-html-prototype/agents/openai.yaml +0 -5
- package/template/.agents/skills/yss-formily/agents/openai.yaml +0 -5
- package/template/.agents/skills/yss-formily/references/examples.md +0 -65
- package/template/.claude/skills/high-fidelity-html-prototype/SKILL.md +0 -89
- package/template/.claude/skills/high-fidelity-html-prototype/agents/openai.yaml +0 -5
- package/template/.claude/skills/yss-formily/agents/openai.yaml +0 -5
- package/template/.claude/skills/yss-formily/references/examples.md +0 -65
- package/template/.codex/skills/high-fidelity-html-prototype/SKILL.md +0 -89
- package/template/.codex/skills/high-fidelity-html-prototype/agents/openai.yaml +0 -5
- package/template/.codex/skills/yss-formily/agents/openai.yaml +0 -5
- package/template/.codex/skills/yss-formily/references/examples.md +0 -65
- package/template/.cursor/skills/high-fidelity-html-prototype/SKILL.md +0 -89
- package/template/.cursor/skills/high-fidelity-html-prototype/agents/openai.yaml +0 -5
- package/template/.cursor/skills/yss-formily/agents/openai.yaml +0 -5
- package/template/.cursor/skills/yss-formily/references/examples.md +0 -65
- package/template/.hermes/skills/high-fidelity-html-prototype/SKILL.md +0 -89
- package/template/.hermes/skills/high-fidelity-html-prototype/agents/openai.yaml +0 -5
- package/template/.hermes/skills/yss-formily/agents/openai.yaml +0 -5
- package/template/.hermes/skills/yss-formily/references/examples.md +0 -65
- package/template/.pi/skills/high-fidelity-html-prototype/SKILL.md +0 -89
- package/template/.pi/skills/high-fidelity-html-prototype/agents/openai.yaml +0 -5
- package/template/.pi/skills/yss-formily/agents/openai.yaml +0 -5
- package/template/.pi/skills/yss-formily/references/examples.md +0 -65
- package/template/.qoder/skills/high-fidelity-html-prototype/SKILL.md +0 -89
- package/template/.qoder/skills/high-fidelity-html-prototype/agents/openai.yaml +0 -5
- package/template/.qoder/skills/yss-formily/agents/openai.yaml +0 -5
- package/template/.qoder/skills/yss-formily/references/examples.md +0 -65
- package/template/.trae/skills/high-fidelity-html-prototype/SKILL.md +0 -89
- package/template/.trae/skills/high-fidelity-html-prototype/agents/openai.yaml +0 -5
- package/template/.trae/skills/yss-formily/agents/openai.yaml +0 -5
- package/template/.trae/skills/yss-formily/references/examples.md +0 -65
|
@@ -89,7 +89,7 @@ description: Use when YSS 产品设计系统与 Ant Design 企业级 UI 风格
|
|
|
89
89
|
| YTable / YTree / 高度自适应 | `yss-components` / `yss-use-table-height` / `yss-use-tree-height` |
|
|
90
90
|
| 原型阶段的 Ant Design v6 组件 / token / demo 查询 | `yss-antd-design`(只用于原型设计构建;前端落地改用 `yss-ui`) |
|
|
91
91
|
| Codex 原型交接前的视觉 QA | `design-qa`;token / 字体对照读 `references/design-qa-theme.md`,以项目覆盖为准 |
|
|
92
|
-
| API 契约 / 接入 | `yss-openapi-governance` / `api-integration` |
|
|
92
|
+
| API 契约 / 接入 | `yss-openapi-governance` / `yss-api-integration` |
|
|
93
93
|
|
|
94
94
|
## 更新设计系统
|
|
95
95
|
|
|
@@ -1,99 +1,99 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: yss-formily
|
|
3
|
-
description:
|
|
3
|
+
description: 指导在 YSS UI 业务页面中正确使用 @yss-ui/components 的 YFormily;当新增、编辑、查看、查询、联动、详情插槽、分步表单或动态 schema 需求出现时使用,并校验组件导入、提交与错误处理边界。
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
#
|
|
6
|
+
# YFormily 表单开发 Skill
|
|
7
|
+
|
|
8
|
+
## 触发条件
|
|
9
|
+
|
|
10
|
+
- 生成或修改新增、编辑、查看、弹窗表单、详情表单、查询表单。
|
|
11
|
+
- 需要 JSON Schema、字段联动、动态显隐、远程字典、Slot 自定义渲染。
|
|
12
|
+
- 需要 `mode=0/1/2`、详情 Descriptions、分步表单。
|
|
13
|
+
|
|
14
|
+
## 不适用场景
|
|
15
|
+
|
|
16
|
+
- 页面只有普通列表,不涉及表单:使用 `../page-list-module/SKILL.md`。
|
|
17
|
+
- 只处理表格操作列或分页:使用 `../ytable-usage/SKILL.md`。
|
|
18
|
+
- 组件库内部改造 YFormily 源码:使用 `../component-development/SKILL.md`。
|
|
19
|
+
|
|
20
|
+
## 文档检索
|
|
21
|
+
|
|
22
|
+
1. 当前会话可用 yss-ui MCP 时,先用 `get_component_docs` 查询 `YFormily` 的 Props、Events、Slots、Methods 和 Types;再按需求用 `get_demo` 获取 `formily/basic`、`formily/linkage`、`formily/modes`、`formily/effects`、`formily/steps` 等官方 Demo。
|
|
23
|
+
2. MCP 查询未命中时先用 `search_docs/list_components` 校正名称;只有 MCP 不可用、调用失败或校正后仍无结果时,才读取最新 `llms-full.txt`。文档与当前项目依赖版本不一致时,用当前源码和可编译导出核验,不猜测 API。
|
|
24
|
+
3. 本 Skill 已加载时不得用 `get_skill` 重复查询自身;只在所需 Formily 子 Skill 未同步到本地时使用 `get_skill` 兜底。
|
|
25
|
+
|
|
26
|
+
## 硬约束(禁止/必须)
|
|
27
|
+
|
|
28
|
+
- 业务生成代码统一使用 `import { YFormily, type ISchema } from '@yss-ui/components'`。
|
|
29
|
+
- `YFormily` 是标准推荐名称;`YssFormily` 仅作为历史兼容别名,除非维护旧代码,不用于新代码。
|
|
30
|
+
- 业务层禁止导入 `@formily/antdv` UI 组件,禁止导入不存在的 `@formily/antd-v3`。
|
|
31
|
+
- 所有业务 `YFormily` schema 必须包含 `FormLayout -> FormGrid -> 字段` 基础层级,禁止直接以字段或单独 `FormGrid` 作为顶层布局。
|
|
32
|
+
- `Submit` 组件必须传 `onSubmit`,否则不会触发提交校验。
|
|
33
|
+
- 标准业务列表/CRUD 查询区默认让 `YFormily` 只渲染查询字段;“查询/重置”用外部 `YButton` 放在 `.xxx__search-actions`,由 hook 的 `handleSearch/handleReset` 控制分页重置和请求。
|
|
34
|
+
- `AutoButtonGroup + Submit + Reset` 仅用于纯 Formily 表单提交场景,不作为业务列表查询区默认方案。
|
|
35
|
+
- 查询区禁止把 `.xxx__search-content` 写成横向“表单 + 按钮”并用大 `gap`、`align-items: flex-start`、`padding-top` 硬调按钮位置;字段换行时按钮必须仍在搜索卡片右下角。
|
|
36
|
+
- 横向业务表单必须显式设置 `FormLayout` 的 `labelWidth` 和 `labelAlign: 'right'`;抽屉/弹窗表单不得让 label 宽度随文本抖动。
|
|
37
|
+
- `FormGrid` 必须保持响应式:默认 `minColumns: 1`,通过 `maxColumns`、`minWidth` 控制宽屏列数;禁止把 `minColumns` 写成与 `maxColumns` 相同的固定列数,除非用户明确要求固定不响应。
|
|
38
|
+
- 抽屉/弹窗编辑表单默认 `labelWidth: 140`、`labelAlign: 'right'`、`FormGrid { maxColumns: 2, minColumns: 1, minWidth: 320~360 }`;备注、长文本等字段用 `gridSpan` 占满整行。
|
|
39
|
+
- **数据前置同步原则(必守)**:弹窗/抽屉表单数据必须在 `openCreate`/`openEdit` 打开方法中**同步赋好 `formModel.value`**,严禁在子组件内部通过 `watch(visible) + await nextTick() + initForm()` 滞后回填数据。
|
|
40
|
+
- **单一信任源**:优先使用 `v-model="formModel"` + `ref="formRef"` 调用 `formRef.value.submit()` 获取校验后数据;严禁在业务组件顶层写 `const form = createForm()` 单例并与 `v-model`、`form.setValues()`、`form.reset()` 混用导致状态死锁。
|
|
41
|
+
- **禁止滥用动态 `:key`**:严禁在 `YFormily`/`YssFormily` 上使用 `:key="isEdit ? 'edit' : 'create'"` 强制 Remount,必须通过响应式数据或 `:mode` 驱动。
|
|
42
|
+
- **弹窗生命周期隔离**:Modal/Drawer 必须配置 `:destroy-on-close="true"`,且内部 `YFormily` 必须带 `v-if="visible/open"` 随容器打开挂载、关闭销毁,保证数据干净无残留。
|
|
43
|
+
- 下拉/选择器(`Select`, `TreeSelect`, `Radio.Group` 等)异步数据源**必须使用 `enum` 或 `x-reactions` / `field.dataSource` 注入**;**严禁将异步 options 数组直接写入 `x-component-props.options`**(会导致 Formily 首次挂载覆盖为空数组且外部响应式无法通知,产生首次打开弹窗显示“暂无数据”、关闭再打开才展示的经典 Bug)。
|
|
44
|
+
- 弹窗/抽屉表单的基础字典下拉数据,优先在打开前 `await fetchOptions()` 或在页面 `onMounted` 提前拉取;在组件内部 `watch` 更新选项时,必须使用精确字段路径并在 `await nextTick()` 后调用 `form.setFieldState('fieldName', state => { state.dataSource = options })`。
|
|
45
|
+
- `mode=2` 自动进入详情查看态;不要生成旧式详情开关 prop,配置描述列表用 `detail-options`。
|
|
46
|
+
- 只使用源码已公开的 Props 和实例方法;当前没有 `show-button-group`、`detail-as`、`validate`、`reset`、`clearValidate` 等 YFormily API,禁止根据旧 demo 猜测。
|
|
47
|
+
- 分步表单默认使用 AntDV `Steps + 多 YFormily`,不默认使用 `FormStep`。
|
|
48
|
+
- Orval API 的网络错误及 `success === false` 业务错误已由 `mutator.ts` 统一 `message.error` 并 reject;提交 hook 的 `else`/`catch` 只做状态恢复或业务补偿,禁止重复 `message.error`。
|
|
49
|
+
- 需要统一提示客户端校验失败时使用 `onFormSubmitValidateFailed`;禁止在 `onFormSubmitFailed` 或 `Submit.onSubmitFailed` 中调用 `message.error`,因为 API reject 也会进入这些通用失败回调。
|
|
50
|
+
|
|
51
|
+
## 标准代码骨架
|
|
7
52
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
- creating or editing a `YssFormily` / `YFormily` form
|
|
12
|
-
- writing or refactoring a Formily schema
|
|
13
|
-
- implementing add/edit/detail forms with one shared schema
|
|
14
|
-
- building field linkage, reactions, form `effects`, async validation
|
|
15
|
-
- adding custom slot fields such as Monaco, SQL, rich text, custom hints
|
|
16
|
-
- debugging why a form does not submit, does not react, or renders incorrectly
|
|
17
|
-
|
|
18
|
-
`YssFormily` in this project is a YSS wrapper built on top of the Ant Design Vue ecosystem.
|
|
19
|
-
When reasoning about component props, event names, interaction behavior, and rendered form controls, treat Ant Design Vue as the underlying UI behavior model.
|
|
20
|
-
|
|
21
|
-
## Source of truth
|
|
22
|
-
|
|
23
|
-
Read the scenario map first:
|
|
24
|
-
|
|
25
|
-
1. [references/examples.md](references/examples.md)
|
|
26
|
-
|
|
27
|
-
If the user asks for a concrete pattern, inspect the closest existing YSS form page or example in the repository and match its local convention.
|
|
28
|
-
|
|
29
|
-
## Hard rules
|
|
30
|
-
|
|
31
|
-
### Imports
|
|
32
|
-
|
|
33
|
-
Business code should import the wrapper component from `@yss-ui/components`.
|
|
34
|
-
Do not build business forms by directly importing Formily UI components from React packages.
|
|
35
|
-
|
|
36
|
-
Preferred imports:
|
|
37
|
-
|
|
38
|
-
```ts
|
|
39
|
-
import { YssFormily, YFormily, type ISchema } from "@yss-ui/components";
|
|
40
|
-
import {
|
|
41
|
-
createForm,
|
|
42
|
-
onFieldValueChange,
|
|
43
|
-
onFormSubmit,
|
|
44
|
-
onFormSubmitFailed,
|
|
45
|
-
} from "@formily/core";
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
Avoid these imports unless a file already depends on them for a narrow advanced case:
|
|
49
|
-
|
|
50
|
-
- `@formily/antd`
|
|
51
|
-
- `@formily/antd-v3`
|
|
52
|
-
- direct UI field imports from `@formily/antdv` for ordinary business forms
|
|
53
|
-
|
|
54
|
-
`YssFormily` already wraps the common Ant Design Vue Formily components and project-specific adapters.
|
|
55
|
-
Its field event behavior should be understood through Ant Design Vue conventions first, then the YSS wrapper conventions.
|
|
56
|
-
|
|
57
|
-
### Prefer one schema for add, edit, detail
|
|
58
|
-
|
|
59
|
-
Default approach:
|
|
60
|
-
|
|
61
|
-
- `mode=0`: create
|
|
62
|
-
- `mode=1`: edit
|
|
63
|
-
- `mode=2`: detail
|
|
64
|
-
|
|
65
|
-
Do not fork separate edit/detail implementations unless the UI is materially different.
|
|
66
|
-
|
|
67
|
-
### Use `v-model` as the main value source
|
|
53
|
+
```vue
|
|
54
|
+
<script setup lang="ts">
|
|
55
|
+
import { YFormily, type ISchema } from '@yss-ui/components';
|
|
68
56
|
|
|
69
|
-
|
|
70
|
-
|
|
57
|
+
/** 表单保存回调 Props。 */
|
|
58
|
+
interface SaveFormProps {
|
|
59
|
+
onSave: (values: Record<string, any>) => Promise<void>;
|
|
60
|
+
}
|
|
71
61
|
|
|
72
|
-
|
|
62
|
+
/** 表单保存回调。 */
|
|
63
|
+
const props = defineProps<SaveFormProps>();
|
|
73
64
|
|
|
74
|
-
|
|
65
|
+
/** 校验通过后提交表单数据。 */
|
|
66
|
+
const onSubmit = (values: Record<string, any>) => {
|
|
67
|
+
return props.onSave(values);
|
|
68
|
+
};
|
|
75
69
|
|
|
76
|
-
|
|
70
|
+
/** 基础业务表单 Schema。 */
|
|
77
71
|
const schema: ISchema = {
|
|
78
|
-
type:
|
|
72
|
+
type: 'object',
|
|
79
73
|
properties: {
|
|
80
74
|
layout: {
|
|
81
|
-
type:
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
layout: "horizontal",
|
|
85
|
-
labelWidth: 120,
|
|
86
|
-
},
|
|
75
|
+
type: 'void',
|
|
76
|
+
'x-component': 'FormLayout',
|
|
77
|
+
'x-component-props': { layout: 'horizontal', labelWidth: 100, labelAlign: 'right' },
|
|
87
78
|
properties: {
|
|
88
79
|
grid: {
|
|
89
|
-
type:
|
|
90
|
-
|
|
80
|
+
type: 'void',
|
|
81
|
+
'x-component': 'FormGrid',
|
|
82
|
+
'x-component-props': { maxColumns: 3, minColumns: 1, minWidth: 260 },
|
|
91
83
|
properties: {
|
|
92
|
-
|
|
93
|
-
type:
|
|
94
|
-
title:
|
|
95
|
-
|
|
96
|
-
|
|
84
|
+
name: {
|
|
85
|
+
type: 'string',
|
|
86
|
+
title: '名称',
|
|
87
|
+
required: true,
|
|
88
|
+
'x-decorator': 'FormItem',
|
|
89
|
+
'x-component': 'Input',
|
|
90
|
+
'x-component-props': { placeholder: '请输入' },
|
|
91
|
+
},
|
|
92
|
+
submit: {
|
|
93
|
+
type: 'void',
|
|
94
|
+
'x-component': 'Submit',
|
|
95
|
+
'x-content': '提交',
|
|
96
|
+
'x-component-props': { onSubmit: '{{ onSubmit }}' },
|
|
97
97
|
},
|
|
98
98
|
},
|
|
99
99
|
},
|
|
@@ -101,204 +101,172 @@ const schema: ISchema = {
|
|
|
101
101
|
},
|
|
102
102
|
},
|
|
103
103
|
};
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
Interpretation:
|
|
107
|
-
|
|
108
|
-
- `FormLayout` controls label layout and size
|
|
109
|
-
- `FormGrid` controls responsive columns
|
|
110
|
-
- fields normally use `FormItem`
|
|
111
|
-
|
|
112
|
-
Do not hand-build layout with ad hoc wrapper divs if `FormLayout`, `FormGrid`, `GroupHeader`, or `AutoButtonGroup` already solve it.
|
|
113
|
-
|
|
114
|
-
## Choose the right mechanism
|
|
115
|
-
|
|
116
|
-
Use this decision order:
|
|
117
|
-
|
|
118
|
-
1. Static field structure and basic validation:
|
|
119
|
-
put it in `schema`
|
|
120
|
-
2. Visibility, disabled state, or simple dependency:
|
|
121
|
-
use `x-visible`, `x-disabled`, `x-reactions`
|
|
122
|
-
3. Reusable event handlers or cross-field helper functions:
|
|
123
|
-
inject through `scope`
|
|
124
|
-
4. Form-wide side effects, submit lifecycle, async orchestration:
|
|
125
|
-
use `createForm({ effects })`
|
|
126
|
-
5. Rich custom rendering:
|
|
127
|
-
use `Slot` in edit mode and `detail-*` slots in detail mode
|
|
128
|
-
|
|
129
|
-
### Event selection
|
|
130
|
-
|
|
131
|
-
Event names follow the underlying Ant Design Vue component behavior.
|
|
132
|
-
|
|
133
|
-
- text input: prefer `x-component-props.onUpdate:value`
|
|
134
|
-
- select, radio, switch, date picker: usually `x-component-props.onChange`
|
|
135
|
-
- submit: `Submit.x-component-props.onSubmit`
|
|
136
|
-
|
|
137
|
-
Do not attach multiple equivalent listeners to the same field unless the existing component requires it.
|
|
138
|
-
|
|
139
|
-
### `x-reactions` vs `scope` vs `effects`
|
|
140
|
-
|
|
141
|
-
Use `x-reactions` for declarative field-to-field linkage:
|
|
142
|
-
|
|
143
|
-
- show/hide
|
|
144
|
-
- disable/enable
|
|
145
|
-
- reset a sibling field
|
|
146
|
-
- update a dependent enum or datasource
|
|
147
|
-
|
|
148
|
-
Use `scope` for local handlers when the schema needs to call project code:
|
|
149
|
-
|
|
150
|
-
- remote search
|
|
151
|
-
- custom validation helper
|
|
152
|
-
- helper function reused by multiple fields
|
|
153
|
-
|
|
154
|
-
Use `effects` for form-level orchestration:
|
|
155
|
-
|
|
156
|
-
- global submit success or failure behavior
|
|
157
|
-
- multi-field coordination
|
|
158
|
-
- async side effects not tied cleanly to one field
|
|
159
|
-
- analytics or global notification hooks
|
|
160
|
-
|
|
161
|
-
## Mode and detail view
|
|
162
|
-
|
|
163
|
-
When `mode=2`, `YssFormily` can render as a `Descriptions`-style detail view.
|
|
164
|
-
|
|
165
|
-
Default detail rendering already handles:
|
|
166
|
-
|
|
167
|
-
- `enum` to label
|
|
168
|
-
- `DatePicker` to `YYYY-MM-DD`
|
|
169
|
-
- boolean or `Switch` to “是/否”
|
|
170
|
-
- arrays joined by `、`
|
|
171
|
-
- empty values as `-`
|
|
172
|
-
|
|
173
|
-
Use `detail-options` to control layout.
|
|
174
|
-
Important constraint from the component doc:
|
|
175
|
-
|
|
176
|
-
- `responsive` is `true` by default
|
|
177
|
-
- when `responsive=true`, `columns` is ignored
|
|
178
|
-
- if you need a fixed max of two columns, set `maxColumns: 2` or `responsive: false`
|
|
179
|
-
|
|
180
|
-
### Detail slot naming
|
|
181
|
-
|
|
182
|
-
For detail mode custom rendering, use:
|
|
104
|
+
</script>
|
|
183
105
|
|
|
184
|
-
|
|
185
|
-
|
|
106
|
+
<template>
|
|
107
|
+
<YFormily :schema="schema" :scope="{ onSubmit }" />
|
|
108
|
+
</template>
|
|
186
109
|
```
|
|
187
110
|
|
|
188
|
-
|
|
111
|
+
### 表单布局基准
|
|
189
112
|
|
|
190
|
-
|
|
113
|
+
- 普通业务表单:`FormLayout { layout: 'horizontal', labelWidth: 120, labelAlign: 'right' }`,`FormGrid { maxColumns: 3, minColumns: 1, minWidth: 260 }`。
|
|
114
|
+
- 抽屉/弹窗表单:长 label 较多时用 `labelWidth: 140`,`FormGrid { maxColumns: 2, minColumns: 1, minWidth: 320 或 360 }`。
|
|
115
|
+
- 查询表单:字段少时用 `labelWidth: 100~120`,`FormGrid { maxColumns: 3 或 4, minColumns: 1, minWidth: 260~360 }`;查询/重置按钮放在表单外部的右下角按钮行。
|
|
116
|
+
- 不要为了复刻宽屏两列布局写 `minColumns: 2`;这会破坏组件库 demo 中默认的响应式收缩行为。
|
|
117
|
+
- 备注、说明、富文本、长输入框等横跨整行字段,在字段 `x-decorator-props` 上设置 `gridSpan`,例如两列表单使用 `gridSpan: 2`。
|
|
191
118
|
|
|
192
|
-
|
|
193
|
-
- `user.email` -> `#detail-user-email`
|
|
119
|
+
### 业务列表查询区固定模板
|
|
194
120
|
|
|
195
|
-
|
|
121
|
+
```typescript
|
|
122
|
+
import { YButton, YCard, YFormily, type ISchema } from '@yss-ui/components';
|
|
196
123
|
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
124
|
+
/** 查询表单 Schema。 */
|
|
125
|
+
const searchSchema: ISchema = {
|
|
126
|
+
type: 'object',
|
|
127
|
+
properties: {
|
|
128
|
+
layout: {
|
|
129
|
+
type: 'void',
|
|
130
|
+
'x-component': 'FormLayout',
|
|
131
|
+
'x-component-props': { layout: 'horizontal', labelWidth: 120, labelAlign: 'right' },
|
|
132
|
+
properties: {
|
|
133
|
+
grid: {
|
|
134
|
+
type: 'void',
|
|
135
|
+
'x-component': 'FormGrid',
|
|
136
|
+
'x-component-props': { maxColumns: 4, minColumns: 1, minWidth: 260, columnGap: 16, rowGap: 0 },
|
|
137
|
+
properties: {
|
|
138
|
+
keyword: {
|
|
139
|
+
type: 'string',
|
|
140
|
+
title: '关键字',
|
|
141
|
+
'x-decorator': 'FormItem',
|
|
142
|
+
'x-component': 'Input',
|
|
143
|
+
'x-component-props': { placeholder: '请输入关键字', allowClear: true },
|
|
144
|
+
},
|
|
145
|
+
},
|
|
146
|
+
},
|
|
147
|
+
},
|
|
148
|
+
},
|
|
149
|
+
},
|
|
150
|
+
};
|
|
202
151
|
```
|
|
203
152
|
|
|
204
|
-
Then provide:
|
|
205
|
-
|
|
206
153
|
```vue
|
|
207
|
-
<template
|
|
154
|
+
<template>
|
|
155
|
+
<YCard class="demo-page__search-card" :padding="16">
|
|
156
|
+
<div class="demo-page__search-content">
|
|
157
|
+
<div class="demo-page__search-form">
|
|
158
|
+
<YFormily v-model="queryModel" :schema="searchSchema" />
|
|
159
|
+
</div>
|
|
160
|
+
<div class="demo-page__search-actions">
|
|
161
|
+
<YButton type="primary" @click="handleSearch">查询</YButton>
|
|
162
|
+
<YButton @click="handleReset">重置</YButton>
|
|
163
|
+
</div>
|
|
164
|
+
</div>
|
|
165
|
+
</YCard>
|
|
166
|
+
</template>
|
|
208
167
|
```
|
|
209
168
|
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
169
|
+
```less
|
|
170
|
+
.demo-page {
|
|
171
|
+
&__search-content {
|
|
172
|
+
display: flex;
|
|
173
|
+
flex-direction: column;
|
|
174
|
+
align-items: stretch;
|
|
175
|
+
gap: 16px;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
&__search-form {
|
|
179
|
+
width: 100%;
|
|
180
|
+
min-width: 0;
|
|
181
|
+
|
|
182
|
+
:deep(.ant-formily-form-item) {
|
|
183
|
+
margin-bottom: 0;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
:deep(.ant-formily-form-grid) {
|
|
187
|
+
width: 100%;
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
&__search-actions {
|
|
192
|
+
display: flex;
|
|
193
|
+
width: 100%;
|
|
194
|
+
flex: 0 0 auto;
|
|
195
|
+
align-items: center;
|
|
196
|
+
justify-content: flex-end;
|
|
197
|
+
gap: 12px;
|
|
198
|
+
}
|
|
199
|
+
}
|
|
214
200
|
```
|
|
215
201
|
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
- Monaco editors
|
|
219
|
-
- SQL or JSON editors
|
|
220
|
-
- rich text or code previews
|
|
221
|
-
- custom helper blocks
|
|
222
|
-
|
|
223
|
-
## Layout guidance
|
|
224
|
-
|
|
225
|
-
Use these built-ins before writing custom wrappers:
|
|
226
|
-
|
|
227
|
-
- `FormLayout`
|
|
228
|
-
- `FormGrid`
|
|
229
|
-
- `GroupHeader`
|
|
230
|
-
- `AutoButtonGroup`
|
|
231
|
-
- `FormCollapse`
|
|
232
|
-
- `FormStep`
|
|
233
|
-
- `ArrayItems`
|
|
234
|
-
|
|
235
|
-
Recommended habits:
|
|
236
|
-
|
|
237
|
-
- use `x-decorator-props.gridSpan` for wide fields
|
|
238
|
-
- use `GroupHeader` for section titles instead of ad hoc headings
|
|
239
|
-
- use `AutoButtonGroup` for aligned action areas
|
|
240
|
-
- set shared grid behavior through `grid-defaults` at component usage level
|
|
241
|
-
|
|
242
|
-
## Instance methods
|
|
243
|
-
|
|
244
|
-
When page logic needs imperative control, get a component ref and use:
|
|
245
|
-
|
|
246
|
-
- `getValues`
|
|
247
|
-
- `setValues`
|
|
248
|
-
- `submit`
|
|
249
|
-
- `setFieldState`
|
|
250
|
-
- `form`
|
|
202
|
+
> 只有纯 Formily 提交表单才把按钮放回 schema 内,例如 `AutoButtonGroup -> Submit/Reset`。
|
|
251
203
|
|
|
252
|
-
|
|
204
|
+
### 抽屉/弹窗表单模板
|
|
253
205
|
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
-
|
|
274
|
-
-
|
|
275
|
-
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
-
|
|
283
|
-
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
The example index is in:
|
|
294
|
-
[references/examples.md](references/examples.md)
|
|
295
|
-
|
|
296
|
-
## Output expectation
|
|
297
|
-
|
|
298
|
-
When using this skill, produce code that is:
|
|
206
|
+
```typescript
|
|
207
|
+
/** 抽屉或弹窗内的编辑表单 Schema。 */
|
|
208
|
+
const formSchema: ISchema = {
|
|
209
|
+
type: 'object',
|
|
210
|
+
properties: {
|
|
211
|
+
layout: {
|
|
212
|
+
type: 'void',
|
|
213
|
+
'x-component': 'FormLayout',
|
|
214
|
+
'x-component-props': { layout: 'horizontal', labelWidth: 140, labelAlign: 'right' },
|
|
215
|
+
properties: {
|
|
216
|
+
grid: {
|
|
217
|
+
type: 'void',
|
|
218
|
+
'x-component': 'FormGrid',
|
|
219
|
+
'x-component-props': { maxColumns: 2, minColumns: 1, minWidth: 360, columnGap: 24, rowGap: 16 },
|
|
220
|
+
properties: {
|
|
221
|
+
orgName: {
|
|
222
|
+
type: 'string',
|
|
223
|
+
title: '机构名称',
|
|
224
|
+
required: true,
|
|
225
|
+
'x-decorator': 'FormItem',
|
|
226
|
+
'x-component': 'Input',
|
|
227
|
+
'x-component-props': { placeholder: '请输入机构名称' },
|
|
228
|
+
},
|
|
229
|
+
remark: {
|
|
230
|
+
type: 'string',
|
|
231
|
+
title: '备注',
|
|
232
|
+
'x-decorator': 'FormItem',
|
|
233
|
+
'x-decorator-props': { gridSpan: 2 },
|
|
234
|
+
'x-component': 'Input.TextArea',
|
|
235
|
+
'x-component-props': { placeholder: '请输入备注', rows: 4 },
|
|
236
|
+
},
|
|
237
|
+
},
|
|
238
|
+
},
|
|
239
|
+
},
|
|
240
|
+
},
|
|
241
|
+
},
|
|
242
|
+
};
|
|
243
|
+
```
|
|
299
244
|
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
-
|
|
303
|
-
-
|
|
304
|
-
-
|
|
245
|
+
## 关联 skill
|
|
246
|
+
|
|
247
|
+
- 基础表单:`../formily-foundation/SKILL.md`
|
|
248
|
+
- 联动副作用:`../formily-linkage-effects/SKILL.md`
|
|
249
|
+
- 模式与详情插槽:`../formily-mode-slot-detail/SKILL.md`
|
|
250
|
+
- 分步流程:`../formily-step-flow/SKILL.md`
|
|
251
|
+
- 完整示例:`../formily-foundation/references/examples.md`
|
|
252
|
+
|
|
253
|
+
## 交付检查清单
|
|
254
|
+
|
|
255
|
+
- [ ] 使用 `YFormily`,模板名和 import 一致。
|
|
256
|
+
- [ ] 只使用文档和源码已公开的 Props/实例方法,未出现 `show-button-group`、`detail-as` 等旧式或虚构 API。
|
|
257
|
+
- [ ] 未生成旧式详情开关 prop。
|
|
258
|
+
- [ ] 未导入业务层 `@formily/antdv` UI 组件。
|
|
259
|
+
- [ ] Schema 层级完整:`FormLayout -> FormGrid -> 字段`,`Submit.onSubmit` 可触发校验。
|
|
260
|
+
- [ ] 所有横向表单已设置固定 `labelWidth` 和 `labelAlign: 'right'`。
|
|
261
|
+
- [ ] `FormGrid` 保持响应式,未用 `minColumns: maxColumns` 固定列数。
|
|
262
|
+
- [ ] 业务列表查询区的查询/重置按钮在外部 `.xxx__search-actions`,按钮行独占下一行并右对齐;缩窄后不会贴在第一行字段旁。
|
|
263
|
+
- [ ] 抽屉/弹窗表单 label 宽度统一、右对齐,窄屏可响应式换列,长字段已占满整行。
|
|
264
|
+
- [ ] 复杂联动已选择表达式、`x-reactions`、`scope` 或 `effects` 中合适的一种。
|
|
265
|
+
- [ ] API 失败仅由 `mutator.ts` 统一提示,hook 的 `else`/`catch` 未重复 `message.error`。
|
|
266
|
+
|
|
267
|
+
## 失败兜底策略
|
|
268
|
+
|
|
269
|
+
- 字段不显示时,先检查 `FormLayout -> FormGrid -> 字段` 层级。
|
|
270
|
+
- 提交不触发时,先检查 `Submit.x-component-props.onSubmit` 或外部 `formRef.submit()`。
|
|
271
|
+
- 查看态显示异常时,先检查 `mode=2`、`detail-options` 和 `detail-<path>` 插槽命名。
|
|
272
|
+
- API 调用被 reject 时,让错误继续中断当前流程;只在 `finally` 恢复 loading,不在业务 hook 重复提示。
|
|
@@ -63,7 +63,7 @@ packages/package.json
|
|
|
63
63
|
- 不修改模板既有的代码生成配置,也不把客户端生成加入 CI。
|
|
64
64
|
- 不得把 `apps/frontend/` 容器根登记为项目根;Harness 内每个前端项目必须有独立的 `apps/frontend/<project>/` 路径。
|
|
65
65
|
- 不把模板示例页面当作业务功能交付。
|
|
66
|
-
- 生成后仍需使用 `yss-page-module-development`、`yss-components`、`api-integration` 等专项 skill 实现业务页面。
|
|
66
|
+
- 生成后仍需使用 `yss-page-module-development`、`yss-components`、`yss-api-integration` 等专项 skill 实现业务页面。
|
|
67
67
|
|
|
68
68
|
## Output
|
|
69
69
|
|
|
@@ -13,7 +13,7 @@ description: Use when YSS Vue 页面涉及 vue-hooks-plus/useRequest、分页、
|
|
|
13
13
|
- Vue Hooks Plus `useRequest`: `https://inhiblabcore.github.io/vue-hooks-plus/zh/hooks/useRequest/quick-start`
|
|
14
14
|
- Local reference index: `references/frontend-docs.md`
|
|
15
15
|
|
|
16
|
-
本技能负责请求执行、分页/筛选参数、选择状态、响应映射和页面级调度。接口导入与 Orval mutator 使用 `api-integration`;布局、组件与交互呈现使用 `yss-components`;高度计算分别使用 `yss-use-table-height` 或 `yss-use-tree-height`。
|
|
16
|
+
本技能负责请求执行、分页/筛选参数、选择状态、响应映射和页面级调度。接口导入与 Orval mutator 使用 `yss-api-integration`;布局、组件与交互呈现使用 `yss-components`;高度计算分别使用 `yss-use-table-height` 或 `yss-use-tree-height`。
|
|
17
17
|
|
|
18
18
|
官方 `@yss-ui/hooks` 当前公开 `useFullscreen`、`useTreeHeight`、`useTableHeight`、`useLoading`、`usePollingTask` 与 `useUrlState`。`useRequest`、防抖、缓存或重试不属于这套公开 YSS Hooks 契约。仅当项目已批准 `vue-hooks-plus` 及其具体版本时,才可使用第 3 节的 `useRequest`;不得把它命名或包装成 YSS 官方 API。
|
|
19
19
|
|
|
@@ -30,7 +30,7 @@ YSS DTO 的可复用 HTTP/JSON 映射由 `.agents/skills/yss-dto/references/open
|
|
|
30
30
|
不使用本 skill 来替代:
|
|
31
31
|
|
|
32
32
|
- `yss-openapi-draft-review`:独立、fail-closed 的语义评审与 P0 追踪。
|
|
33
|
-
- `api-integration`:消费已派生的 JSON,并在目标前端实现仓库中接入既有客户端生成流程。
|
|
33
|
+
- `yss-api-integration`:消费已派生的 JSON,并在目标前端实现仓库中接入既有客户端生成流程。
|
|
34
34
|
- `to-tickets`:在 Freeze 后正式化垂直切片。
|
|
35
35
|
|
|
36
36
|
## 受控工具链
|
|
@@ -77,7 +77,7 @@ pnpm exec redocly bundle \
|
|
|
77
77
|
- 记录 YAML SHA-256、JSON SHA-256、OAS 版本、Redocly CLI 版本与 lockfile 引用、完整命令、metafile、`$ref` 例外以及结果。
|
|
78
78
|
|
|
79
79
|
5. **交给下游前端**
|
|
80
|
-
- 仅当 Freeze、JSON 派生记录和 JSON 校验均通过时,才把派生 JSON 交给 `api-integration` 与目标前端实现仓库。
|
|
80
|
+
- 仅当 Freeze、JSON 派生记录和 JSON 校验均通过时,才把派生 JSON 交给 `yss-api-integration` 与目标前端实现仓库。
|
|
81
81
|
- JSON 的治理产物固定为 `docs/.scratch/<feature>/api/<feature>.json`。跨仓库时只能由批准的 Cross-repo 子合同或项目脚本将同一字节内容物化为 `<frontend>/openapi/openapi.json`,并记录两端相同的 SHA-256 与交接路径。
|
|
82
82
|
- 本模板不读取、修改或验证目标前端项目的客户端生成配置,不执行客户端生成,也不把生成动作加入 CI;目标前端项目在需要时手动运行其既有代码生成命令。
|
|
83
83
|
- 接口调整回写 YAML,而不是编辑 JSON 或生成的 TypeScript。
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: yss-page-module-development
|
|
3
|
-
description:
|
|
3
|
+
description: 指导创建标准 Vue 3 YSS 业务页面模块,覆盖 CRUD、列表、表单、详情、左树右表、组件选型、Orval 接口、主题 Token、原型还原和交付验证。
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# YSS Page Module Development
|
|
@@ -20,7 +20,7 @@ This skill orchestrates page/module creation. Load narrower skills only when the
|
|
|
20
20
|
|
|
21
21
|
- `yss-components` for layout, YTable/YTree/YssFormily/YSplitPane component specifics.
|
|
22
22
|
- `yss-hook` for request, pagination, parameter, and mapping logic.
|
|
23
|
-
- `api-integration` for Orval-generated APIs and submit/list/detail flows.
|
|
23
|
+
- `yss-api-integration` for Orval-generated APIs and submit/list/detail flows.
|
|
24
24
|
- `yss-use-table-height` and `yss-use-tree-height` for height calculation.
|
|
25
25
|
- `yss-formily` for detailed schema behavior.
|
|
26
26
|
|
|
@@ -120,6 +120,16 @@ Use `useTableHeight` and `useTreeHeight` when the page needs available-height ca
|
|
|
120
120
|
- keep action handlers small and explicit
|
|
121
121
|
- preserve existing route, menu, and permission conventions in the repo
|
|
122
122
|
|
|
123
|
+
## YSS business page contract
|
|
124
|
+
|
|
125
|
+
- 页面实现前先按 `component-selection-imports` 判定真实导出;已封装能力优先从 `@yss-ui/components`、`@yss-ui/hooks`、`@yss-ui/utils` 导入。
|
|
126
|
+
- 标准列表使用 `YTable` 的真实 `data`、`columns`、`loading`、`pageable`、`v-model:pagination` 和 `@page-change`;主操作放在 `#toolbar-right`,只有确实需要列设置时才启用 `toolbar-config.custom`。
|
|
127
|
+
- 查询区使用 `YFormily` 渲染字段,查询/重置按钮位于表单外部并在窄屏下保持右下对齐;表单、表格、树和导出细节分别加载 `yss-formily`、`ytable-usage`、`ytree-usage` 和 `file-export-download`。
|
|
128
|
+
- 页面有原型或旧页面参考时先读取 `prototype-page-acceptance`,建立视觉、状态、交互和响应式验收清单;交付时必须逐项对照。
|
|
129
|
+
- 页面和组件的颜色、状态色及暗色模式遵循 `theme-token-usage`,不得硬编码品牌色。
|
|
130
|
+
- Orval API 必须使用当前生成导出和 DTO;错误由 mutator 统一处理,业务 Hook 不重复判断 `success` 或重复提示错误。
|
|
131
|
+
- 列表/树高度按实际分页、工具栏和搜索状态选择 `yss-use-table-height` / `yss-use-tree-height`,不得用固定魔法高度替代。
|
|
132
|
+
|
|
123
133
|
## Deliverables
|
|
124
134
|
|
|
125
135
|
When implementing a page module, the result should usually include:
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# YSS UI 组件来源速查
|
|
2
|
+
|
|
3
|
+
此文件用于业务页面生成前的组件选型。优先使用 YSS UI 已封装组件;未封装能力再从 `ant-design-vue` 导入。
|
|
4
|
+
|
|
5
|
+
## 从 `@yss-ui/components` 导入
|
|
6
|
+
|
|
7
|
+
| 组件 | 适用场景 | 备注 |
|
|
8
|
+
| --- | --- | --- |
|
|
9
|
+
| `YButton` | 操作按钮、权限按钮 | 支持 `permissionCode`、`fallback`、`modifiers`;优先替代 `a-button`。 |
|
|
10
|
+
| `YCard` | 页面容器、区域容器 | 支持 `title`、`extra`、`padding`、Meta 插槽。 |
|
|
11
|
+
| `YTable` | 标准列表、分页、操作列、筛选、字典翻译 | 继承 vxe-table 能力,分页用 AntDV Pagination。 |
|
|
12
|
+
| `YEditTable` | 可编辑表格 | 需要底部添加按钮高度时配合 `yss-use-table-height`。 |
|
|
13
|
+
| `YTree` | 左侧分类树、组织树、搜索过滤树 | 节点操作用 `getNodeActions`。 |
|
|
14
|
+
| `YSplitPane` | 左树右表、可拖拽分割布局 | 左右或上下区域分割。 |
|
|
15
|
+
| `YFormily` | JSON Schema 表单、新增/编辑/查看 | 默认表单方案。 |
|
|
16
|
+
| `YssFormily` | 表单兼容导出 | 仅用于维护历史代码;新代码统一使用 `YFormily`。 |
|
|
17
|
+
| `YConditionBuilder` | 条件构建器、规则配置 | 常用于数据质量、筛选条件配置。 |
|
|
18
|
+
| `YFileImport` | 文件导入 | Formily schema 内也可用 `YFileImport`。 |
|
|
19
|
+
| `YMonaco` | 代码编辑器 | SQL、JSON、脚本编辑。 |
|
|
20
|
+
| `YMonacoDiff` | 代码 Diff | 变更对比场景。 |
|
|
21
|
+
| `YCron` | Cron 表达式编辑 | 定时任务配置。 |
|
|
22
|
+
| `YMonthCalendar` | 月度日历、节假日和连续区间 | 支持单元格、右键菜单和头部插槽。 |
|
|
23
|
+
| `YEcharts` | 图表展示 | 业务图表封装。 |
|
|
24
|
+
| `YSheet` | 协同/类 Excel 表格 | 复杂表格编辑。 |
|
|
25
|
+
| `AuthorityDropdown` | 权限相关下拉 | 可从 `@yss-ui/components` 导入。 |
|
|
26
|
+
|
|
27
|
+
## 回退到 `ant-design-vue`
|
|
28
|
+
|
|
29
|
+
未由 `@yss-ui/components` 导出的组件直接从 `ant-design-vue` 导入,不臆造 Y 前缀。
|
|
30
|
+
|
|
31
|
+
## 禁止规则
|
|
32
|
+
|
|
33
|
+
- 不要编造未导出的 Y 前缀组件。
|
|
34
|
+
- 业务层不要从 `@formily/antdv` 导入 UI 适配组件。
|