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,227 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: yedit-table-usage
|
|
3
|
+
description: 指导 YSS UI 业务页面使用 @yss-ui/components 的 YEditTable 实现可编辑表格、行内编辑、添加/删除行、下拉多选与可创建 tags、行级候选联动、表头筛选、校验和查看态;当需求出现编辑表格、明细行、扩展属性、可编辑列或 YEditTableColumn 时使用。
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# YEditTable 使用
|
|
7
|
+
|
|
8
|
+
## 触发条件
|
|
9
|
+
|
|
10
|
+
- 需求包含可编辑表格、行内编辑、明细行、扩展属性、行级候选联动或表格校验。
|
|
11
|
+
- 需要使用 `YEditTableColumn`、`validate()`、`addable`、`filterOptions` 或表头筛选。
|
|
12
|
+
|
|
13
|
+
## 不适用场景
|
|
14
|
+
|
|
15
|
+
- 主列表只展示和分页:使用 `../ytable-usage/SKILL.md`。
|
|
16
|
+
- 表单主体不是表格:使用 `../yss-formily/SKILL.md`。
|
|
17
|
+
|
|
18
|
+
## 实施流程
|
|
19
|
+
|
|
20
|
+
1. 当前会话可用 yss-ui MCP 时,先用 `get_component_docs` 查询 `YEditTable` 的 Props、Events、Methods、`YEditTableColumn` 和操作列配置;需要添加行、多选/可创建下拉、行级联动或校验时,再用 `get_demo` 获取对应官方 Demo。
|
|
21
|
+
2. MCP 工具不可用、调用失败或用 `search_docs/list_components` 校正后仍无结果时,才读取最新 `llms-full.txt`;若文档与当前项目依赖版本不一致,用当前源码和导出核验。
|
|
22
|
+
3. 区分列编辑器、行级候选、表头筛选三种职责,再设计行类型和校验。
|
|
23
|
+
4. 把行类型、列配置、新行工厂和纯操作配置放到 `constant.ts`;把数据状态、API、联动和事件放到 Hook。
|
|
24
|
+
5. 显式实现 `@add`、查看态、删除确认与 `validate()` 链路,再对照真实返回类型检查提交。
|
|
25
|
+
|
|
26
|
+
## 硬约束(禁止/必须)
|
|
27
|
+
|
|
28
|
+
- 业务可编辑表格必须优先使用 `YEditTable`,从 `@yss-ui/components` 导入 `YEditTable`、`YEditTableColumn`、`YTableActionConfig`;不用 `a-table` 手搭编辑态。
|
|
29
|
+
- 有 `component` 的列会由组件自动补齐 `edit-render`,业务列不需要重复写 `editRender: {}`。
|
|
30
|
+
- `component: 'form-item-select'` 的 `props.multiple: true` 表示从现有候选中多选;`props.allowCreate: true` 会进入 Ant Design Vue `tags` 模式,值必须按数组建模。
|
|
31
|
+
- 当前实现中 `multiple` 优先于 `allowCreate`,同时配置并不会得到“多选且可新建”。该需求必须明确说明当前能力缺口,使用自定义插槽或先增强组件,禁止继续生成错误 demo。
|
|
32
|
+
- 行级候选使用 `rowOptionsFieldName` 指定的行字段,或列级 `filterOptions({ field, optionsMap, row })`;不修改全局 `optionsMap` 影响其他行。
|
|
33
|
+
- `filterOptions` 只过滤编辑态候选;表头筛选使用 `filterable + filters + filterMethod`,文本面板优先使用 `filterRender: { name: 'VxeInput', props: {...} }`。
|
|
34
|
+
- `addable` 只渲染添加按钮并发出 `add`,不会自动创建行。必须监听 `@add` 并修改 `v-model:data`;业务插入位置要与 `addPosition` 一致。
|
|
35
|
+
- `disabled` 只禁用表格编辑,不会自动隐藏添加按钮和操作列。查看态必须同时设置 `:addable="false"` 并移除操作列/按钮。
|
|
36
|
+
- 删除使用 `type: 'action' + actionConfig.buttons[].isConfirm`;不默认使用 `Modal.confirm`。
|
|
37
|
+
- `validate()` 真实返回 `Promise<{ valid: boolean; errorMsg: Map<string, string> }>`。组件 ref 未就绪时不得误判为校验成功。
|
|
38
|
+
- 弹窗/抽屉内使用添加按钮时,高度 Hook 配置 `withAddButton: true`;如果同时分页或开启工具栏,一并开启对应偏移。
|
|
39
|
+
- API 失败由 `mutator.ts` 统一提示并 reject。Hook 中不写 `success === false` 分支,不在 `else/catch` 重复 `message.error`;清理状态放在 `finally`。
|
|
40
|
+
|
|
41
|
+
## 标准代码骨架
|
|
42
|
+
|
|
43
|
+
```typescript
|
|
44
|
+
import type { YEditTableColumn, YTableActionConfig } from '@yss-ui/components';
|
|
45
|
+
|
|
46
|
+
/** 扩展属性行。 */
|
|
47
|
+
export interface ExtRow {
|
|
48
|
+
id?: string;
|
|
49
|
+
_rowKey: string;
|
|
50
|
+
extName?: string;
|
|
51
|
+
extValues?: string[];
|
|
52
|
+
memo?: string;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/** 可编辑表格列。 */
|
|
56
|
+
export const EDIT_COLUMNS: YEditTableColumn[] = [
|
|
57
|
+
{
|
|
58
|
+
field: 'extName',
|
|
59
|
+
title: '扩展属性',
|
|
60
|
+
minWidth: 220,
|
|
61
|
+
component: 'form-item-select',
|
|
62
|
+
props: { placeholder: '请选择扩展属性' },
|
|
63
|
+
customRule: (value, _row, _field, all) => {
|
|
64
|
+
if (!value) return { errMsg: '扩展属性不能为空' };
|
|
65
|
+
if (all.filter(item => item.extName === value).length > 1) return { errMsg: '扩展属性不能重复' };
|
|
66
|
+
return {};
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
field: 'extValues',
|
|
71
|
+
title: '扩展值',
|
|
72
|
+
minWidth: 240,
|
|
73
|
+
component: 'form-item-select',
|
|
74
|
+
props: { multiple: true, placeholder: '请选择扩展值' },
|
|
75
|
+
customRule: value =>
|
|
76
|
+
Array.isArray(value) && value.some(item => String(item).length > 100)
|
|
77
|
+
? { errMsg: '单个扩展值最多 100 个字符' }
|
|
78
|
+
: {},
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
field: 'memo',
|
|
82
|
+
title: '备注',
|
|
83
|
+
minWidth: 240,
|
|
84
|
+
component: 'form-item-input',
|
|
85
|
+
props: { placeholder: '请输入备注' },
|
|
86
|
+
customRule: value => (String(value ?? '').length > 200 ? { errMsg: '最多 200 个字符' } : {}),
|
|
87
|
+
},
|
|
88
|
+
{ type: 'action', title: '操作', width: 100, fixed: 'right' },
|
|
89
|
+
];
|
|
90
|
+
|
|
91
|
+
/** 表格字典数据;实际项目可由 Hook 响应式提供。 */
|
|
92
|
+
export const EDIT_OPTIONS_MAP = {
|
|
93
|
+
extName: [
|
|
94
|
+
{ label: '类型', value: 'type' },
|
|
95
|
+
{ label: '级别', value: 'level' },
|
|
96
|
+
],
|
|
97
|
+
extValues: [
|
|
98
|
+
{ label: '默认', value: 'default' },
|
|
99
|
+
{ label: '扩展', value: 'extended' },
|
|
100
|
+
],
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
/** 创建前端新行。 */
|
|
104
|
+
export const createEmptyRow = (): ExtRow => ({
|
|
105
|
+
_rowKey: `temp-${Date.now()}-${Math.random().toString(36).slice(2)}`,
|
|
106
|
+
extValues: [],
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
/** 创建带删除确认的操作配置。 */
|
|
110
|
+
export const createActionConfig = (onDelete: (row: ExtRow) => void): YTableActionConfig => ({
|
|
111
|
+
buttons: [
|
|
112
|
+
{
|
|
113
|
+
value: 'delete',
|
|
114
|
+
label: '删除',
|
|
115
|
+
type: 'link',
|
|
116
|
+
isConfirm: true,
|
|
117
|
+
confirmProps: { title: '是否确认删除此条数据?', okText: '确定', cancelText: '取消' },
|
|
118
|
+
click: ({ row }) => onDelete(row),
|
|
119
|
+
},
|
|
120
|
+
],
|
|
121
|
+
});
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
```vue
|
|
125
|
+
<script setup lang="ts">
|
|
126
|
+
import { computed, ref } from 'vue';
|
|
127
|
+
import { YEditTable } from '@yss-ui/components';
|
|
128
|
+
import { createActionConfig, createEmptyRow, EDIT_COLUMNS, EDIT_OPTIONS_MAP, type ExtRow } from './constant';
|
|
129
|
+
|
|
130
|
+
/** 组件模式。0-新增,1-编辑,2-查看。 */
|
|
131
|
+
interface Props {
|
|
132
|
+
mode: 0 | 1 | 2;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
const props = defineProps<Props>();
|
|
136
|
+
const rows = ref<ExtRow[]>([]);
|
|
137
|
+
const tableRef = ref<InstanceType<typeof YEditTable>>();
|
|
138
|
+
const readonly = computed(() => props.mode === 2);
|
|
139
|
+
const columns = computed(() => (readonly.value ? EDIT_COLUMNS.filter(column => column.type !== 'action') : EDIT_COLUMNS));
|
|
140
|
+
const actionConfig = createActionConfig(row => {
|
|
141
|
+
rows.value = rows.value.filter(item => item._rowKey !== row._rowKey);
|
|
142
|
+
});
|
|
143
|
+
|
|
144
|
+
/** 处理组件 add 事件,显式更新 v-model:data。 */
|
|
145
|
+
const handleAddRow = () => {
|
|
146
|
+
rows.value = [...rows.value, createEmptyRow()];
|
|
147
|
+
};
|
|
148
|
+
|
|
149
|
+
/** 校验全部编辑行。 */
|
|
150
|
+
const validateRows = async (): Promise<boolean> => {
|
|
151
|
+
if (!tableRef.value) return false;
|
|
152
|
+
const { valid } = await tableRef.value.validate();
|
|
153
|
+
return valid;
|
|
154
|
+
};
|
|
155
|
+
</script>
|
|
156
|
+
|
|
157
|
+
<template>
|
|
158
|
+
<YEditTable
|
|
159
|
+
ref="tableRef"
|
|
160
|
+
v-model:data="rows"
|
|
161
|
+
:columns="columns"
|
|
162
|
+
:action-config="actionConfig"
|
|
163
|
+
:options-map="EDIT_OPTIONS_MAP"
|
|
164
|
+
:row-config="{ keyField: '_rowKey', useKey: true }"
|
|
165
|
+
:table-config="{ editConfig: { trigger: 'click', mode: 'row', autoClear: false } }"
|
|
166
|
+
:disabled="readonly"
|
|
167
|
+
:addable="!readonly"
|
|
168
|
+
add-btn-text="添加一行"
|
|
169
|
+
add-position="bottom"
|
|
170
|
+
@add="handleAddRow"
|
|
171
|
+
/>
|
|
172
|
+
</template>
|
|
173
|
+
|
|
174
|
+
<style scoped lang="less">
|
|
175
|
+
@import './style.less';
|
|
176
|
+
</style>
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
## Select 值类型边界
|
|
180
|
+
|
|
181
|
+
```typescript
|
|
182
|
+
/** allowCreate 对应 tags 模式,字段按数组存储。 */
|
|
183
|
+
interface CreatableRow {
|
|
184
|
+
tags?: string[];
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
const creatableColumn: YEditTableColumn = {
|
|
188
|
+
field: 'tags',
|
|
189
|
+
title: '标签',
|
|
190
|
+
component: 'form-item-select',
|
|
191
|
+
props: { allowCreate: true, placeholder: '请选择或输入标签' },
|
|
192
|
+
};
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
## 表头筛选
|
|
196
|
+
|
|
197
|
+
```typescript
|
|
198
|
+
const textFilterColumn: YEditTableColumn = {
|
|
199
|
+
field: 'columnName',
|
|
200
|
+
title: '目标列名称',
|
|
201
|
+
component: 'form-item-input',
|
|
202
|
+
filterable: true,
|
|
203
|
+
filters: [{ data: '' }],
|
|
204
|
+
filterMethod: ({ option, cellValue }) =>
|
|
205
|
+
String(cellValue ?? '').toLowerCase().includes(String(option?.data ?? '').trim().toLowerCase()),
|
|
206
|
+
filterRender: { name: 'VxeInput', props: { clearable: true, placeholder: '请输入关键词' } },
|
|
207
|
+
};
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
- 远程筛选监听 `@filter-change`,并设置 `filterMethod: () => true` 禁用本地二次筛选。
|
|
211
|
+
- 切换数据源或新增行后,可调用 `tableRef.value?.getTableInstance()?.clearFilter()`。
|
|
212
|
+
- 只在面板高度定制时使用 `#<field>-filter`;修改 `option.data` 后调用 `updateFilterOptionStatus(option, !!option.data)` 同步状态。
|
|
213
|
+
|
|
214
|
+
## 交付检查清单
|
|
215
|
+
|
|
216
|
+
- [ ] `addable/@add/v-model:data/addPosition` 形成真实新增闭环。
|
|
217
|
+
- [ ] `allowCreate` 和 `multiple` 未被错误组合,行字段类型与 Select 模式匹配。
|
|
218
|
+
- [ ] 查看态同时禁用编辑、隐藏添加按钮和移除操作列。
|
|
219
|
+
- [ ] `validate()` 按 `{ valid, errorMsg }` 处理,组件 ref 未就绪时不提交。
|
|
220
|
+
- [ ] API Hook 没有重复 `message.error`,前端临时 key 不传给后端。
|
|
221
|
+
|
|
222
|
+
## 失败兜底策略
|
|
223
|
+
|
|
224
|
+
- 添加按钮无反应时,先确认已监听 `@add` 并更新 `v-model:data`,不继续调整 `addPosition`。
|
|
225
|
+
- 查看态仍能删除/添加时,移除操作列并将 `addable` 设为 `false`,不只依赖 `disabled`。
|
|
226
|
+
- 可创建多选与字段类型冲突时,回到 `allowCreate => tags 数组`、`multiple => 现有候选多选` 的真实实现;当前组合能力不足时明确报告。
|
|
227
|
+
- API 联动失败时在 `finally` 恢复行级 loading,不捕获后重复 `message.error` 或继续使用失败结果。
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: api-integration
|
|
2
|
+
name: yss-api-integration
|
|
3
3
|
description: Guide AI to correctly use Orval-generated API clients in Vue 3 micro-applications. This skill must be used whenever the user needs backend API integration, including list queries, CRUD actions, detail loading, submit flows, or API refactoring. It covers type-safe API imports, request/response mapping, and especially standardized useRequest integration patterns (manual/run/runAsync, pagination parameters, unified error handling, loading state, and success callbacks).
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# API 集成 Skill
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
本目录是 API 集成的 canonical 技能;历史名称 `api-integration` 仅通过注册表和 Router alias 解析,不再维护第二份内容。
|
|
9
|
+
|
|
10
|
+
目录、frontmatter、注册表 ID 和 Router canonical 闭包键均为 `yss-api-integration`;历史名称 `api-integration` 只在注册表和 Router alias 表中解析为本技能。
|
|
9
11
|
|
|
10
12
|
## 📋 目标
|
|
11
13
|
|
|
@@ -56,6 +58,14 @@ packages/src/api/
|
|
|
56
58
|
|
|
57
59
|
## 🚀 使用步骤
|
|
58
60
|
|
|
61
|
+
## YSS canonical execution rules
|
|
62
|
+
|
|
63
|
+
- 先检查当前生成文件、`mutator.ts` 和冻结的 OpenAPI JSON 派生证据,不根据示例猜测导出名或响应形状。
|
|
64
|
+
- 普通 JSON 请求中,`success === false` 已由 mutator reject;业务 Hook 不得再写 `if (res?.success)` 或重复 `message.error`。
|
|
65
|
+
- loading 在 `finally` 中恢复;只有显式传入 `skipBusinessError` 或 `skipErrorHandler` 时,才允许实现局部错误交互。
|
|
66
|
+
- 文件流必须保留 `{ data, headers }`,交给 `file-export-download` 的 `handleBlobResponse`;不得修改生成文件。
|
|
67
|
+
- 长整型 ID 按冻结契约保持字符串,不得用 `Number`、`parseInt` 或位运算恢复为 number。
|
|
68
|
+
|
|
59
69
|
### 1. 查看可用 API
|
|
60
70
|
|
|
61
71
|
打开 `packages/src/api/generated/api.ts` 查看所有可用的 API 函数。
|
|
@@ -12,7 +12,7 @@ description: Use when YSS Vue 页面涉及布局、YTable、YEditTable、YFormil
|
|
|
12
12
|
- YSS UI 组件文档:`http://192.168.164.27:3200/components`(组件契约以该手册为准;本技能依据 2026-08-18 可见内容整理)
|
|
13
13
|
- 本地引用索引:`references/frontend-docs.md`
|
|
14
14
|
|
|
15
|
-
本技能只负责页面组件、布局和交互呈现规范。请求、分页参数、接口映射交给 `yss-hook` 或 `api-integration`;完整页面生成流程交给 `yss-page-module-development`;表格/树高度细节交给 `yss-use-table-height` 或 `yss-use-tree-height`。
|
|
15
|
+
本技能只负责页面组件、布局和交互呈现规范。请求、分页参数、接口映射交给 `yss-hook` 或 `yss-api-integration`;完整页面生成流程交给 `yss-page-module-development`;表格/树高度细节交给 `yss-use-table-height` 或 `yss-use-tree-height`。
|
|
16
16
|
|
|
17
17
|
组件文档与当前项目的已验证用法冲突时,先检查当前项目代码和依赖版本,再决定是否迁移;不得把上游 Ant Design Vue、vxe-table、Univer 或 Monaco 的未验证 API 当作 YSS 顶层契约。
|
|
18
18
|
|
|
@@ -89,7 +89,7 @@ description: Use when YSS 产品设计系统与 Ant Design 企业级 UI 风格
|
|
|
89
89
|
| YTable / YTree / 高度自适应 | `yss-components` / `yss-use-table-height` / `yss-use-tree-height` |
|
|
90
90
|
| 原型阶段的 Ant Design v6 组件 / token / demo 查询 | `yss-antd-design`(只用于原型设计构建;前端落地改用 `yss-ui`) |
|
|
91
91
|
| Codex 原型交接前的视觉 QA | `design-qa`;token / 字体对照读 `references/design-qa-theme.md`,以项目覆盖为准 |
|
|
92
|
-
| API 契约 / 接入 | `yss-openapi-governance` / `api-integration` |
|
|
92
|
+
| API 契约 / 接入 | `yss-openapi-governance` / `yss-api-integration` |
|
|
93
93
|
|
|
94
94
|
## 更新设计系统
|
|
95
95
|
|