create-yss-spec 2.1.15 → 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 +6 -2
- package/package.json +1 -1
- package/src/cli.js +276 -15
- 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/cross-repo-implementation-routing/SKILL.md +2 -2
- 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/implementation-repo-onboarding/SKILL.md +5 -5
- 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/llm-wiki/SKILL.md +1 -1
- package/template/.agents/skills/llm-wiki/references/discover.md +1 -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-ddd-scaffold-generator/SKILL.md +1 -1
- package/template/.agents/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.mjs +30 -3
- package/template/.agents/skills/yss-ddd-scaffold-generator/scripts/scaffold-generator.test.mjs +52 -0
- 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 +2 -2
- 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/matt-yss-adapter.md +1 -1
- package/template/.agents/skills/yss-product-lifecycle/references/orchestration-contract.yaml +86 -1
- package/template/.agents/skills/yss-product-lifecycle/references/orchestration.md +2 -0
- package/template/.agents/skills/yss-product-lifecycle/references/state-model.md +1 -1
- package/template/.agents/skills/yss-router/SKILL.md +1 -1
- package/template/.agents/skills/yss-router/references/boundaries.md +1 -1
- package/template/.agents/skills/yss-router/references/router-contract.yaml +26 -2
- package/template/.agents/skills/yss-router/references/slice-implementation-contract.md +1 -1
- 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/cross-repo-implementation-routing/SKILL.md +2 -2
- 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/implementation-repo-onboarding/SKILL.md +5 -5
- 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/llm-wiki/SKILL.md +1 -1
- package/template/.claude/skills/llm-wiki/references/discover.md +1 -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-ddd-scaffold-generator/SKILL.md +1 -1
- package/template/.claude/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.mjs +30 -3
- package/template/.claude/skills/yss-ddd-scaffold-generator/scripts/scaffold-generator.test.mjs +52 -0
- 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 +2 -2
- 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/matt-yss-adapter.md +1 -1
- package/template/.claude/skills/yss-product-lifecycle/references/orchestration-contract.yaml +86 -1
- package/template/.claude/skills/yss-product-lifecycle/references/orchestration.md +2 -0
- package/template/.claude/skills/yss-product-lifecycle/references/state-model.md +1 -1
- package/template/.claude/skills/yss-router/SKILL.md +1 -1
- package/template/.claude/skills/yss-router/references/boundaries.md +1 -1
- package/template/.claude/skills/yss-router/references/router-contract.yaml +26 -2
- package/template/.claude/skills/yss-router/references/slice-implementation-contract.md +1 -1
- 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/cross-repo-implementation-routing/SKILL.md +2 -2
- 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/implementation-repo-onboarding/SKILL.md +5 -5
- 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/llm-wiki/SKILL.md +1 -1
- package/template/.codex/skills/llm-wiki/references/discover.md +1 -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-ddd-scaffold-generator/SKILL.md +1 -1
- package/template/.codex/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.mjs +30 -3
- package/template/.codex/skills/yss-ddd-scaffold-generator/scripts/scaffold-generator.test.mjs +52 -0
- 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 +2 -2
- 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/matt-yss-adapter.md +1 -1
- package/template/.codex/skills/yss-product-lifecycle/references/orchestration-contract.yaml +86 -1
- package/template/.codex/skills/yss-product-lifecycle/references/orchestration.md +2 -0
- package/template/.codex/skills/yss-product-lifecycle/references/state-model.md +1 -1
- package/template/.codex/skills/yss-router/SKILL.md +1 -1
- package/template/.codex/skills/yss-router/references/boundaries.md +1 -1
- package/template/.codex/skills/yss-router/references/router-contract.yaml +26 -2
- package/template/.codex/skills/yss-router/references/slice-implementation-contract.md +1 -1
- 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/cross-repo-implementation-routing/SKILL.md +2 -2
- 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/implementation-repo-onboarding/SKILL.md +5 -5
- 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/llm-wiki/SKILL.md +1 -1
- package/template/.cursor/skills/llm-wiki/references/discover.md +1 -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-ddd-scaffold-generator/SKILL.md +1 -1
- package/template/.cursor/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.mjs +30 -3
- package/template/.cursor/skills/yss-ddd-scaffold-generator/scripts/scaffold-generator.test.mjs +52 -0
- 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 +2 -2
- 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/matt-yss-adapter.md +1 -1
- package/template/.cursor/skills/yss-product-lifecycle/references/orchestration-contract.yaml +86 -1
- package/template/.cursor/skills/yss-product-lifecycle/references/orchestration.md +2 -0
- package/template/.cursor/skills/yss-product-lifecycle/references/state-model.md +1 -1
- package/template/.cursor/skills/yss-router/SKILL.md +1 -1
- package/template/.cursor/skills/yss-router/references/boundaries.md +1 -1
- package/template/.cursor/skills/yss-router/references/router-contract.yaml +26 -2
- package/template/.cursor/skills/yss-router/references/slice-implementation-contract.md +1 -1
- 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/cross-repo-implementation-routing/SKILL.md +2 -2
- 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/implementation-repo-onboarding/SKILL.md +5 -5
- 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/llm-wiki/SKILL.md +1 -1
- package/template/.hermes/skills/llm-wiki/references/discover.md +1 -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-ddd-scaffold-generator/SKILL.md +1 -1
- package/template/.hermes/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.mjs +30 -3
- package/template/.hermes/skills/yss-ddd-scaffold-generator/scripts/scaffold-generator.test.mjs +52 -0
- 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 +2 -2
- 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/matt-yss-adapter.md +1 -1
- package/template/.hermes/skills/yss-product-lifecycle/references/orchestration-contract.yaml +86 -1
- package/template/.hermes/skills/yss-product-lifecycle/references/orchestration.md +2 -0
- package/template/.hermes/skills/yss-product-lifecycle/references/state-model.md +1 -1
- package/template/.hermes/skills/yss-router/SKILL.md +1 -1
- package/template/.hermes/skills/yss-router/references/boundaries.md +1 -1
- package/template/.hermes/skills/yss-router/references/router-contract.yaml +26 -2
- package/template/.hermes/skills/yss-router/references/slice-implementation-contract.md +1 -1
- 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/cross-repo-implementation-routing/SKILL.md +2 -2
- 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/implementation-repo-onboarding/SKILL.md +5 -5
- 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/llm-wiki/SKILL.md +1 -1
- package/template/.pi/skills/llm-wiki/references/discover.md +1 -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-ddd-scaffold-generator/SKILL.md +1 -1
- package/template/.pi/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.mjs +30 -3
- package/template/.pi/skills/yss-ddd-scaffold-generator/scripts/scaffold-generator.test.mjs +52 -0
- 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 +2 -2
- 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/matt-yss-adapter.md +1 -1
- package/template/.pi/skills/yss-product-lifecycle/references/orchestration-contract.yaml +86 -1
- package/template/.pi/skills/yss-product-lifecycle/references/orchestration.md +2 -0
- package/template/.pi/skills/yss-product-lifecycle/references/state-model.md +1 -1
- package/template/.pi/skills/yss-router/SKILL.md +1 -1
- package/template/.pi/skills/yss-router/references/boundaries.md +1 -1
- package/template/.pi/skills/yss-router/references/router-contract.yaml +26 -2
- package/template/.pi/skills/yss-router/references/slice-implementation-contract.md +1 -1
- 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/cross-repo-implementation-routing/SKILL.md +2 -2
- 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/implementation-repo-onboarding/SKILL.md +5 -5
- 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/llm-wiki/SKILL.md +1 -1
- package/template/.qoder/skills/llm-wiki/references/discover.md +1 -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-ddd-scaffold-generator/SKILL.md +1 -1
- package/template/.qoder/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.mjs +30 -3
- package/template/.qoder/skills/yss-ddd-scaffold-generator/scripts/scaffold-generator.test.mjs +52 -0
- 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 +2 -2
- 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/matt-yss-adapter.md +1 -1
- package/template/.qoder/skills/yss-product-lifecycle/references/orchestration-contract.yaml +86 -1
- package/template/.qoder/skills/yss-product-lifecycle/references/orchestration.md +2 -0
- package/template/.qoder/skills/yss-product-lifecycle/references/state-model.md +1 -1
- package/template/.qoder/skills/yss-router/SKILL.md +1 -1
- package/template/.qoder/skills/yss-router/references/boundaries.md +1 -1
- package/template/.qoder/skills/yss-router/references/router-contract.yaml +26 -2
- package/template/.qoder/skills/yss-router/references/slice-implementation-contract.md +1 -1
- 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/cross-repo-implementation-routing/SKILL.md +2 -2
- 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/implementation-repo-onboarding/SKILL.md +5 -5
- 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/llm-wiki/SKILL.md +1 -1
- package/template/.trae/skills/llm-wiki/references/discover.md +1 -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-ddd-scaffold-generator/SKILL.md +1 -1
- package/template/.trae/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.mjs +30 -3
- package/template/.trae/skills/yss-ddd-scaffold-generator/scripts/scaffold-generator.test.mjs +52 -0
- 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 +2 -2
- 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/matt-yss-adapter.md +1 -1
- package/template/.trae/skills/yss-product-lifecycle/references/orchestration-contract.yaml +86 -1
- package/template/.trae/skills/yss-product-lifecycle/references/orchestration.md +2 -0
- package/template/.trae/skills/yss-product-lifecycle/references/state-model.md +1 -1
- package/template/.trae/skills/yss-router/SKILL.md +1 -1
- package/template/.trae/skills/yss-router/references/boundaries.md +1 -1
- package/template/.trae/skills/yss-router/references/router-contract.yaml +26 -2
- package/template/.trae/skills/yss-router/references/slice-implementation-contract.md +1 -1
- 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/AGENTS.md +5 -5
- package/template/CONTEXT.md +3 -2
- 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/process/implementation-repo-integration.md +24 -2
- package/template/docs/templates/cross-repo-slice-template.md +15 -0
- package/template/docs/templates/implementation-repo-registry-template.md +8 -3
- package/template/docs/templates/implementation-routing-template.md +3 -3
- package/template/docs/user-guide//344/272/247/345/223/201/347/224/237/345/221/275/345/221/250/346/234/237/345/267/245/344/275/234/346/265/201.md +2 -2
- 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/git-submodule-fixtures.mjs +58 -0
- package/template/scripts/lib/repository-scope-policy.mjs +456 -0
- package/template/scripts/lib/scenario-checks.mjs +32 -1
- 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/repository-scope-policy +16 -0
- package/template/scripts/verify-repository-scope-scenarios +239 -0
- package/template/scripts/verify-scaffold-generator-scenarios +54 -0
- package/template/scripts/verify-skill-governance +10 -0
- package/template/scripts/verify-template +4 -2
- package/template/skills-lock.json +289 -33
- package/template.manifest.json +6 -5
- 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/environment.json +0 -5
- 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/.github/workflows/template-node-tooling.yml +0 -61
- 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
- package/template/wiki/.wiki-manifest.json +0 -390
- package/template/wiki/raw/AGENTS.md +0 -122
- package/template/wiki/raw/CONTEXT.md +0 -80
- package/template/wiki/raw/README.md +0 -130
- package/template/wiki/raw/adr-0002-repository-mode.md +0 -3
- package/template/wiki/raw/create-yss-spec-repository-mode-contract.md +0 -95
- package/template/wiki/raw/harness-process-tailoring.md +0 -64
- package/template/wiki/raw/implementation-repo-integration.md +0 -62
- package/template/wiki/raw/issue-tracker.md +0 -135
- package/template/wiki/raw/lifecycle-registry.yaml +0 -369
- package/template/wiki/raw/maintenance-intensity.yaml +0 -25
- package/template/wiki/raw/skills-lock-names.md +0 -93
- package/template/wiki/raw/skills-maintenance.md +0 -90
- package/template/wiki/raw/spec-template.md +0 -102
- package/template/wiki/raw/triage-labels.md +0 -15
- package/template/wiki/raw/vertical-slice-ticket-template.md +0 -132
- package/template/wiki/raw/yss-project.yaml +0 -2
- package/template/wiki/raw/yss-skill-registry.yaml +0 -510
- package/template/wiki/wiki/Agent/345/205/245/345/217/243/350/247/204/345/210/231.md +0 -21
- package/template/wiki/wiki/CLAUDE.md +0 -28
- package/template/wiki/wiki/Fresh/351/252/214/350/257/201/344/270/216/347/213/254/347/253/213/345/256/241/346/237/245.md +0 -19
- package/template/wiki/wiki/LLM Wiki.md +0 -30
- package/template/wiki/wiki/Matt/346/212/200/350/203/275/344/275/223/347/263/273.md +0 -21
- package/template/wiki/wiki/OpenAPI/345/245/221/347/272/246.md +0 -20
- package/template/wiki/wiki/SpecDelta.md +0 -19
- package/template/wiki/wiki/Spec/345/237/272/347/272/277.md +0 -22
- package/template/wiki/wiki/Ticket/344/270/216/346/265/201/347/250/213/347/212/266/346/200/201.md +0 -21
- package/template/wiki/wiki/YSS/345/267/245/347/250/213/346/212/200/350/203/275/344/275/223/347/263/273.md +0 -23
- package/template/wiki/wiki/YSS/350/267/257/347/224/261/344/270/216/345/220/210/345/220/214/347/274/226/350/257/221.md +0 -20
- package/template/wiki/wiki/concept-table.md +0 -9
- package/template/wiki/wiki/index.md +0 -41
- package/template/wiki/wiki/log.md +0 -51
- package/template/wiki/wiki//344/272/247/345/223/201/347/240/224/345/217/221/347/224/237/345/221/275/345/221/250/346/234/237.md +0 -20
- package/template/wiki/wiki//344/272/247/345/223/201/350/256/276/350/256/241/345/275/261/345/223/215/344/270/216/345/216/237/345/236/213.md +0 -19
- package/template/wiki/wiki//344/273/223/345/272/223/350/272/253/344/273/275/344/270/216/350/267/257/347/224/261.md +0 -20
- package/template/wiki/wiki//345/210/207/347/211/207/345/256/236/347/216/260/345/220/210/345/220/214.md +0 -21
- package/template/wiki/wiki//345/236/202/347/233/264/345/210/207/347/211/207Ticket.md +0 -23
- package/template/wiki/wiki//345/244/215/347/233/230/344/270/216/346/235/203/345/250/201/350/265/204/344/272/247/344/277/256/350/256/242.md +0 -20
- package/template/wiki/wiki//345/256/236/347/216/260/344/273/223/345/272/223/344/270/216/350/267/250/344/273/223/345/272/223/345/245/221/347/272/246.md +0 -22
- package/template/wiki/wiki//345/275/261/345/223/215/351/235/242/345/210/206/350/257/212/344/270/216/346/265/201/347/250/213/350/243/201/345/211/252.md +0 -20
- package/template/wiki/wiki//346/212/200/350/203/275/346/212/225/345/275/261/344/270/216/351/224/201/345/256/232.md +0 -23
- package/template/wiki/wiki//346/235/241/344/273/266/345/274/272/345/210/266/351/227/250/347/246/201.md +0 -18
- package/template/wiki/wiki//346/250/241/346/235/277/345/217/221/345/270/203/351/227/250/347/246/201/344/270/216/351/252/214/350/257/201.md +0 -22
- package/template/wiki/wiki//346/250/241/346/235/277/346/200/273/350/247/210.md +0 -20
- package/template/wiki/wiki//346/250/241/346/235/277/347/273/264/346/212/244/346/265/201/347/250/213.md +0 -19
|
@@ -0,0 +1,486 @@
|
|
|
1
|
+
# YFormily 代码示例库
|
|
2
|
+
|
|
3
|
+
本参考只保留可直接复用且已与当前源码核对的模式。基础 Props、实例方法与详情配置以最新 `llms-full.txt` 和 `packages/components/src/formily` 为准;不要从旧 demo 推断未公开 API。
|
|
4
|
+
|
|
5
|
+
## 目录
|
|
6
|
+
|
|
7
|
+
1. [基础表单与提交](#1-基础表单与提交)
|
|
8
|
+
2. [表达式显隐与禁用](#2-表达式显隐与禁用)
|
|
9
|
+
3. [x-reactions 级联选项](#3-x-reactions-级联选项)
|
|
10
|
+
4. [新增编辑查看与双通道插槽](#4-新增编辑查看与双通道插槽)
|
|
11
|
+
5. [Schema Slot 自定义字段](#5-schema-slot-自定义字段)
|
|
12
|
+
6. [分步表单路由](#6-分步表单路由)
|
|
13
|
+
7. [动态 Schema 与动态插槽](#7-动态-schema-与动态插槽)
|
|
14
|
+
8. [Orval 提交与错误处理](#8-orval-提交与错误处理)
|
|
15
|
+
|
|
16
|
+
## 1. 基础表单与提交
|
|
17
|
+
|
|
18
|
+
`Submit` 必须通过表达式拿到 `onSubmit`。业务列表查询区不使用 schema 内按钮组,查询/重置按钮应放到外部操作区。
|
|
19
|
+
|
|
20
|
+
```vue
|
|
21
|
+
<script setup lang="ts">
|
|
22
|
+
import { YFormily, type ISchema } from '@yss-ui/components';
|
|
23
|
+
|
|
24
|
+
/** 表单提交事件。 */
|
|
25
|
+
const emit = defineEmits<{ submit: [values: Record<string, any>] }>();
|
|
26
|
+
|
|
27
|
+
/** 校验通过后向上层提交。 */
|
|
28
|
+
const onSubmit = (values: Record<string, any>) => {
|
|
29
|
+
emit('submit', values);
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
/** 纯 Formily 表单 Schema。 */
|
|
33
|
+
const schema: ISchema = {
|
|
34
|
+
type: 'object',
|
|
35
|
+
properties: {
|
|
36
|
+
layout: {
|
|
37
|
+
type: 'void',
|
|
38
|
+
'x-component': 'FormLayout',
|
|
39
|
+
'x-component-props': { layout: 'horizontal', labelWidth: 120, labelAlign: 'right' },
|
|
40
|
+
properties: {
|
|
41
|
+
grid: {
|
|
42
|
+
type: 'void',
|
|
43
|
+
'x-component': 'FormGrid',
|
|
44
|
+
'x-component-props': { maxColumns: 2, minColumns: 1, minWidth: 320 },
|
|
45
|
+
properties: {
|
|
46
|
+
name: {
|
|
47
|
+
type: 'string',
|
|
48
|
+
title: '姓名',
|
|
49
|
+
required: true,
|
|
50
|
+
'x-decorator': 'FormItem',
|
|
51
|
+
'x-component': 'Input',
|
|
52
|
+
'x-component-props': { placeholder: '请输入姓名', allowClear: true },
|
|
53
|
+
'x-validator': [
|
|
54
|
+
{ required: true, whitespace: true, message: '请输入姓名' },
|
|
55
|
+
{
|
|
56
|
+
validator: (value: string) => {
|
|
57
|
+
const str = (value || '').trim();
|
|
58
|
+
if (!str) return true;
|
|
59
|
+
if (str.length < 2 || str.length > 50) return '姓名长度需在2到50之间';
|
|
60
|
+
return true;
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
],
|
|
64
|
+
},
|
|
65
|
+
gender: {
|
|
66
|
+
type: 'string',
|
|
67
|
+
title: '性别',
|
|
68
|
+
enum: [
|
|
69
|
+
{ label: '男', value: 'male' },
|
|
70
|
+
{ label: '女', value: 'female' },
|
|
71
|
+
],
|
|
72
|
+
'x-decorator': 'FormItem',
|
|
73
|
+
'x-component': 'Select',
|
|
74
|
+
},
|
|
75
|
+
actions: {
|
|
76
|
+
type: 'void',
|
|
77
|
+
'x-decorator': 'FormItem',
|
|
78
|
+
'x-decorator-props': { gridSpan: 2, colon: false },
|
|
79
|
+
'x-component': 'AutoButtonGroup',
|
|
80
|
+
properties: {
|
|
81
|
+
reset: { type: 'void', 'x-component': 'Reset', 'x-content': '重置' },
|
|
82
|
+
submit: {
|
|
83
|
+
type: 'void',
|
|
84
|
+
'x-component': 'Submit',
|
|
85
|
+
'x-content': '提交',
|
|
86
|
+
'x-component-props': { onSubmit: '{{ onSubmit }}' },
|
|
87
|
+
},
|
|
88
|
+
},
|
|
89
|
+
},
|
|
90
|
+
},
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
},
|
|
94
|
+
},
|
|
95
|
+
};
|
|
96
|
+
</script>
|
|
97
|
+
|
|
98
|
+
<template>
|
|
99
|
+
<YFormily :schema="schema" :scope="{ onSubmit }" :initial-values="{ gender: 'male' }" />
|
|
100
|
+
</template>
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
## 2. 表达式显隐与禁用
|
|
104
|
+
|
|
105
|
+
只依赖 `$values` 的显隐和禁用直接写表达式,初始化和后续变更都会生效,不要为此创建 `effects`。
|
|
106
|
+
|
|
107
|
+
```vue
|
|
108
|
+
<script setup lang="ts">
|
|
109
|
+
import { YFormily, type ISchema } from '@yss-ui/components';
|
|
110
|
+
|
|
111
|
+
/** 简单表达式联动 Schema。 */
|
|
112
|
+
const schema: ISchema = {
|
|
113
|
+
type: 'object',
|
|
114
|
+
properties: {
|
|
115
|
+
layout: {
|
|
116
|
+
type: 'void',
|
|
117
|
+
'x-component': 'FormLayout',
|
|
118
|
+
'x-component-props': { layout: 'horizontal', labelWidth: 120, labelAlign: 'right' },
|
|
119
|
+
properties: {
|
|
120
|
+
grid: {
|
|
121
|
+
type: 'void',
|
|
122
|
+
'x-component': 'FormGrid',
|
|
123
|
+
'x-component-props': { maxColumns: 2, minColumns: 1, minWidth: 320 },
|
|
124
|
+
properties: {
|
|
125
|
+
needCompany: {
|
|
126
|
+
type: 'boolean',
|
|
127
|
+
title: '是否任职',
|
|
128
|
+
'x-decorator': 'FormItem',
|
|
129
|
+
'x-component': 'Switch',
|
|
130
|
+
},
|
|
131
|
+
companyName: {
|
|
132
|
+
type: 'string',
|
|
133
|
+
title: '公司名称',
|
|
134
|
+
required: true,
|
|
135
|
+
'x-decorator': 'FormItem',
|
|
136
|
+
'x-component': 'Input',
|
|
137
|
+
'x-visible': '{{ $values.needCompany === true }}',
|
|
138
|
+
},
|
|
139
|
+
systemCode: {
|
|
140
|
+
type: 'string',
|
|
141
|
+
title: '系统编码',
|
|
142
|
+
'x-decorator': 'FormItem',
|
|
143
|
+
'x-component': 'Input',
|
|
144
|
+
'x-disabled': '{{ $values.needCompany === false }}',
|
|
145
|
+
},
|
|
146
|
+
},
|
|
147
|
+
},
|
|
148
|
+
},
|
|
149
|
+
},
|
|
150
|
+
},
|
|
151
|
+
};
|
|
152
|
+
</script>
|
|
153
|
+
|
|
154
|
+
<template>
|
|
155
|
+
<YFormily :schema="schema" :initial-values="{ needCompany: false }" />
|
|
156
|
+
</template>
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
## 3. x-reactions 级联选项
|
|
160
|
+
|
|
161
|
+
级联项更新时,仅当旧值不在新选项中才清空。无条件 `field.value = undefined` 会破坏合法回填值。
|
|
162
|
+
|
|
163
|
+
```vue
|
|
164
|
+
<script setup lang="ts">
|
|
165
|
+
import { YFormily, type Field, type ISchema } from '@yss-ui/components';
|
|
166
|
+
|
|
167
|
+
/** 城市选项。 */
|
|
168
|
+
interface CityOption {
|
|
169
|
+
label: string;
|
|
170
|
+
value: string;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
/** 省份到城市的静态映射。 */
|
|
174
|
+
const cityMap: Record<string, CityOption[]> = {
|
|
175
|
+
zhejiang: [{ label: '杭州', value: 'hangzhou' }],
|
|
176
|
+
jiangsu: [{ label: '南京', value: 'nanjing' }],
|
|
177
|
+
};
|
|
178
|
+
|
|
179
|
+
/** 基于省份同步当前城市字段。 */
|
|
180
|
+
const syncCityReaction = (field: Field) => {
|
|
181
|
+
const province = field.query('province').get('value') as string | undefined;
|
|
182
|
+
const options = province ? cityMap[province] ?? [] : [];
|
|
183
|
+
field.dataSource = options;
|
|
184
|
+
if (!options.some(item => item.value === field.value)) field.value = undefined;
|
|
185
|
+
};
|
|
186
|
+
|
|
187
|
+
/** 级联选择 Schema。 */
|
|
188
|
+
const schema: ISchema = {
|
|
189
|
+
type: 'object',
|
|
190
|
+
properties: {
|
|
191
|
+
layout: {
|
|
192
|
+
type: 'void',
|
|
193
|
+
'x-component': 'FormLayout',
|
|
194
|
+
'x-component-props': { layout: 'horizontal', labelWidth: 120, labelAlign: 'right' },
|
|
195
|
+
properties: {
|
|
196
|
+
grid: {
|
|
197
|
+
type: 'void',
|
|
198
|
+
'x-component': 'FormGrid',
|
|
199
|
+
'x-component-props': { maxColumns: 2, minColumns: 1, minWidth: 320 },
|
|
200
|
+
properties: {
|
|
201
|
+
province: {
|
|
202
|
+
type: 'string',
|
|
203
|
+
title: '省份',
|
|
204
|
+
enum: [
|
|
205
|
+
{ label: '浙江', value: 'zhejiang' },
|
|
206
|
+
{ label: '江苏', value: 'jiangsu' },
|
|
207
|
+
],
|
|
208
|
+
'x-decorator': 'FormItem',
|
|
209
|
+
'x-component': 'Select',
|
|
210
|
+
},
|
|
211
|
+
city: {
|
|
212
|
+
type: 'string',
|
|
213
|
+
title: '城市',
|
|
214
|
+
'x-decorator': 'FormItem',
|
|
215
|
+
'x-component': 'Select',
|
|
216
|
+
'x-reactions': syncCityReaction,
|
|
217
|
+
},
|
|
218
|
+
},
|
|
219
|
+
},
|
|
220
|
+
},
|
|
221
|
+
},
|
|
222
|
+
},
|
|
223
|
+
};
|
|
224
|
+
</script>
|
|
225
|
+
|
|
226
|
+
<template>
|
|
227
|
+
<YFormily :schema="schema" :initial-values="{ province: 'zhejiang', city: 'hangzhou' }" />
|
|
228
|
+
</template>
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
需要首屏与变更都执行的表单级副作用时,读取 `../../formily-linkage-effects/SKILL.md`,成对使用 `onFieldInit` 与 `onFieldValueChange`。
|
|
232
|
+
|
|
233
|
+
## 4. 新增编辑查看与双通道插槽
|
|
234
|
+
|
|
235
|
+
`mode=2` 直接进入 Descriptions;不存在 `detail-as` 开关。默认响应式详情用 `maxColumns/minColumns/minWidth`,`columns` 只在 `responsive: false` 时生效。
|
|
236
|
+
|
|
237
|
+
```vue
|
|
238
|
+
<script setup lang="ts">
|
|
239
|
+
import { YMonaco, YFormily, type ISchema } from '@yss-ui/components';
|
|
240
|
+
import { ref } from 'vue';
|
|
241
|
+
|
|
242
|
+
/** 表单模式。 */
|
|
243
|
+
type FormMode = 0 | 1 | 2;
|
|
244
|
+
|
|
245
|
+
/** 当前模式。 */
|
|
246
|
+
const mode = ref<FormMode>(1);
|
|
247
|
+
/** 编辑与查看回填值。 */
|
|
248
|
+
const initialValues = { user: { email: 'user@example.com' }, sql: 'select 1' };
|
|
249
|
+
/** 三态共用 Schema。 */
|
|
250
|
+
const schema: ISchema = {
|
|
251
|
+
type: 'object',
|
|
252
|
+
properties: {
|
|
253
|
+
layout: {
|
|
254
|
+
type: 'void',
|
|
255
|
+
'x-component': 'FormLayout',
|
|
256
|
+
'x-component-props': { layout: 'horizontal', labelWidth: 120, labelAlign: 'right' },
|
|
257
|
+
properties: {
|
|
258
|
+
grid: {
|
|
259
|
+
type: 'void',
|
|
260
|
+
'x-component': 'FormGrid',
|
|
261
|
+
'x-component-props': { maxColumns: 2, minColumns: 1, minWidth: 320 },
|
|
262
|
+
properties: {
|
|
263
|
+
user: {
|
|
264
|
+
type: 'object',
|
|
265
|
+
properties: {
|
|
266
|
+
email: {
|
|
267
|
+
type: 'string',
|
|
268
|
+
title: '邮箱',
|
|
269
|
+
'x-decorator': 'FormItem',
|
|
270
|
+
'x-component': 'Input',
|
|
271
|
+
},
|
|
272
|
+
},
|
|
273
|
+
},
|
|
274
|
+
sql: {
|
|
275
|
+
type: 'string',
|
|
276
|
+
title: 'SQL',
|
|
277
|
+
'x-decorator': 'FormItem',
|
|
278
|
+
'x-decorator-props': { gridSpan: 2 },
|
|
279
|
+
'x-component': 'Slot',
|
|
280
|
+
'x-component-props': { name: 'sql' },
|
|
281
|
+
},
|
|
282
|
+
},
|
|
283
|
+
},
|
|
284
|
+
},
|
|
285
|
+
},
|
|
286
|
+
},
|
|
287
|
+
};
|
|
288
|
+
</script>
|
|
289
|
+
|
|
290
|
+
<template>
|
|
291
|
+
<YFormily
|
|
292
|
+
:key="mode"
|
|
293
|
+
:schema="schema"
|
|
294
|
+
:initial-values="initialValues"
|
|
295
|
+
:mode="mode"
|
|
296
|
+
:detail-options="{ bordered: true, maxColumns: 2, minColumns: 1, minWidth: 320 }"
|
|
297
|
+
>
|
|
298
|
+
<template #sql="{ value, onChange }">
|
|
299
|
+
<YMonaco :model-value="value" language="sql" @change="onChange" />
|
|
300
|
+
</template>
|
|
301
|
+
<template #detail-user-email="{ value }">
|
|
302
|
+
<a :href="`mailto:${value}`">{{ value }}</a>
|
|
303
|
+
</template>
|
|
304
|
+
<template #detail-sql="{ value }">
|
|
305
|
+
<YMonaco :model-value="value" language="sql" readonly />
|
|
306
|
+
</template>
|
|
307
|
+
</YFormily>
|
|
308
|
+
</template>
|
|
309
|
+
```
|
|
310
|
+
|
|
311
|
+
## 5. Schema Slot 自定义字段
|
|
312
|
+
|
|
313
|
+
`value/onChange` 默认注入;只有确实需要 `field` 或全表值时才配置 `params: ['field', '$values']`。
|
|
314
|
+
|
|
315
|
+
```vue
|
|
316
|
+
<script setup lang="ts">
|
|
317
|
+
import { YButton, YFormily, type ISchema } from '@yss-ui/components';
|
|
318
|
+
import { Input as AInput } from 'ant-design-vue';
|
|
319
|
+
|
|
320
|
+
/** 模拟选人并把主键写回字段。 */
|
|
321
|
+
const selectUser = (onChange: (value?: string) => void) => {
|
|
322
|
+
onChange('user-001');
|
|
323
|
+
};
|
|
324
|
+
|
|
325
|
+
/** 自定义选人字段 Schema。 */
|
|
326
|
+
const schema: ISchema = {
|
|
327
|
+
type: 'object',
|
|
328
|
+
properties: {
|
|
329
|
+
layout: {
|
|
330
|
+
type: 'void',
|
|
331
|
+
'x-component': 'FormLayout',
|
|
332
|
+
'x-component-props': { layout: 'horizontal', labelWidth: 120, labelAlign: 'right' },
|
|
333
|
+
properties: {
|
|
334
|
+
grid: {
|
|
335
|
+
type: 'void',
|
|
336
|
+
'x-component': 'FormGrid',
|
|
337
|
+
'x-component-props': { maxColumns: 2, minColumns: 1, minWidth: 320 },
|
|
338
|
+
properties: {
|
|
339
|
+
category: {
|
|
340
|
+
type: 'string',
|
|
341
|
+
title: '分类',
|
|
342
|
+
'x-decorator': 'FormItem',
|
|
343
|
+
'x-component': 'Input',
|
|
344
|
+
},
|
|
345
|
+
userId: {
|
|
346
|
+
type: 'string',
|
|
347
|
+
title: '关联用户',
|
|
348
|
+
'x-decorator': 'FormItem',
|
|
349
|
+
'x-component': 'Slot',
|
|
350
|
+
'x-component-props': { name: 'userSelector', params: ['$values'] },
|
|
351
|
+
},
|
|
352
|
+
},
|
|
353
|
+
},
|
|
354
|
+
},
|
|
355
|
+
},
|
|
356
|
+
},
|
|
357
|
+
};
|
|
358
|
+
</script>
|
|
359
|
+
|
|
360
|
+
<template>
|
|
361
|
+
<YFormily :schema="schema">
|
|
362
|
+
<template #userSelector="{ value, onChange, values }">
|
|
363
|
+
<AInput :value="value" readonly />
|
|
364
|
+
<YButton @click="selectUser(onChange)">选择用户</YButton>
|
|
365
|
+
<YButton v-if="value" @click="onChange(undefined)">清除</YButton>
|
|
366
|
+
<span>当前分类:{{ values.category ?? '无' }}</span>
|
|
367
|
+
</template>
|
|
368
|
+
</YFormily>
|
|
369
|
+
</template>
|
|
370
|
+
```
|
|
371
|
+
|
|
372
|
+
## 6. 分步表单路由
|
|
373
|
+
|
|
374
|
+
完整实现读取 `../../formily-step-flow/SKILL.md`,必须遵循以下边界:
|
|
375
|
+
|
|
376
|
+
- 从 `ant-design-vue` 导入 `Steps as ASteps`;组件库没有 `YSteps`。
|
|
377
|
+
- 每步使用独立 YFormily ref 与 `v-model`,统一收敛到一个 `reactive` 数据源。
|
|
378
|
+
- `await formRef.submit()` 成功后前进,校验失败会 reject;不要写 `ok !== false`。
|
|
379
|
+
- 确认步骤读取前序数据的 `computed` 聚合,不要绑定空的 `step3`。
|
|
380
|
+
- 最终提交只聚合真实业务步骤;API 错误交给 `mutator.ts` 提示。
|
|
381
|
+
|
|
382
|
+
## 7. 动态 Schema 与动态插槽
|
|
383
|
+
|
|
384
|
+
动态 schema 优先由 `computed` 派生,避免在 `onMounted` 中清空后原地修改深层 `properties`。
|
|
385
|
+
|
|
386
|
+
```vue
|
|
387
|
+
<script setup lang="ts">
|
|
388
|
+
import { YMonaco, YFormily, type ISchema } from '@yss-ui/components';
|
|
389
|
+
import { computed, ref } from 'vue';
|
|
390
|
+
|
|
391
|
+
/** 后端动态字段描述。 */
|
|
392
|
+
interface PluginParam {
|
|
393
|
+
field: string;
|
|
394
|
+
name: string;
|
|
395
|
+
type: 'string' | 'boolean' | 'input-code';
|
|
396
|
+
required?: boolean;
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
/** 动态字段配置。 */
|
|
400
|
+
const pluginParams = ref<PluginParam[]>([
|
|
401
|
+
{ field: 'tableName', name: '表名', type: 'string', required: true },
|
|
402
|
+
{ field: 'enabled', name: '是否启用', type: 'boolean' },
|
|
403
|
+
{ field: 'customSql', name: '自定义 SQL', type: 'input-code', required: true },
|
|
404
|
+
]);
|
|
405
|
+
/** 动态表单值。 */
|
|
406
|
+
const formValues = ref<Record<string, any>>({});
|
|
407
|
+
|
|
408
|
+
/** 将动态字段描述转换为 Formily 字段节点。 */
|
|
409
|
+
const createFieldSchema = (param: PluginParam): ISchema => ({
|
|
410
|
+
type: param.type === 'boolean' ? 'boolean' : 'string',
|
|
411
|
+
title: param.name,
|
|
412
|
+
required: param.required ?? false,
|
|
413
|
+
'x-decorator': 'FormItem',
|
|
414
|
+
'x-component': param.type === 'boolean' ? 'Switch' : param.type === 'input-code' ? 'Slot' : 'Input',
|
|
415
|
+
'x-component-props': param.type === 'input-code' ? { name: `${param.field}Slot` } : { placeholder: `请输入${param.name}` },
|
|
416
|
+
});
|
|
417
|
+
|
|
418
|
+
/** 动态字段名到 Schema 的映射。 */
|
|
419
|
+
const dynamicProperties = computed<Record<string, ISchema>>(() =>
|
|
420
|
+
Object.fromEntries(pluginParams.value.map(param => [param.field, createFieldSchema(param)]))
|
|
421
|
+
);
|
|
422
|
+
/** 完整动态表单 Schema。 */
|
|
423
|
+
const schema = computed<ISchema>(() => ({
|
|
424
|
+
type: 'object',
|
|
425
|
+
properties: {
|
|
426
|
+
layout: {
|
|
427
|
+
type: 'void',
|
|
428
|
+
'x-component': 'FormLayout',
|
|
429
|
+
'x-component-props': { layout: 'vertical' },
|
|
430
|
+
properties: {
|
|
431
|
+
grid: {
|
|
432
|
+
type: 'void',
|
|
433
|
+
'x-component': 'FormGrid',
|
|
434
|
+
'x-component-props': { maxColumns: 1, minColumns: 1, minWidth: 260 },
|
|
435
|
+
properties: dynamicProperties.value,
|
|
436
|
+
},
|
|
437
|
+
},
|
|
438
|
+
},
|
|
439
|
+
},
|
|
440
|
+
}));
|
|
441
|
+
/** 需要代码编辑器插槽的字段名。 */
|
|
442
|
+
const codeEditorFields = computed(() =>
|
|
443
|
+
pluginParams.value.filter(param => param.type === 'input-code').map(param => param.field)
|
|
444
|
+
);
|
|
445
|
+
</script>
|
|
446
|
+
|
|
447
|
+
<template>
|
|
448
|
+
<YFormily v-model="formValues" :schema="schema">
|
|
449
|
+
<template v-for="fieldKey in codeEditorFields" :key="fieldKey" #[`${fieldKey}Slot`]="{ value, onChange }">
|
|
450
|
+
<YMonaco :model-value="value" language="sql" :height="160" @change="onChange" />
|
|
451
|
+
</template>
|
|
452
|
+
</YFormily>
|
|
453
|
+
</template>
|
|
454
|
+
```
|
|
455
|
+
|
|
456
|
+
## 8. Orval 提交与错误处理
|
|
457
|
+
|
|
458
|
+
底层 `mutator.ts` 已对网络错误和 `success === false` 统一执行 `message.error` 并 reject。业务提交只处理成功动作与 loading,不写重复失败提示。若需要统一提示 Formily 客户端校验失败,使用 `onFormSubmitValidateFailed`;不要在会同时接收 API reject 的 `onFormSubmitFailed` 或 `Submit.onSubmitFailed` 中调用 `message.error`。
|
|
459
|
+
|
|
460
|
+
```typescript
|
|
461
|
+
import { message } from 'ant-design-vue';
|
|
462
|
+
import { ref } from 'vue';
|
|
463
|
+
|
|
464
|
+
/** 保存状态。 */
|
|
465
|
+
const saving = ref(false);
|
|
466
|
+
|
|
467
|
+
/** 提交表单;saveRecord 代表项目中实际生成的 Orval 方法。 */
|
|
468
|
+
const handleSubmit = async (values: Record<string, any>) => {
|
|
469
|
+
saving.value = true;
|
|
470
|
+
try {
|
|
471
|
+
await saveRecord(values);
|
|
472
|
+
message.success('保存成功');
|
|
473
|
+
emit('success');
|
|
474
|
+
} finally {
|
|
475
|
+
saving.value = false;
|
|
476
|
+
}
|
|
477
|
+
};
|
|
478
|
+
```
|
|
479
|
+
|
|
480
|
+
禁止以下模式:
|
|
481
|
+
|
|
482
|
+
- `if (res.success) { ... } else { message.error(...) }`
|
|
483
|
+
- `catch (error) { message.error(...) }`
|
|
484
|
+
- API reject 后仍继续关闭弹窗、切换步骤或刷新成功态
|
|
485
|
+
|
|
486
|
+
如果必须做回滚,可以在 `catch` 中回滚后继续 `throw error`,但仍不重复提示。
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: formily-linkage-effects
|
|
3
|
+
description: 指导 YFormily 字段联动与表单级副作用;当实现动态显隐、禁用、级联选项、scope 事件、x-reactions、effects、异步联动或客户端校验失败兜底时使用。
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Formily Linkage Effects Skill
|
|
7
|
+
|
|
8
|
+
## 触发条件
|
|
9
|
+
|
|
10
|
+
- 需要字段联动(A 影响 B)、动态显隐/禁用、级联下拉。
|
|
11
|
+
- 需要 `scope`、`x-reactions` 或 `createForm + effects`。
|
|
12
|
+
- 需要处理异步选项竞态、旧值清理或 Formily 校验失败反馈。
|
|
13
|
+
|
|
14
|
+
## 不适用场景
|
|
15
|
+
|
|
16
|
+
- 纯基础字段与提交:使用 `../formily-foundation/SKILL.md`。
|
|
17
|
+
- 详情态渲染和 mode 切换:使用 `../formily-mode-slot-detail/SKILL.md`。
|
|
18
|
+
- 分步流程:使用 `../formily-step-flow/SKILL.md`。
|
|
19
|
+
|
|
20
|
+
## 文档检索
|
|
21
|
+
|
|
22
|
+
1. 当前会话可用 yss-ui MCP 时,先用 `get_component_docs` 查询 `YFormily` 的 `scope`/Schema/表单实例边界;实现字段联动、多字段反应或 effects 时,再用 `get_demo` 获取 `formily/linkage`、`formily/linkage-multi`、`formily/effects` 等官方 Demo。
|
|
23
|
+
2. MCP 查询未命中时先用 `search_docs/list_components` 校正名称;MCP 不可用、调用失败或校正后仍无结果时,才读取最新 `llms-full.txt`。若文档与当前项目依赖版本不一致,用当前源码和导出核验。
|
|
24
|
+
|
|
25
|
+
## 硬约束(禁止/必须)
|
|
26
|
+
|
|
27
|
+
- 按复杂度选择机制:表达式 < `x-reactions` < `scope` < `effects`,避免同一联动在多处重复实现。
|
|
28
|
+
- 仅显隐/禁用优先使用 `$values` 表达式;当前字段依赖其他字段时优先 `x-reactions`;跨字段事件用 `scope`;表单级监听才用 `effects`。
|
|
29
|
+
- `effects` 需要首屏即生效时,同时注册 `onFieldInit` 和 `onFieldValueChange`,禁止只监听变化导致初始状态错误。
|
|
30
|
+
- 修改其他字段状态时使用 `form.setFieldState`;级联选项变化后,只有旧值不在新选项中时才清空,避免初始化误删合法回填值。
|
|
31
|
+
- 异步联动必须处理空依赖、loading、请求竞态与卸载;旧请求不得覆盖新选择。
|
|
32
|
+
- 客户端校验提示使用 `onFormSubmitValidateFailed`。禁止在 `onFormSubmitFailed` 或 `Submit.onSubmitFailed` 中调用 `message.error`:Formily 会把 `onSubmit` 中的 API reject 也交给这些通用失败回调,导致与 `mutator.ts` 重复提示。
|
|
33
|
+
- Orval API 的网络/业务错误已由 `mutator.ts` 提示并 reject,业务 `else`/`catch` 禁止重复 `message.error`。
|
|
34
|
+
- 分步需求默认走 `formily-step-flow`,不在此 skill 中给 `FormStep` 默认方案。
|
|
35
|
+
|
|
36
|
+
## 标准代码骨架
|
|
37
|
+
|
|
38
|
+
```vue
|
|
39
|
+
<script setup lang="ts">
|
|
40
|
+
import type { DataField, Form, IFieldState } from '@formily/core';
|
|
41
|
+
import { createForm, onFieldInit, onFieldValueChange, onFormSubmitValidateFailed } from '@formily/core';
|
|
42
|
+
import { YFormily, type ISchema } from '@yss-ui/components';
|
|
43
|
+
import { message } from 'ant-design-vue';
|
|
44
|
+
|
|
45
|
+
/** 下拉选项。 */
|
|
46
|
+
interface OptionItem {
|
|
47
|
+
label: string;
|
|
48
|
+
value: string;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/** 根据省份返回城市选项。 */
|
|
52
|
+
const getCityOptions = (province?: string): OptionItem[] =>
|
|
53
|
+
province === 'zhejiang'
|
|
54
|
+
? [{ label: '杭州', value: 'hangzhou' }]
|
|
55
|
+
: province === 'jiangsu'
|
|
56
|
+
? [{ label: '南京', value: 'nanjing' }]
|
|
57
|
+
: [];
|
|
58
|
+
|
|
59
|
+
/** 同步城市选项并清理已经失效的旧值。 */
|
|
60
|
+
const syncCity = (field: DataField) => {
|
|
61
|
+
const options = getCityOptions(field.value as string | undefined);
|
|
62
|
+
field.form.setFieldState('city', (state: IFieldState) => {
|
|
63
|
+
state.dataSource = options;
|
|
64
|
+
if (!options.some(item => item.value === state.value)) state.value = undefined;
|
|
65
|
+
});
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
/** 外部 Form 实例,用于承载表单级 effects。 */
|
|
69
|
+
const form: Form = createForm({
|
|
70
|
+
values: { province: 'zhejiang', city: 'hangzhou' },
|
|
71
|
+
effects() {
|
|
72
|
+
onFieldInit('province', field => syncCity(field as DataField));
|
|
73
|
+
onFieldValueChange('province', field => syncCity(field as DataField));
|
|
74
|
+
onFormSubmitValidateFailed(() => {
|
|
75
|
+
const feedbacks = form.queryFeedbacks({ type: 'error' });
|
|
76
|
+
message.error(feedbacks[0]?.messages?.[0] ?? '请检查表单');
|
|
77
|
+
});
|
|
78
|
+
},
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
/** 表单保存回调 Props。 */
|
|
82
|
+
interface SaveFormProps {
|
|
83
|
+
onSave: (values: Record<string, any>) => Promise<void>;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/** 表单保存回调。 */
|
|
87
|
+
const props = defineProps<SaveFormProps>();
|
|
88
|
+
|
|
89
|
+
/** 校验通过后提交;API 错误由 mutator 统一提示。 */
|
|
90
|
+
const onSubmit = (values: Record<string, any>) => {
|
|
91
|
+
return props.onSave(values);
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
/** 级联表单 Schema。 */
|
|
95
|
+
const schema: ISchema = {
|
|
96
|
+
type: 'object',
|
|
97
|
+
properties: {
|
|
98
|
+
layout: {
|
|
99
|
+
type: 'void',
|
|
100
|
+
'x-component': 'FormLayout',
|
|
101
|
+
'x-component-props': { layout: 'horizontal', labelWidth: 120, labelAlign: 'right' },
|
|
102
|
+
properties: {
|
|
103
|
+
grid: {
|
|
104
|
+
type: 'void',
|
|
105
|
+
'x-component': 'FormGrid',
|
|
106
|
+
'x-component-props': { maxColumns: 2, minColumns: 1, minWidth: 320 },
|
|
107
|
+
properties: {
|
|
108
|
+
province: {
|
|
109
|
+
type: 'string',
|
|
110
|
+
title: '省份',
|
|
111
|
+
required: true,
|
|
112
|
+
enum: [
|
|
113
|
+
{ label: '浙江', value: 'zhejiang' },
|
|
114
|
+
{ label: '江苏', value: 'jiangsu' },
|
|
115
|
+
],
|
|
116
|
+
'x-decorator': 'FormItem',
|
|
117
|
+
'x-component': 'Select',
|
|
118
|
+
},
|
|
119
|
+
city: {
|
|
120
|
+
type: 'string',
|
|
121
|
+
title: '城市',
|
|
122
|
+
required: true,
|
|
123
|
+
'x-decorator': 'FormItem',
|
|
124
|
+
'x-component': 'Select',
|
|
125
|
+
},
|
|
126
|
+
actions: {
|
|
127
|
+
type: 'void',
|
|
128
|
+
'x-decorator': 'FormItem',
|
|
129
|
+
'x-decorator-props': { gridSpan: 2, colon: false },
|
|
130
|
+
'x-component': 'AutoButtonGroup',
|
|
131
|
+
properties: {
|
|
132
|
+
submit: {
|
|
133
|
+
type: 'void',
|
|
134
|
+
'x-component': 'Submit',
|
|
135
|
+
'x-content': '提交',
|
|
136
|
+
'x-component-props': { onSubmit: '{{ onSubmit }}' },
|
|
137
|
+
},
|
|
138
|
+
},
|
|
139
|
+
},
|
|
140
|
+
},
|
|
141
|
+
},
|
|
142
|
+
},
|
|
143
|
+
},
|
|
144
|
+
},
|
|
145
|
+
};
|
|
146
|
+
</script>
|
|
147
|
+
|
|
148
|
+
<template>
|
|
149
|
+
<YFormily :schema="schema" :form="form" :scope="{ onSubmit }" />
|
|
150
|
+
</template>
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
## 交付检查清单
|
|
154
|
+
|
|
155
|
+
- [ ] 已说明为何选择表达式、`x-reactions`、`scope` 或 `effects`。
|
|
156
|
+
- [ ] 首屏需要联动时同时覆盖初始化与变更事件。
|
|
157
|
+
- [ ] 字段切换后旧值、选项和 loading 状态正确,异步请求有竞态保护。
|
|
158
|
+
- [ ] Formily 客户端校验提示集中在 `onFormSubmitValidateFailed`,未用通用 `onFormSubmitFailed`/`Submit.onSubmitFailed` 处理 API reject。
|
|
159
|
+
- [ ] API 错误只由 `mutator.ts` 提示,业务 `else`/`catch` 未重复 `message.error`。
|
|
160
|
+
- [ ] 无 DOM hack、无无意义 `setTimeout`,未把分步逻辑塞入本 skill。
|
|
161
|
+
|
|
162
|
+
## 失败兜底策略
|
|
163
|
+
|
|
164
|
+
- `x-reactions` 失效时先校验字段路径和实际 schema 层级,再决定是否升级为 `setFieldState`。
|
|
165
|
+
- 首屏状态错误时检查是否遗漏 `onFieldInit`;回填值丢失时检查是否无条件清空了级联字段。
|
|
166
|
+
- 异步结果乱序时使用请求序号或 `AbortController`,只接受最后一次请求结果。
|
|
167
|
+
- API 调用 reject 时只恢复 loading 或回滚局部状态,不重复弹出错误提示。
|