create-yss-spec 2.2.0 → 2.2.2
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 +2 -2
- package/package.json +1 -1
- package/src/cli.js +56 -8
- 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/AGENTS.md +1 -13
- package/template/docs/adr/README.md +7 -0
- package/template/docs/agents/skill-migrations.md +16 -0
- package/template/docs/agents/skills-maintenance.md +2 -2
- package/template/docs/agents/yss-skill-registry.yaml +125 -25
- package/template/docs/process/implementation-repo-integration.md +1 -1
- 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-governance-release +7 -5
- package/template/scripts/verify-skill-governance +10 -0
- package/template/scripts/verify-template +3 -2
- package/template/skills-lock.json +285 -29
- package/template.manifest.json +30 -7
- package/template.snapshot.json +5 -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
- package/template/docs/adr/0001-product-design-prototype-entrypoint.md +0 -54
- package/template/docs/adr/0002-yss-project-repository-mode.md +0 -3
- package/template/docs/adr/0003-machine-readable-lifecycle-registry.md +0 -5
- package/template/docs/adr/0006-stable-lifecycle-ids-and-generated-structure.md +0 -5
- package/template/docs/adr/0007-lifecycle-native-work-units.md +0 -5
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { reactive, ref } from 'vue';
|
|
2
|
+
import { message } from 'ant-design-vue';
|
|
3
|
+
import type { ConditionGroup, OptionItem } from '@yss-ui/components';
|
|
4
|
+
import { FIELD_OPTIONS, RULE_OPERATOR_OPTIONS } from '../constant';
|
|
5
|
+
|
|
6
|
+
/** 创建空条件组。 */
|
|
7
|
+
const createEmptyGroup = (id: string): ConditionGroup => ({
|
|
8
|
+
id,
|
|
9
|
+
type: 'GROUP',
|
|
10
|
+
logicalOp: 'AND',
|
|
11
|
+
children: [],
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
/** 按关键词筛选条件字段。 */
|
|
15
|
+
const filterFields = (keyword: string): OptionItem[] => {
|
|
16
|
+
const normalizedKeyword = keyword.trim().toLowerCase();
|
|
17
|
+
if (!normalizedKeyword) return FIELD_OPTIONS;
|
|
18
|
+
return FIELD_OPTIONS.filter(item =>
|
|
19
|
+
[item.label, item.value].some(value =>
|
|
20
|
+
String(value ?? '')
|
|
21
|
+
.toLowerCase()
|
|
22
|
+
.includes(normalizedKeyword)
|
|
23
|
+
)
|
|
24
|
+
);
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
/** 管理条件构建器与预览状态。 */
|
|
28
|
+
export const useRuleConfig = () => {
|
|
29
|
+
const filterCondition = ref<ConditionGroup>(createEmptyGroup('filter-root'));
|
|
30
|
+
const checkCondition = ref<ConditionGroup>(createEmptyGroup('check-root'));
|
|
31
|
+
const filterPreview = ref('');
|
|
32
|
+
const checkPreview = ref('');
|
|
33
|
+
const loading = reactive({ filterPreview: false, checkPreview: false });
|
|
34
|
+
|
|
35
|
+
/** 为 YConditionBuilder 加载可搜索字段。 */
|
|
36
|
+
const loadFields = async (keyword: string): Promise<OptionItem[]> => filterFields(keyword);
|
|
37
|
+
|
|
38
|
+
/** 生成条件 JSON 预览。 */
|
|
39
|
+
const generatePreview = async (
|
|
40
|
+
condition: ConditionGroup,
|
|
41
|
+
target: 'filterPreview' | 'checkPreview'
|
|
42
|
+
): Promise<void> => {
|
|
43
|
+
if (!condition.children.length) {
|
|
44
|
+
message.warning('请先配置完整条件');
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
loading[target] = true;
|
|
49
|
+
try {
|
|
50
|
+
const preview = JSON.stringify(condition, null, 2);
|
|
51
|
+
if (target === 'filterPreview') filterPreview.value = preview;
|
|
52
|
+
else checkPreview.value = preview;
|
|
53
|
+
} finally {
|
|
54
|
+
loading[target] = false;
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
/** 生成校验范围预览。 */
|
|
59
|
+
const generateFilterPreview = (): Promise<void> => generatePreview(filterCondition.value, 'filterPreview');
|
|
60
|
+
|
|
61
|
+
/** 生成校验表达式预览。 */
|
|
62
|
+
const generateCheckPreview = (): Promise<void> => generatePreview(checkCondition.value, 'checkPreview');
|
|
63
|
+
|
|
64
|
+
return {
|
|
65
|
+
filterCondition,
|
|
66
|
+
checkCondition,
|
|
67
|
+
filterPreview,
|
|
68
|
+
checkPreview,
|
|
69
|
+
loading,
|
|
70
|
+
operatorOptions: RULE_OPERATOR_OPTIONS,
|
|
71
|
+
loadFields,
|
|
72
|
+
generateFilterPreview,
|
|
73
|
+
generateCheckPreview,
|
|
74
|
+
};
|
|
75
|
+
};
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { computed, ref } from 'vue';
|
|
3
|
+
import { YButton, YCard, YConditionBuilder, YFormily } from '@yss-ui/components';
|
|
4
|
+
import { FORM_OPTIONS } from './constant';
|
|
5
|
+
import { useRuleConfig } from './hooks/useRuleConfig';
|
|
6
|
+
import { ruleConfigSchema } from './schemas/ruleConfigSchema';
|
|
7
|
+
|
|
8
|
+
defineOptions({ name: 'AdvancedFormPage' });
|
|
9
|
+
|
|
10
|
+
/** YFormily 校验实例。 */
|
|
11
|
+
interface FormilyRef {
|
|
12
|
+
submit: () => Promise<Record<string, unknown>>;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/** YConditionBuilder 校验实例。 */
|
|
16
|
+
interface ConditionBuilderRef {
|
|
17
|
+
validate: () => boolean;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
const formData = ref<Record<string, unknown>>({
|
|
21
|
+
intensity: 'WEAK',
|
|
22
|
+
errorStorage: true,
|
|
23
|
+
errorStorageLimit: 1000,
|
|
24
|
+
errorStorageType: 'FILE_SYSTEM',
|
|
25
|
+
});
|
|
26
|
+
const schema = computed(() => ruleConfigSchema(FORM_OPTIONS));
|
|
27
|
+
const formRef = ref<FormilyRef>();
|
|
28
|
+
const filterBuilderRef = ref<ConditionBuilderRef>();
|
|
29
|
+
const checkBuilderRef = ref<ConditionBuilderRef>();
|
|
30
|
+
const {
|
|
31
|
+
filterCondition,
|
|
32
|
+
checkCondition,
|
|
33
|
+
filterPreview,
|
|
34
|
+
checkPreview,
|
|
35
|
+
loading,
|
|
36
|
+
operatorOptions,
|
|
37
|
+
loadFields,
|
|
38
|
+
generateFilterPreview,
|
|
39
|
+
generateCheckPreview,
|
|
40
|
+
} = useRuleConfig();
|
|
41
|
+
|
|
42
|
+
/** 校验表单与指定条件构建器。 */
|
|
43
|
+
const validateBeforeGenerate = async (builder?: ConditionBuilderRef): Promise<boolean> => {
|
|
44
|
+
if (!formRef.value || !builder) return false;
|
|
45
|
+
try {
|
|
46
|
+
await formRef.value.submit();
|
|
47
|
+
} catch {
|
|
48
|
+
return false;
|
|
49
|
+
}
|
|
50
|
+
return builder.validate();
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
/** 校验后生成校验范围预览。 */
|
|
54
|
+
const handleGenerateFilterPreview = async (): Promise<void> => {
|
|
55
|
+
if (await validateBeforeGenerate(filterBuilderRef.value)) await generateFilterPreview();
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
/** 校验后生成校验表达式预览。 */
|
|
59
|
+
const handleGenerateCheckPreview = async (): Promise<void> => {
|
|
60
|
+
if (await validateBeforeGenerate(checkBuilderRef.value)) await generateCheckPreview();
|
|
61
|
+
};
|
|
62
|
+
</script>
|
|
63
|
+
|
|
64
|
+
<template>
|
|
65
|
+
<div class="rule-config-page">
|
|
66
|
+
<YCard class="rule-config-page__content">
|
|
67
|
+
<YFormily ref="formRef" v-model="formData" :schema="schema">
|
|
68
|
+
<template #conditionFilter>
|
|
69
|
+
<YConditionBuilder
|
|
70
|
+
ref="filterBuilderRef"
|
|
71
|
+
v-model="filterCondition"
|
|
72
|
+
:load-fields="loadFields"
|
|
73
|
+
:operator-options="operatorOptions"
|
|
74
|
+
/>
|
|
75
|
+
</template>
|
|
76
|
+
<template #filterPreview>
|
|
77
|
+
<div class="rule-config-page__preview">
|
|
78
|
+
<pre>{{ filterPreview || '配置校验范围后生成预览' }}</pre>
|
|
79
|
+
<YButton type="primary" :loading="loading.filterPreview" @click="handleGenerateFilterPreview">
|
|
80
|
+
生成校验范围
|
|
81
|
+
</YButton>
|
|
82
|
+
</div>
|
|
83
|
+
</template>
|
|
84
|
+
<template #checkCondition>
|
|
85
|
+
<YConditionBuilder
|
|
86
|
+
ref="checkBuilderRef"
|
|
87
|
+
v-model="checkCondition"
|
|
88
|
+
:load-fields="loadFields"
|
|
89
|
+
:operator-options="operatorOptions"
|
|
90
|
+
/>
|
|
91
|
+
</template>
|
|
92
|
+
<template #checkPreview>
|
|
93
|
+
<div class="rule-config-page__preview">
|
|
94
|
+
<pre>{{ checkPreview || '配置校验表达式后生成预览' }}</pre>
|
|
95
|
+
<YButton type="primary" :loading="loading.checkPreview" @click="handleGenerateCheckPreview">
|
|
96
|
+
生成校验表达式
|
|
97
|
+
</YButton>
|
|
98
|
+
</div>
|
|
99
|
+
</template>
|
|
100
|
+
</YFormily>
|
|
101
|
+
</YCard>
|
|
102
|
+
</div>
|
|
103
|
+
</template>
|
|
104
|
+
|
|
105
|
+
<style scoped lang="less">
|
|
106
|
+
@import url('./style.less');
|
|
107
|
+
</style>
|
package/template/.trae/skills/page-skeleton/examples/AdvancedFormPage/schemas/ruleConfigSchema.ts
ADDED
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 规则配置表单Schema
|
|
3
|
+
* 包含:Grid布局、表单分组、字段联动 (Reactions)、Slot插槽
|
|
4
|
+
*/
|
|
5
|
+
import type { FormOptions } from '../constant';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* 规则配置Schema
|
|
9
|
+
* @param formOptions 表单选项数据
|
|
10
|
+
*/
|
|
11
|
+
export const ruleConfigSchema = (formOptions: FormOptions): Record<string, any> => ({
|
|
12
|
+
type: 'object',
|
|
13
|
+
properties: {
|
|
14
|
+
layout: {
|
|
15
|
+
type: 'void',
|
|
16
|
+
'x-component': 'FormLayout',
|
|
17
|
+
'x-component-props': {
|
|
18
|
+
layout: 'horizontal',
|
|
19
|
+
labelWidth: 110, // ← 根据最长 label 确定(一般 5 个字约 100px,这里稍大)
|
|
20
|
+
labelAlign: 'right', // ← 必须右对齐
|
|
21
|
+
},
|
|
22
|
+
properties: {
|
|
23
|
+
grid: {
|
|
24
|
+
type: 'void',
|
|
25
|
+
'x-component': 'FormGrid',
|
|
26
|
+
'x-component-props': {
|
|
27
|
+
maxColumns: 3,
|
|
28
|
+
minColumns: 1,
|
|
29
|
+
columnGap: 16,
|
|
30
|
+
rowGap: 0,
|
|
31
|
+
},
|
|
32
|
+
properties: {
|
|
33
|
+
// -------------------------------------------------------------
|
|
34
|
+
// 分组1:规则配置
|
|
35
|
+
// -------------------------------------------------------------
|
|
36
|
+
ruleConfigHeader: {
|
|
37
|
+
type: 'void',
|
|
38
|
+
title: '规则配置',
|
|
39
|
+
'x-decorator': 'FormItem',
|
|
40
|
+
'x-decorator-props': {
|
|
41
|
+
feedbackLayout: 'none',
|
|
42
|
+
colon: false,
|
|
43
|
+
gridSpan: 3,
|
|
44
|
+
labelWidth: 0,
|
|
45
|
+
wrapperCol: { span: 24 },
|
|
46
|
+
},
|
|
47
|
+
'x-component': 'GroupHeader', // 自定义组件 or 标题组件
|
|
48
|
+
},
|
|
49
|
+
intensity: {
|
|
50
|
+
type: 'string',
|
|
51
|
+
title: '规则强度',
|
|
52
|
+
required: true,
|
|
53
|
+
'x-decorator': 'FormItem',
|
|
54
|
+
'x-component': 'Radio.Group',
|
|
55
|
+
enum: formOptions.intensity,
|
|
56
|
+
},
|
|
57
|
+
// 开关字段,控制其他字段显示
|
|
58
|
+
errorStorage: {
|
|
59
|
+
type: 'boolean',
|
|
60
|
+
title: '异常存储',
|
|
61
|
+
required: true,
|
|
62
|
+
'x-decorator': 'FormItem',
|
|
63
|
+
'x-component': 'Switch',
|
|
64
|
+
'x-component-props': {
|
|
65
|
+
checkedChildren: '开',
|
|
66
|
+
unCheckedChildren: '关',
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
// 受控字段:异常限制 (当 errorStorage=true 时显示)
|
|
70
|
+
errorStorageLimit: {
|
|
71
|
+
type: 'number',
|
|
72
|
+
title: '异常限制',
|
|
73
|
+
'x-decorator': 'FormItem',
|
|
74
|
+
'x-component': 'NumberPicker',
|
|
75
|
+
'x-component-props': {
|
|
76
|
+
placeholder: '请输入异常限制',
|
|
77
|
+
style: { width: '100%' },
|
|
78
|
+
},
|
|
79
|
+
'x-reactions': {
|
|
80
|
+
dependencies: ['errorStorage'],
|
|
81
|
+
fulfill: {
|
|
82
|
+
state: {
|
|
83
|
+
visible: '{{$deps[0]}}',
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
},
|
|
88
|
+
|
|
89
|
+
// -------------------------------------------------------------
|
|
90
|
+
// 分组2:异常数据存储
|
|
91
|
+
// 这里的 GroupHeader 本身也受 errorStorage 控制显示
|
|
92
|
+
// -------------------------------------------------------------
|
|
93
|
+
exceptionDataHeader: {
|
|
94
|
+
type: 'void',
|
|
95
|
+
title: '异常数据存储',
|
|
96
|
+
'x-decorator': 'FormItem',
|
|
97
|
+
'x-decorator-props': {
|
|
98
|
+
feedbackLayout: 'none',
|
|
99
|
+
colon: false,
|
|
100
|
+
gridSpan: 3,
|
|
101
|
+
labelWidth: 0,
|
|
102
|
+
wrapperCol: { span: 24 },
|
|
103
|
+
},
|
|
104
|
+
'x-component': 'GroupHeader',
|
|
105
|
+
'x-reactions': {
|
|
106
|
+
dependencies: ['errorStorage'],
|
|
107
|
+
fulfill: {
|
|
108
|
+
state: {
|
|
109
|
+
visible: '{{$deps[0]}}',
|
|
110
|
+
},
|
|
111
|
+
},
|
|
112
|
+
},
|
|
113
|
+
},
|
|
114
|
+
errorStorageType: {
|
|
115
|
+
type: 'string',
|
|
116
|
+
title: '存储方式',
|
|
117
|
+
required: true,
|
|
118
|
+
'x-decorator': 'FormItem',
|
|
119
|
+
'x-component': 'Select',
|
|
120
|
+
'x-component-props': {
|
|
121
|
+
placeholder: '请选择存储方式',
|
|
122
|
+
},
|
|
123
|
+
enum: formOptions.errorStorageType,
|
|
124
|
+
'x-reactions': {
|
|
125
|
+
dependencies: ['errorStorage'],
|
|
126
|
+
fulfill: {
|
|
127
|
+
state: {
|
|
128
|
+
visible: '{{$deps[0]}}',
|
|
129
|
+
},
|
|
130
|
+
},
|
|
131
|
+
},
|
|
132
|
+
},
|
|
133
|
+
errorStorageName: {
|
|
134
|
+
type: 'string',
|
|
135
|
+
title: '存储名称',
|
|
136
|
+
required: true,
|
|
137
|
+
'x-decorator': 'FormItem',
|
|
138
|
+
'x-decorator-props': {
|
|
139
|
+
gridSpan: 1,
|
|
140
|
+
},
|
|
141
|
+
'x-component': 'Input',
|
|
142
|
+
'x-component-props': {
|
|
143
|
+
placeholder: '请选择异常数据存储名称',
|
|
144
|
+
},
|
|
145
|
+
'x-reactions': {
|
|
146
|
+
dependencies: ['errorStorage'],
|
|
147
|
+
fulfill: {
|
|
148
|
+
state: {
|
|
149
|
+
visible: '{{$deps[0]}}',
|
|
150
|
+
},
|
|
151
|
+
},
|
|
152
|
+
},
|
|
153
|
+
},
|
|
154
|
+
errorStoragePath: {
|
|
155
|
+
type: 'string',
|
|
156
|
+
title: '存储地址',
|
|
157
|
+
'x-decorator': 'FormItem',
|
|
158
|
+
'x-decorator-props': {
|
|
159
|
+
gridSpan: 1,
|
|
160
|
+
},
|
|
161
|
+
'x-component': 'Input',
|
|
162
|
+
'x-component-props': {
|
|
163
|
+
placeholder: '请输入异常数据存储地址',
|
|
164
|
+
},
|
|
165
|
+
// 也可以配置 reactions
|
|
166
|
+
},
|
|
167
|
+
|
|
168
|
+
// -------------------------------------------------------------
|
|
169
|
+
// 分组3:校验规则 (使用 Slot 自定义渲染)
|
|
170
|
+
// -------------------------------------------------------------
|
|
171
|
+
filterHeader: {
|
|
172
|
+
type: 'void',
|
|
173
|
+
title: '校验规则',
|
|
174
|
+
'x-decorator': 'FormItem',
|
|
175
|
+
'x-decorator-props': {
|
|
176
|
+
feedbackLayout: 'none',
|
|
177
|
+
colon: false,
|
|
178
|
+
gridSpan: 3,
|
|
179
|
+
labelWidth: 0,
|
|
180
|
+
wrapperCol: { span: 24 },
|
|
181
|
+
},
|
|
182
|
+
'x-component': 'GroupHeader',
|
|
183
|
+
},
|
|
184
|
+
// Slot:校验范围构建器
|
|
185
|
+
conditionFilter: {
|
|
186
|
+
type: 'object',
|
|
187
|
+
title: '校验范围',
|
|
188
|
+
'x-decorator': 'FormItem',
|
|
189
|
+
'x-decorator-props': {
|
|
190
|
+
gridSpan: 3, // 占满一行
|
|
191
|
+
},
|
|
192
|
+
'x-component': 'Slot', // 关键:使用 Slot 组件
|
|
193
|
+
'x-component-props': {
|
|
194
|
+
name: 'conditionFilter', // 对应 <template #conditionFilter>
|
|
195
|
+
},
|
|
196
|
+
},
|
|
197
|
+
// Slot:条件结构预览
|
|
198
|
+
filterPreview: {
|
|
199
|
+
type: 'string',
|
|
200
|
+
title: '预览',
|
|
201
|
+
'x-decorator': 'FormItem',
|
|
202
|
+
'x-decorator-props': {
|
|
203
|
+
gridSpan: 3,
|
|
204
|
+
},
|
|
205
|
+
'x-component': 'Slot',
|
|
206
|
+
'x-component-props': {
|
|
207
|
+
name: 'filterPreview',
|
|
208
|
+
},
|
|
209
|
+
},
|
|
210
|
+
|
|
211
|
+
// -------------------------------------------------------------
|
|
212
|
+
// 分组4:校验设置
|
|
213
|
+
// -------------------------------------------------------------
|
|
214
|
+
checkHeader: {
|
|
215
|
+
type: 'void',
|
|
216
|
+
title: '校验设置',
|
|
217
|
+
'x-decorator': 'FormItem',
|
|
218
|
+
'x-decorator-props': {
|
|
219
|
+
feedbackLayout: 'none',
|
|
220
|
+
colon: false,
|
|
221
|
+
gridSpan: 3,
|
|
222
|
+
labelWidth: 0,
|
|
223
|
+
wrapperCol: { span: 24 },
|
|
224
|
+
},
|
|
225
|
+
'x-component': 'GroupHeader',
|
|
226
|
+
},
|
|
227
|
+
checkCondition: {
|
|
228
|
+
type: 'object',
|
|
229
|
+
title: '校验配置',
|
|
230
|
+
'x-decorator': 'FormItem',
|
|
231
|
+
'x-decorator-props': {
|
|
232
|
+
gridSpan: 3,
|
|
233
|
+
},
|
|
234
|
+
'x-component': 'Slot',
|
|
235
|
+
'x-component-props': {
|
|
236
|
+
name: 'checkCondition',
|
|
237
|
+
},
|
|
238
|
+
},
|
|
239
|
+
checkPreview: {
|
|
240
|
+
type: 'string',
|
|
241
|
+
title: '预览',
|
|
242
|
+
'x-decorator': 'FormItem',
|
|
243
|
+
'x-decorator-props': {
|
|
244
|
+
gridSpan: 3,
|
|
245
|
+
},
|
|
246
|
+
'x-component': 'Slot',
|
|
247
|
+
'x-component-props': {
|
|
248
|
+
name: 'checkPreview',
|
|
249
|
+
},
|
|
250
|
+
},
|
|
251
|
+
},
|
|
252
|
+
},
|
|
253
|
+
},
|
|
254
|
+
},
|
|
255
|
+
},
|
|
256
|
+
});
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
.rule-config-page {
|
|
2
|
+
width: 100%;
|
|
3
|
+
height: 100%;
|
|
4
|
+
|
|
5
|
+
&__content {
|
|
6
|
+
height: 100%;
|
|
7
|
+
overflow: auto;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
&__preview {
|
|
11
|
+
display: flex;
|
|
12
|
+
align-items: flex-start;
|
|
13
|
+
gap: 12px;
|
|
14
|
+
|
|
15
|
+
pre {
|
|
16
|
+
flex: 1;
|
|
17
|
+
min-height: 72px;
|
|
18
|
+
max-height: 220px;
|
|
19
|
+
margin: 0;
|
|
20
|
+
padding: 12px;
|
|
21
|
+
overflow: auto;
|
|
22
|
+
color: var(--text-color, rgb(0 0 0 / 88%));
|
|
23
|
+
background: var(--bg-color, #f0f2f5);
|
|
24
|
+
border: 1px solid var(--border-color-split, #f0f0f0);
|
|
25
|
+
border-radius: 6px;
|
|
26
|
+
white-space: pre-wrap;
|
|
27
|
+
word-break: break-word;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { YTableColumn } from '@yss-ui/components';
|
|
2
|
+
import type { QualityBusinessRuleVO } from '@/api/generated/quality/schemas';
|
|
3
|
+
|
|
4
|
+
/** 质量规则列表行数据。 */
|
|
5
|
+
export type QualityRuleItem = QualityBusinessRuleVO;
|
|
6
|
+
|
|
7
|
+
/** 质量规则查询表单。 */
|
|
8
|
+
export interface SearchFormData {
|
|
9
|
+
ruleName: string;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/** 状态文案映射。 */
|
|
13
|
+
export const STATUS_LABELS: Record<number, string> = {
|
|
14
|
+
0: '禁用',
|
|
15
|
+
1: '启用',
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
/** 质量规则表格列。 */
|
|
19
|
+
export const TABLE_COLUMNS: YTableColumn[] = [
|
|
20
|
+
{ field: 'ruleName', title: '质量规则名称', minWidth: 180, slots: { default: 'ruleName' } },
|
|
21
|
+
{ field: 'ruleCode', title: '规则编码', minWidth: 160 },
|
|
22
|
+
{
|
|
23
|
+
field: 'status',
|
|
24
|
+
title: '状态',
|
|
25
|
+
width: 100,
|
|
26
|
+
formatter: ({ cellValue }: { cellValue?: number }) => STATUS_LABELS[cellValue ?? -1] ?? '-',
|
|
27
|
+
},
|
|
28
|
+
];
|
package/template/.trae/skills/page-skeleton/examples/StandardListPage/hooks/useQualityRuleList.ts
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { reactive, ref } from 'vue';
|
|
2
|
+
import { getApiApi } from '@/api/generated/quality';
|
|
3
|
+
import type { QualityRulePage } from '@/api/generated/quality/schemas';
|
|
4
|
+
import type { QualityRuleItem, SearchFormData } from '../constant';
|
|
5
|
+
|
|
6
|
+
const { pageQualityRule } = getApiApi();
|
|
7
|
+
|
|
8
|
+
/** 管理质量规则列表、查询和远程分页。 */
|
|
9
|
+
export const useQualityRuleList = () => {
|
|
10
|
+
const tableData = ref<QualityRuleItem[]>([]);
|
|
11
|
+
const loading = ref(false);
|
|
12
|
+
const pagination = reactive({ current: 1, pageSize: 20, total: 0, remote: true });
|
|
13
|
+
const searchForm = reactive<SearchFormData>({ ruleName: '' });
|
|
14
|
+
|
|
15
|
+
/** 组装 Orval 查询 DTO。 */
|
|
16
|
+
const getQueryParams = (): QualityRulePage => ({
|
|
17
|
+
pageIndex: pagination.current,
|
|
18
|
+
pageSize: pagination.pageSize,
|
|
19
|
+
ruleName: searchForm.ruleName || undefined,
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
/** 加载列表;错误提示由 mutator 统一处理。 */
|
|
23
|
+
const fetchList = async (): Promise<void> => {
|
|
24
|
+
loading.value = true;
|
|
25
|
+
try {
|
|
26
|
+
const res = await pageQualityRule(getQueryParams());
|
|
27
|
+
tableData.value = res.data ?? [];
|
|
28
|
+
pagination.total = res.totalCount ?? 0;
|
|
29
|
+
} catch {
|
|
30
|
+
tableData.value = [];
|
|
31
|
+
pagination.total = 0;
|
|
32
|
+
} finally {
|
|
33
|
+
loading.value = false;
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
/** 处理分页变化。 */
|
|
38
|
+
const handlePageChange = ({ current, pageSize }: { current: number; pageSize: number }): void => {
|
|
39
|
+
pagination.current = current;
|
|
40
|
+
pagination.pageSize = pageSize;
|
|
41
|
+
void fetchList();
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
/** 从第一页执行查询。 */
|
|
45
|
+
const handleSearch = (): void => {
|
|
46
|
+
pagination.current = 1;
|
|
47
|
+
void fetchList();
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
/** 重置查询条件并刷新。 */
|
|
51
|
+
const handleReset = (): void => {
|
|
52
|
+
searchForm.ruleName = '';
|
|
53
|
+
pagination.current = 1;
|
|
54
|
+
void fetchList();
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
return { tableData, loading, pagination, searchForm, fetchList, handlePageChange, handleSearch, handleReset };
|
|
58
|
+
};
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { computed } from 'vue';
|
|
2
|
+
import { message } from 'ant-design-vue';
|
|
3
|
+
import type { YTableActionConfig } from '@yss-ui/components';
|
|
4
|
+
import { getApiApi } from '@/api/generated/quality';
|
|
5
|
+
import type { QualityRuleItem } from '../constant';
|
|
6
|
+
|
|
7
|
+
const { deleteQualityRule } = getApiApi();
|
|
8
|
+
|
|
9
|
+
/** 行操作与页面容器的通信回调。 */
|
|
10
|
+
export interface RuleActionCallbacks {
|
|
11
|
+
refreshList: () => Promise<void>;
|
|
12
|
+
onCreate: () => void;
|
|
13
|
+
onEdit: (row: QualityRuleItem) => void;
|
|
14
|
+
onView: (row: QualityRuleItem) => void;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/** YTable 气泡确认助手。 */
|
|
18
|
+
interface ActionHelpers {
|
|
19
|
+
close: () => void;
|
|
20
|
+
hideLoading: () => void;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/** 管理质量规则行操作和 YTable 操作列配置。 */
|
|
24
|
+
export const useRuleActions = (callbacks: RuleActionCallbacks) => {
|
|
25
|
+
/** 删除规则并刷新列表。 */
|
|
26
|
+
const handleDelete = async (row: QualityRuleItem): Promise<void> => {
|
|
27
|
+
if (!row.id) return;
|
|
28
|
+
|
|
29
|
+
try {
|
|
30
|
+
await deleteQualityRule(row.id);
|
|
31
|
+
message.success('删除成功');
|
|
32
|
+
await callbacks.refreshList();
|
|
33
|
+
} catch {
|
|
34
|
+
// mutator 已展示错误,此处不重复 message.error。
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
/** 标准操作列:查看/编辑立即执行,删除使用气泡确认。 */
|
|
39
|
+
const actionConfig = computed<YTableActionConfig>(() => ({
|
|
40
|
+
title: '操作',
|
|
41
|
+
width: 180,
|
|
42
|
+
fixed: 'right',
|
|
43
|
+
buttons: [
|
|
44
|
+
{ label: '查看', value: 'view', click: ({ row }) => callbacks.onView(row) },
|
|
45
|
+
{ label: '编辑', value: 'edit', click: ({ row }) => callbacks.onEdit(row) },
|
|
46
|
+
{
|
|
47
|
+
label: '删除',
|
|
48
|
+
value: 'delete',
|
|
49
|
+
type: 'link',
|
|
50
|
+
isConfirm: true,
|
|
51
|
+
confirmProps: { title: '确认删除此规则吗?删除后无法恢复', needLoading: true },
|
|
52
|
+
click: async ({ row }, _button, helpers: ActionHelpers) => {
|
|
53
|
+
try {
|
|
54
|
+
await handleDelete(row);
|
|
55
|
+
} finally {
|
|
56
|
+
helpers.hideLoading();
|
|
57
|
+
helpers.close();
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
],
|
|
62
|
+
}));
|
|
63
|
+
|
|
64
|
+
return { actionConfig, handleCreate: callbacks.onCreate };
|
|
65
|
+
};
|