create-yss-spec 3.4.6 → 3.4.7
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/package.json +1 -1
- package/template/.agents/skills/.strategic-design-skills-manifest.json +1 -1
- package/template/.agents/skills/.yss-skills-manifest.json +1 -8
- package/template/.agents/skills/formily-mode-slot-detail/SKILL.md +3 -4
- package/template/.agents/skills/yedit-table-usage/SKILL.md +2 -0
- package/template/.agents/skills/yss-ddd-scaffold-generator/SKILL.md +1 -1
- package/template/.agents/skills/yss-ddd-scaffold-generator/scripts/run_first_slice_verification.mjs +1 -2
- package/template/.agents/skills/yss-design-system/SKILL.md +2 -2
- package/template/.agents/skills/yss-formily/SKILL.md +2 -2
- package/template/.agents/skills/yss-frontend-scaffold-generator/SKILL.md +1 -1
- package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/README.md +1 -1
- package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/package.json +2 -2
- package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/pnpm-lock.yaml +158 -0
- package/template/.agents/skills/yss-frontend-scaffold-generator/references/data-quality-v1.manifest.json +3 -3
- package/template/.agents/skills/yss-frontend-scaffold-generator/scripts/scaffold-generator.test.mjs +5 -0
- package/template/.agents/skills/yss-hook/SKILL.md +3 -2
- package/template/.agents/skills/yss-implementation-contract-compiler/references/boundaries.md +1 -1
- package/template/.agents/skills/yss-layered-mvc-scaffold-generator/SKILL.md +1 -1
- package/template/.agents/skills/yss-layered-mvc-scaffold-generator/scripts/scaffold-generator.test.mjs +0 -7
- package/template/.agents/skills/yss-product-lifecycle/references/orchestration-contract.yaml +1 -3
- package/template/.agents/skills/yss-skill-source-index-refresh/references/source-map-config.md +3 -2
- package/template/.agents/skills/yss-skill-source-index-refresh/scripts/refresh-yss-skill-index.mjs +3 -2
- package/template/.agents/skills/yss-technical-design/SKILL.md +1 -1
- package/template/.agents/skills/yss-technical-design/references/technical-design-contract.md +1 -1
- package/template/.agents/skills/yss-technical-design/tests/run-scenarios.mjs +1 -2
- package/template/.agents/skills/yss-ui/SKILL.md +9 -6
- package/template/.agents/skills/yss-ui/references/component-routing.md +11 -4
- package/template/.agents/skills/yss-ui-business-page-generation/SKILL.md +5 -1
- package/template/.agents/skills/yss-ui-business-page-generation/references/hooks-map.md +3 -2
- package/template/.agents/skills/ytable-usage/SKILL.md +14 -7
- package/template/.agents/skills/ytree-usage/SKILL.md +1 -0
- package/template/.codex/skills/formily-mode-slot-detail/SKILL.md +3 -4
- package/template/.codex/skills/yedit-table-usage/SKILL.md +2 -0
- package/template/.codex/skills/yss-ddd-scaffold-generator/SKILL.md +1 -1
- package/template/.codex/skills/yss-ddd-scaffold-generator/scripts/run_first_slice_verification.mjs +1 -2
- package/template/.codex/skills/yss-design-system/SKILL.md +2 -2
- package/template/.codex/skills/yss-formily/SKILL.md +2 -2
- package/template/.codex/skills/yss-frontend-scaffold-generator/SKILL.md +1 -1
- package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/README.md +1 -1
- package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/package.json +2 -2
- package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/pnpm-lock.yaml +158 -0
- package/template/.codex/skills/yss-frontend-scaffold-generator/references/data-quality-v1.manifest.json +3 -3
- package/template/.codex/skills/yss-frontend-scaffold-generator/scripts/scaffold-generator.test.mjs +5 -0
- package/template/.codex/skills/yss-hook/SKILL.md +3 -2
- package/template/.codex/skills/yss-implementation-contract-compiler/references/boundaries.md +1 -1
- package/template/.codex/skills/yss-layered-mvc-scaffold-generator/SKILL.md +1 -1
- package/template/.codex/skills/yss-layered-mvc-scaffold-generator/scripts/scaffold-generator.test.mjs +0 -7
- package/template/.codex/skills/yss-product-lifecycle/references/orchestration-contract.yaml +1 -3
- package/template/.codex/skills/yss-skill-source-index-refresh/references/source-map-config.md +3 -2
- package/template/.codex/skills/yss-skill-source-index-refresh/scripts/refresh-yss-skill-index.mjs +3 -2
- package/template/.codex/skills/yss-technical-design/SKILL.md +1 -1
- package/template/.codex/skills/yss-technical-design/references/technical-design-contract.md +1 -1
- package/template/.codex/skills/yss-technical-design/tests/run-scenarios.mjs +1 -2
- package/template/.codex/skills/yss-ui/SKILL.md +9 -6
- package/template/.codex/skills/yss-ui/references/component-routing.md +11 -4
- package/template/.codex/skills/yss-ui-business-page-generation/SKILL.md +5 -1
- package/template/.codex/skills/yss-ui-business-page-generation/references/hooks-map.md +3 -2
- package/template/.codex/skills/ytable-usage/SKILL.md +14 -7
- package/template/.codex/skills/ytree-usage/SKILL.md +1 -0
- package/template/.cursor/skills/formily-mode-slot-detail/SKILL.md +3 -4
- package/template/.cursor/skills/yedit-table-usage/SKILL.md +2 -0
- package/template/.cursor/skills/yss-ddd-scaffold-generator/SKILL.md +1 -1
- package/template/.cursor/skills/yss-ddd-scaffold-generator/scripts/run_first_slice_verification.mjs +1 -2
- package/template/.cursor/skills/yss-design-system/SKILL.md +2 -2
- package/template/.cursor/skills/yss-formily/SKILL.md +2 -2
- package/template/.cursor/skills/yss-frontend-scaffold-generator/SKILL.md +1 -1
- package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/README.md +1 -1
- package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/package.json +2 -2
- package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/pnpm-lock.yaml +158 -0
- package/template/.cursor/skills/yss-frontend-scaffold-generator/references/data-quality-v1.manifest.json +3 -3
- package/template/.cursor/skills/yss-frontend-scaffold-generator/scripts/scaffold-generator.test.mjs +5 -0
- package/template/.cursor/skills/yss-hook/SKILL.md +3 -2
- package/template/.cursor/skills/yss-implementation-contract-compiler/references/boundaries.md +1 -1
- package/template/.cursor/skills/yss-layered-mvc-scaffold-generator/SKILL.md +1 -1
- package/template/.cursor/skills/yss-layered-mvc-scaffold-generator/scripts/scaffold-generator.test.mjs +0 -7
- package/template/.cursor/skills/yss-product-lifecycle/references/orchestration-contract.yaml +1 -3
- package/template/.cursor/skills/yss-skill-source-index-refresh/references/source-map-config.md +3 -2
- package/template/.cursor/skills/yss-skill-source-index-refresh/scripts/refresh-yss-skill-index.mjs +3 -2
- package/template/.cursor/skills/yss-technical-design/SKILL.md +1 -1
- package/template/.cursor/skills/yss-technical-design/references/technical-design-contract.md +1 -1
- package/template/.cursor/skills/yss-technical-design/tests/run-scenarios.mjs +1 -2
- package/template/.cursor/skills/yss-ui/SKILL.md +9 -6
- package/template/.cursor/skills/yss-ui/references/component-routing.md +11 -4
- package/template/.cursor/skills/yss-ui-business-page-generation/SKILL.md +5 -1
- package/template/.cursor/skills/yss-ui-business-page-generation/references/hooks-map.md +3 -2
- package/template/.cursor/skills/ytable-usage/SKILL.md +14 -7
- package/template/.cursor/skills/ytree-usage/SKILL.md +1 -0
- package/template/.pi/skills/formily-mode-slot-detail/SKILL.md +3 -4
- package/template/.pi/skills/yedit-table-usage/SKILL.md +2 -0
- package/template/.pi/skills/yss-ddd-scaffold-generator/SKILL.md +1 -1
- package/template/.pi/skills/yss-ddd-scaffold-generator/scripts/run_first_slice_verification.mjs +1 -2
- package/template/.pi/skills/yss-design-system/SKILL.md +2 -2
- package/template/.pi/skills/yss-formily/SKILL.md +2 -2
- package/template/.pi/skills/yss-frontend-scaffold-generator/SKILL.md +1 -1
- package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/README.md +1 -1
- package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/package.json +2 -2
- package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/pnpm-lock.yaml +158 -0
- package/template/.pi/skills/yss-frontend-scaffold-generator/references/data-quality-v1.manifest.json +3 -3
- package/template/.pi/skills/yss-frontend-scaffold-generator/scripts/scaffold-generator.test.mjs +5 -0
- package/template/.pi/skills/yss-hook/SKILL.md +3 -2
- package/template/.pi/skills/yss-implementation-contract-compiler/references/boundaries.md +1 -1
- package/template/.pi/skills/yss-layered-mvc-scaffold-generator/SKILL.md +1 -1
- package/template/.pi/skills/yss-layered-mvc-scaffold-generator/scripts/scaffold-generator.test.mjs +0 -7
- package/template/.pi/skills/yss-product-lifecycle/references/orchestration-contract.yaml +1 -3
- package/template/.pi/skills/yss-skill-source-index-refresh/references/source-map-config.md +3 -2
- package/template/.pi/skills/yss-skill-source-index-refresh/scripts/refresh-yss-skill-index.mjs +3 -2
- package/template/.pi/skills/yss-technical-design/SKILL.md +1 -1
- package/template/.pi/skills/yss-technical-design/references/technical-design-contract.md +1 -1
- package/template/.pi/skills/yss-technical-design/tests/run-scenarios.mjs +1 -2
- package/template/.pi/skills/yss-ui/SKILL.md +9 -6
- package/template/.pi/skills/yss-ui/references/component-routing.md +11 -4
- package/template/.pi/skills/yss-ui-business-page-generation/SKILL.md +5 -1
- package/template/.pi/skills/yss-ui-business-page-generation/references/hooks-map.md +3 -2
- package/template/.pi/skills/ytable-usage/SKILL.md +14 -7
- package/template/.pi/skills/ytree-usage/SKILL.md +1 -0
- package/template/docs/agents/digital-human-roles.yaml +2 -2
- package/template/docs/agents/skill-migrations.md +23 -10
- package/template/docs/agents/yss-skill-registry.yaml +3 -75
- package/template/scripts/lib/skill-registry.mjs +5 -1
- package/template/scripts/lib/skill-supply-chain.mjs +1 -1
- package/template/skills-lock.json +22 -149
- package/template/yss-public-skills.json +1 -5
- package/template.snapshot.json +4 -4
- package/template/.agents/skills/component-selection-imports/SKILL.md +0 -64
- package/template/.agents/skills/page-form-module/SKILL.md +0 -168
- package/template/.agents/skills/page-list-module/SKILL.md +0 -137
- package/template/.agents/skills/page-skeleton/SKILL.md +0 -76
- package/template/.agents/skills/page-skeleton/examples/AdvancedFormPage/constant.ts +0 -34
- package/template/.agents/skills/page-skeleton/examples/AdvancedFormPage/hooks/useRuleConfig.ts +0 -75
- package/template/.agents/skills/page-skeleton/examples/AdvancedFormPage/index.vue +0 -107
- package/template/.agents/skills/page-skeleton/examples/AdvancedFormPage/schemas/ruleConfigSchema.ts +0 -256
- package/template/.agents/skills/page-skeleton/examples/AdvancedFormPage/style.less +0 -30
- package/template/.agents/skills/page-skeleton/examples/StandardListPage/constant.ts +0 -28
- package/template/.agents/skills/page-skeleton/examples/StandardListPage/hooks/useQualityRuleList.ts +0 -58
- package/template/.agents/skills/page-skeleton/examples/StandardListPage/hooks/useRuleActions.ts +0 -65
- package/template/.agents/skills/page-skeleton/examples/StandardListPage/index.vue +0 -91
- package/template/.agents/skills/page-skeleton/examples/StandardListPage/style.less +0 -49
- package/template/.agents/skills/vue3-best-practices/SKILL.md +0 -68
- package/template/.agents/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-parent/SKILL.md +0 -12
- package/template/.agents/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-parent/agents/openai.yaml +0 -5
- package/template/.agents/skills/yss-mvc-data-analysis-project-initializer/SKILL.md +0 -12
- package/template/.agents/skills/yss-mvc-data-analysis-project-initializer/scripts/generate_project.mjs +0 -18
- package/template/.agents/skills/yss-mvc-data-analysis-project-initializer/scripts/run_scaffold_verification.mjs +0 -9
- package/template/.agents/skills/yss-mvc-design/SKILL.md +0 -12
- package/template/.agents/skills/yss-mvc-design/agents/openai.yaml +0 -4
- package/template/.agents/skills/yss-mvc-design/references/mvc-design.schema.json +0 -315
- package/template/.agents/skills/yss-use-table-height/SKILL.md +0 -130
- package/template/.agents/skills/yss-use-table-height/agents/openai.yaml +0 -5
- package/template/.agents/skills/yss-use-table-height/references/frontend-docs.md +0 -9
- package/template/.agents/skills/yss-use-tree-height/SKILL.md +0 -98
- package/template/.agents/skills/yss-use-tree-height/agents/openai.yaml +0 -5
- package/template/.agents/skills/yss-use-tree-height/references/frontend-docs.md +0 -9
- package/template/.codex/skills/component-selection-imports/SKILL.md +0 -64
- package/template/.codex/skills/page-form-module/SKILL.md +0 -168
- package/template/.codex/skills/page-list-module/SKILL.md +0 -137
- package/template/.codex/skills/page-skeleton/SKILL.md +0 -76
- package/template/.codex/skills/page-skeleton/examples/AdvancedFormPage/constant.ts +0 -34
- package/template/.codex/skills/page-skeleton/examples/AdvancedFormPage/hooks/useRuleConfig.ts +0 -75
- package/template/.codex/skills/page-skeleton/examples/AdvancedFormPage/index.vue +0 -107
- package/template/.codex/skills/page-skeleton/examples/AdvancedFormPage/schemas/ruleConfigSchema.ts +0 -256
- package/template/.codex/skills/page-skeleton/examples/AdvancedFormPage/style.less +0 -30
- package/template/.codex/skills/page-skeleton/examples/StandardListPage/constant.ts +0 -28
- package/template/.codex/skills/page-skeleton/examples/StandardListPage/hooks/useQualityRuleList.ts +0 -58
- package/template/.codex/skills/page-skeleton/examples/StandardListPage/hooks/useRuleActions.ts +0 -65
- package/template/.codex/skills/page-skeleton/examples/StandardListPage/index.vue +0 -91
- package/template/.codex/skills/page-skeleton/examples/StandardListPage/style.less +0 -49
- package/template/.codex/skills/vue3-best-practices/SKILL.md +0 -68
- package/template/.codex/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-parent/SKILL.md +0 -12
- package/template/.codex/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-parent/agents/openai.yaml +0 -5
- package/template/.codex/skills/yss-mvc-data-analysis-project-initializer/SKILL.md +0 -12
- package/template/.codex/skills/yss-mvc-data-analysis-project-initializer/scripts/generate_project.mjs +0 -18
- package/template/.codex/skills/yss-mvc-data-analysis-project-initializer/scripts/run_scaffold_verification.mjs +0 -9
- package/template/.codex/skills/yss-mvc-design/SKILL.md +0 -12
- package/template/.codex/skills/yss-mvc-design/agents/openai.yaml +0 -4
- package/template/.codex/skills/yss-mvc-design/references/mvc-design.schema.json +0 -315
- package/template/.codex/skills/yss-use-table-height/SKILL.md +0 -130
- package/template/.codex/skills/yss-use-table-height/agents/openai.yaml +0 -5
- package/template/.codex/skills/yss-use-table-height/references/frontend-docs.md +0 -9
- package/template/.codex/skills/yss-use-tree-height/SKILL.md +0 -98
- package/template/.codex/skills/yss-use-tree-height/agents/openai.yaml +0 -5
- package/template/.codex/skills/yss-use-tree-height/references/frontend-docs.md +0 -9
- package/template/.cursor/skills/component-selection-imports/SKILL.md +0 -64
- package/template/.cursor/skills/page-form-module/SKILL.md +0 -168
- package/template/.cursor/skills/page-list-module/SKILL.md +0 -137
- package/template/.cursor/skills/page-skeleton/SKILL.md +0 -76
- package/template/.cursor/skills/page-skeleton/examples/AdvancedFormPage/constant.ts +0 -34
- package/template/.cursor/skills/page-skeleton/examples/AdvancedFormPage/hooks/useRuleConfig.ts +0 -75
- package/template/.cursor/skills/page-skeleton/examples/AdvancedFormPage/index.vue +0 -107
- package/template/.cursor/skills/page-skeleton/examples/AdvancedFormPage/schemas/ruleConfigSchema.ts +0 -256
- package/template/.cursor/skills/page-skeleton/examples/AdvancedFormPage/style.less +0 -30
- package/template/.cursor/skills/page-skeleton/examples/StandardListPage/constant.ts +0 -28
- package/template/.cursor/skills/page-skeleton/examples/StandardListPage/hooks/useQualityRuleList.ts +0 -58
- package/template/.cursor/skills/page-skeleton/examples/StandardListPage/hooks/useRuleActions.ts +0 -65
- package/template/.cursor/skills/page-skeleton/examples/StandardListPage/index.vue +0 -91
- package/template/.cursor/skills/page-skeleton/examples/StandardListPage/style.less +0 -49
- package/template/.cursor/skills/vue3-best-practices/SKILL.md +0 -68
- package/template/.cursor/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-parent/SKILL.md +0 -12
- package/template/.cursor/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-parent/agents/openai.yaml +0 -5
- package/template/.cursor/skills/yss-mvc-data-analysis-project-initializer/SKILL.md +0 -12
- package/template/.cursor/skills/yss-mvc-data-analysis-project-initializer/scripts/generate_project.mjs +0 -18
- package/template/.cursor/skills/yss-mvc-data-analysis-project-initializer/scripts/run_scaffold_verification.mjs +0 -9
- package/template/.cursor/skills/yss-mvc-design/SKILL.md +0 -12
- package/template/.cursor/skills/yss-mvc-design/agents/openai.yaml +0 -4
- package/template/.cursor/skills/yss-mvc-design/references/mvc-design.schema.json +0 -315
- package/template/.cursor/skills/yss-use-table-height/SKILL.md +0 -130
- package/template/.cursor/skills/yss-use-table-height/agents/openai.yaml +0 -5
- package/template/.cursor/skills/yss-use-table-height/references/frontend-docs.md +0 -9
- package/template/.cursor/skills/yss-use-tree-height/SKILL.md +0 -98
- package/template/.cursor/skills/yss-use-tree-height/agents/openai.yaml +0 -5
- package/template/.cursor/skills/yss-use-tree-height/references/frontend-docs.md +0 -9
- package/template/.pi/skills/component-selection-imports/SKILL.md +0 -64
- package/template/.pi/skills/page-form-module/SKILL.md +0 -168
- package/template/.pi/skills/page-list-module/SKILL.md +0 -137
- package/template/.pi/skills/page-skeleton/SKILL.md +0 -76
- package/template/.pi/skills/page-skeleton/examples/AdvancedFormPage/constant.ts +0 -34
- package/template/.pi/skills/page-skeleton/examples/AdvancedFormPage/hooks/useRuleConfig.ts +0 -75
- package/template/.pi/skills/page-skeleton/examples/AdvancedFormPage/index.vue +0 -107
- package/template/.pi/skills/page-skeleton/examples/AdvancedFormPage/schemas/ruleConfigSchema.ts +0 -256
- package/template/.pi/skills/page-skeleton/examples/AdvancedFormPage/style.less +0 -30
- package/template/.pi/skills/page-skeleton/examples/StandardListPage/constant.ts +0 -28
- package/template/.pi/skills/page-skeleton/examples/StandardListPage/hooks/useQualityRuleList.ts +0 -58
- package/template/.pi/skills/page-skeleton/examples/StandardListPage/hooks/useRuleActions.ts +0 -65
- package/template/.pi/skills/page-skeleton/examples/StandardListPage/index.vue +0 -91
- package/template/.pi/skills/page-skeleton/examples/StandardListPage/style.less +0 -49
- package/template/.pi/skills/vue3-best-practices/SKILL.md +0 -68
- package/template/.pi/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-parent/SKILL.md +0 -12
- package/template/.pi/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-parent/agents/openai.yaml +0 -5
- package/template/.pi/skills/yss-mvc-data-analysis-project-initializer/SKILL.md +0 -12
- package/template/.pi/skills/yss-mvc-data-analysis-project-initializer/scripts/generate_project.mjs +0 -18
- package/template/.pi/skills/yss-mvc-data-analysis-project-initializer/scripts/run_scaffold_verification.mjs +0 -9
- package/template/.pi/skills/yss-mvc-design/SKILL.md +0 -12
- package/template/.pi/skills/yss-mvc-design/agents/openai.yaml +0 -4
- package/template/.pi/skills/yss-mvc-design/references/mvc-design.schema.json +0 -315
- package/template/.pi/skills/yss-use-table-height/SKILL.md +0 -130
- package/template/.pi/skills/yss-use-table-height/agents/openai.yaml +0 -5
- package/template/.pi/skills/yss-use-table-height/references/frontend-docs.md +0 -9
- package/template/.pi/skills/yss-use-tree-height/SKILL.md +0 -98
- package/template/.pi/skills/yss-use-tree-height/agents/openai.yaml +0 -5
- package/template/.pi/skills/yss-use-tree-height/references/frontend-docs.md +0 -9
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import process from "node:process";
|
|
3
|
-
import { fileURLToPath } from "node:url";
|
|
4
|
-
|
|
5
|
-
export function deprecatedInitializerError() {
|
|
6
|
-
const error = new Error("skill-deprecated: yss-mvc-data-analysis-project-initializer 已由 yss-layered-mvc-scaffold-generator 的 mvc-data-analysis-v1 Profile 替代;旧合同必须标记 stale 并重新编译");
|
|
7
|
-
error.code = "skill-deprecated";
|
|
8
|
-
return error;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export async function initialize() {
|
|
12
|
-
throw deprecatedInitializerError();
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
if (process.argv[1] === fileURLToPath(import.meta.url)) {
|
|
16
|
-
process.stderr.write(`${deprecatedInitializerError().message}\n`);
|
|
17
|
-
process.exitCode = 1;
|
|
18
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { run } from "../../yss-ddd-scaffold-generator/scripts/run_scaffold_verification.mjs";
|
|
3
|
-
try {
|
|
4
|
-
const [projectRoot, evidenceDir] = process.argv.slice(2);
|
|
5
|
-
if (!projectRoot || !evidenceDir) throw new Error("用法: run_scaffold_verification.mjs <project-root> <evidence-dir>");
|
|
6
|
-
const report = await run(projectRoot, evidenceDir);
|
|
7
|
-
process.stdout.write(`${JSON.stringify(report, null, 2)}\n`);
|
|
8
|
-
process.exitCode = report.status === "passed" ? 0 : 1;
|
|
9
|
-
} catch (error) { process.stderr.write(`${error.message}\n`); process.exitCode = 1; }
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: yss-mvc-design
|
|
3
|
-
description: 迁移历史 yss-mvc-design 引用到 yss-technical-design;不再承接新的 MVC 技术设计。
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# YSS MVC 技术设计(Deprecated)
|
|
7
|
-
|
|
8
|
-
本入口处于 `migration-only`。新的 MVC 技术设计统一使用 `yss-technical-design`;本入口不再拥有 capability、Recipe、typed dependency 或设计批准责任,也不得进入新的 Technical Design 或 Slice Contract。
|
|
9
|
-
|
|
10
|
-
发现旧合同、任务包或调用方引用本 ID 时,返回 `skill-deprecated`,报告替代入口 `yss-technical-design`,并把旧合同标记为 `stale` 后重新编译。不得静默替换 Skill、继承旧批准或自动设置 `ready-for-agent`。
|
|
11
|
-
|
|
12
|
-
`references/mvc-design.schema.json` 在退役期保持只读,仅用于与 `yss-technical-design/references/mvc-design.schema.json` 做语义等价检查。新合同不得引用本目录。迁移关系由 `docs/agents/skill-migrations.md` 记录;硬退役后不保留 alias。
|
|
@@ -1,315 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"type": "object",
|
|
3
|
-
"properties": {
|
|
4
|
-
"module_catalog": {
|
|
5
|
-
"type": "array",
|
|
6
|
-
"minItems": 1,
|
|
7
|
-
"items": {
|
|
8
|
-
"type": "object",
|
|
9
|
-
"properties": {
|
|
10
|
-
"module_id": {
|
|
11
|
-
"type": "string",
|
|
12
|
-
"minLength": 1
|
|
13
|
-
},
|
|
14
|
-
"responsibility": {
|
|
15
|
-
"type": "string",
|
|
16
|
-
"minLength": 1
|
|
17
|
-
},
|
|
18
|
-
"layer": {
|
|
19
|
-
"enum": [
|
|
20
|
-
"server",
|
|
21
|
-
"service",
|
|
22
|
-
"core",
|
|
23
|
-
"repository",
|
|
24
|
-
"adapter",
|
|
25
|
-
"client",
|
|
26
|
-
"feign-client"
|
|
27
|
-
]
|
|
28
|
-
},
|
|
29
|
-
"depends_on": {
|
|
30
|
-
"type": "array",
|
|
31
|
-
"items": {
|
|
32
|
-
"type": "string",
|
|
33
|
-
"minLength": 1
|
|
34
|
-
},
|
|
35
|
-
"uniqueItems": true
|
|
36
|
-
}
|
|
37
|
-
},
|
|
38
|
-
"required": [
|
|
39
|
-
"module_id",
|
|
40
|
-
"responsibility",
|
|
41
|
-
"layer",
|
|
42
|
-
"depends_on"
|
|
43
|
-
],
|
|
44
|
-
"additionalProperties": false
|
|
45
|
-
}
|
|
46
|
-
},
|
|
47
|
-
"use_case_catalog": {
|
|
48
|
-
"type": "array",
|
|
49
|
-
"minItems": 1,
|
|
50
|
-
"items": {
|
|
51
|
-
"type": "object",
|
|
52
|
-
"properties": {
|
|
53
|
-
"use_case_id": {
|
|
54
|
-
"type": "string",
|
|
55
|
-
"minLength": 1
|
|
56
|
-
},
|
|
57
|
-
"module_ref": {
|
|
58
|
-
"type": "string",
|
|
59
|
-
"minLength": 1
|
|
60
|
-
},
|
|
61
|
-
"flow": {
|
|
62
|
-
"type": "array",
|
|
63
|
-
"items": {
|
|
64
|
-
"type": "string",
|
|
65
|
-
"minLength": 1
|
|
66
|
-
},
|
|
67
|
-
"uniqueItems": true,
|
|
68
|
-
"minItems": 1
|
|
69
|
-
},
|
|
70
|
-
"rule_refs": {
|
|
71
|
-
"type": "array",
|
|
72
|
-
"items": {
|
|
73
|
-
"type": "string",
|
|
74
|
-
"minLength": 1
|
|
75
|
-
},
|
|
76
|
-
"uniqueItems": true,
|
|
77
|
-
"minItems": 1
|
|
78
|
-
},
|
|
79
|
-
"failure_handling": {
|
|
80
|
-
"type": "string",
|
|
81
|
-
"minLength": 1
|
|
82
|
-
}
|
|
83
|
-
},
|
|
84
|
-
"required": [
|
|
85
|
-
"use_case_id",
|
|
86
|
-
"module_ref",
|
|
87
|
-
"flow",
|
|
88
|
-
"rule_refs",
|
|
89
|
-
"failure_handling"
|
|
90
|
-
],
|
|
91
|
-
"additionalProperties": false
|
|
92
|
-
}
|
|
93
|
-
},
|
|
94
|
-
"rule_catalog": {
|
|
95
|
-
"type": "array",
|
|
96
|
-
"minItems": 1,
|
|
97
|
-
"items": {
|
|
98
|
-
"type": "object",
|
|
99
|
-
"properties": {
|
|
100
|
-
"rule_id": {
|
|
101
|
-
"type": "string",
|
|
102
|
-
"minLength": 1
|
|
103
|
-
},
|
|
104
|
-
"statement": {
|
|
105
|
-
"type": "string",
|
|
106
|
-
"minLength": 1
|
|
107
|
-
},
|
|
108
|
-
"use_case_refs": {
|
|
109
|
-
"type": "array",
|
|
110
|
-
"items": {
|
|
111
|
-
"type": "string",
|
|
112
|
-
"minLength": 1
|
|
113
|
-
},
|
|
114
|
-
"uniqueItems": true,
|
|
115
|
-
"minItems": 1
|
|
116
|
-
}
|
|
117
|
-
},
|
|
118
|
-
"required": [
|
|
119
|
-
"rule_id",
|
|
120
|
-
"statement",
|
|
121
|
-
"use_case_refs"
|
|
122
|
-
],
|
|
123
|
-
"additionalProperties": false
|
|
124
|
-
}
|
|
125
|
-
},
|
|
126
|
-
"state_transition_catalog": {
|
|
127
|
-
"type": "array",
|
|
128
|
-
"minItems": 0,
|
|
129
|
-
"items": {
|
|
130
|
-
"type": "object",
|
|
131
|
-
"properties": {
|
|
132
|
-
"transition_id": {
|
|
133
|
-
"type": "string",
|
|
134
|
-
"minLength": 1
|
|
135
|
-
},
|
|
136
|
-
"use_case_ref": {
|
|
137
|
-
"type": "string",
|
|
138
|
-
"minLength": 1
|
|
139
|
-
},
|
|
140
|
-
"from": {
|
|
141
|
-
"type": "string",
|
|
142
|
-
"minLength": 1
|
|
143
|
-
},
|
|
144
|
-
"to": {
|
|
145
|
-
"type": "string",
|
|
146
|
-
"minLength": 1
|
|
147
|
-
},
|
|
148
|
-
"guard": {
|
|
149
|
-
"type": "string",
|
|
150
|
-
"minLength": 1
|
|
151
|
-
}
|
|
152
|
-
},
|
|
153
|
-
"required": [
|
|
154
|
-
"transition_id",
|
|
155
|
-
"use_case_ref",
|
|
156
|
-
"from",
|
|
157
|
-
"to",
|
|
158
|
-
"guard"
|
|
159
|
-
],
|
|
160
|
-
"additionalProperties": false
|
|
161
|
-
}
|
|
162
|
-
},
|
|
163
|
-
"state_not_applicable_reason": {
|
|
164
|
-
"type": "string"
|
|
165
|
-
},
|
|
166
|
-
"consistency_policy": {
|
|
167
|
-
"type": "object",
|
|
168
|
-
"properties": {
|
|
169
|
-
"transaction_boundary": {
|
|
170
|
-
"type": "string",
|
|
171
|
-
"minLength": 1
|
|
172
|
-
},
|
|
173
|
-
"rollback": {
|
|
174
|
-
"type": "string",
|
|
175
|
-
"minLength": 1
|
|
176
|
-
},
|
|
177
|
-
"concurrency": {
|
|
178
|
-
"type": "string",
|
|
179
|
-
"minLength": 1
|
|
180
|
-
},
|
|
181
|
-
"idempotency": {
|
|
182
|
-
"type": "string",
|
|
183
|
-
"minLength": 1
|
|
184
|
-
}
|
|
185
|
-
},
|
|
186
|
-
"required": [
|
|
187
|
-
"transaction_boundary",
|
|
188
|
-
"rollback",
|
|
189
|
-
"concurrency",
|
|
190
|
-
"idempotency"
|
|
191
|
-
],
|
|
192
|
-
"additionalProperties": false
|
|
193
|
-
},
|
|
194
|
-
"persistence_mapping": {
|
|
195
|
-
"type": "array",
|
|
196
|
-
"minItems": 1,
|
|
197
|
-
"items": {
|
|
198
|
-
"type": "object",
|
|
199
|
-
"properties": {
|
|
200
|
-
"mapping_id": {
|
|
201
|
-
"type": "string",
|
|
202
|
-
"minLength": 1
|
|
203
|
-
},
|
|
204
|
-
"use_case_ref": {
|
|
205
|
-
"type": "string",
|
|
206
|
-
"minLength": 1
|
|
207
|
-
},
|
|
208
|
-
"repository_ref": {
|
|
209
|
-
"type": "string",
|
|
210
|
-
"minLength": 1
|
|
211
|
-
},
|
|
212
|
-
"storage_model": {
|
|
213
|
-
"type": "string",
|
|
214
|
-
"minLength": 1
|
|
215
|
-
},
|
|
216
|
-
"notes": {
|
|
217
|
-
"type": "string",
|
|
218
|
-
"minLength": 1
|
|
219
|
-
}
|
|
220
|
-
},
|
|
221
|
-
"required": [
|
|
222
|
-
"mapping_id",
|
|
223
|
-
"use_case_ref",
|
|
224
|
-
"repository_ref",
|
|
225
|
-
"storage_model",
|
|
226
|
-
"notes"
|
|
227
|
-
],
|
|
228
|
-
"additionalProperties": false
|
|
229
|
-
}
|
|
230
|
-
},
|
|
231
|
-
"integration_catalog": {
|
|
232
|
-
"type": "array",
|
|
233
|
-
"minItems": 0,
|
|
234
|
-
"items": {
|
|
235
|
-
"type": "object",
|
|
236
|
-
"properties": {
|
|
237
|
-
"integration_id": {
|
|
238
|
-
"type": "string",
|
|
239
|
-
"minLength": 1
|
|
240
|
-
},
|
|
241
|
-
"adapter_ref": {
|
|
242
|
-
"type": "string",
|
|
243
|
-
"minLength": 1
|
|
244
|
-
},
|
|
245
|
-
"capability": {
|
|
246
|
-
"type": "string",
|
|
247
|
-
"minLength": 1
|
|
248
|
-
},
|
|
249
|
-
"failure_handling": {
|
|
250
|
-
"type": "string",
|
|
251
|
-
"minLength": 1
|
|
252
|
-
}
|
|
253
|
-
},
|
|
254
|
-
"required": [
|
|
255
|
-
"integration_id",
|
|
256
|
-
"adapter_ref",
|
|
257
|
-
"capability",
|
|
258
|
-
"failure_handling"
|
|
259
|
-
],
|
|
260
|
-
"additionalProperties": false
|
|
261
|
-
}
|
|
262
|
-
},
|
|
263
|
-
"integration_not_applicable_reason": {
|
|
264
|
-
"type": "string"
|
|
265
|
-
},
|
|
266
|
-
"test_seams": {
|
|
267
|
-
"type": "array",
|
|
268
|
-
"minItems": 1,
|
|
269
|
-
"items": {
|
|
270
|
-
"type": "object",
|
|
271
|
-
"properties": {
|
|
272
|
-
"seam_id": {
|
|
273
|
-
"type": "string",
|
|
274
|
-
"minLength": 1
|
|
275
|
-
},
|
|
276
|
-
"kind": {
|
|
277
|
-
"type": "string",
|
|
278
|
-
"minLength": 1
|
|
279
|
-
},
|
|
280
|
-
"subject_ref": {
|
|
281
|
-
"type": "string",
|
|
282
|
-
"minLength": 1
|
|
283
|
-
},
|
|
284
|
-
"assertion": {
|
|
285
|
-
"type": "string",
|
|
286
|
-
"minLength": 1
|
|
287
|
-
}
|
|
288
|
-
},
|
|
289
|
-
"required": [
|
|
290
|
-
"seam_id",
|
|
291
|
-
"kind",
|
|
292
|
-
"subject_ref",
|
|
293
|
-
"assertion"
|
|
294
|
-
],
|
|
295
|
-
"additionalProperties": false
|
|
296
|
-
}
|
|
297
|
-
}
|
|
298
|
-
},
|
|
299
|
-
"required": [
|
|
300
|
-
"module_catalog",
|
|
301
|
-
"use_case_catalog",
|
|
302
|
-
"rule_catalog",
|
|
303
|
-
"state_transition_catalog",
|
|
304
|
-
"state_not_applicable_reason",
|
|
305
|
-
"consistency_policy",
|
|
306
|
-
"persistence_mapping",
|
|
307
|
-
"integration_catalog",
|
|
308
|
-
"integration_not_applicable_reason",
|
|
309
|
-
"test_seams"
|
|
310
|
-
],
|
|
311
|
-
"additionalProperties": false,
|
|
312
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
313
|
-
"$id": "https://yss.dev/schemas/mvc-design-v1.json",
|
|
314
|
-
"title": "YSS MVC 技术设计内容"
|
|
315
|
-
}
|
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: yss-use-table-height
|
|
3
|
-
description: "用 useTableHeight 修复 YTable、YEditTable 自适应高度、双滚动条及分页或工具栏偏移。"
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# useTableHeight 使用
|
|
7
|
-
|
|
8
|
-
## 触发条件
|
|
9
|
-
|
|
10
|
-
- YTable/YEditTable 需要自适应滚动高度,或页面出现双滚动条、底部空白和容器撑开闪烁。
|
|
11
|
-
- 表格内含分页、工具栏、添加按钮,或位于弹窗/抽屉/shrink-wrap 容器内。
|
|
12
|
-
|
|
13
|
-
## 不适用场景
|
|
14
|
-
|
|
15
|
-
- 纯短表且页面不需要独立滚动区。
|
|
16
|
-
- 当前布局组件已完整托管表格高度,且没有内部偏移需要扣减。
|
|
17
|
-
|
|
18
|
-
## 实施流程
|
|
19
|
-
|
|
20
|
-
1. MCP 可用时,先用 `get_component_docs` 精确查询 `useTableHeight`,需要示例时再调用 `get_demo`;不要仅凭 Skill 中的静态签名推断当前 API。
|
|
21
|
-
2. 精确查询无结果时,先用 `search_docs` 校正名称;仅在 MCP 不可用、调用失败或仍无结果时,回退读取最新 `llms-full.txt`。文档版本与当前依赖不一致时,再核对 Hook 源码、CodeGraph 和真实导出。
|
|
22
|
-
3. 先确认容器是稳定 flex 区域还是被表格内容撑开的 shrink-wrap 区域。
|
|
23
|
-
4. 盘点表格内部实际开启的分页、工具栏、YEditTable 添加按钮和额外 padding。
|
|
24
|
-
5. 把受约束的容器 `ref` 传给 Hook,将 `tableHeight` 绑定到表格 `height`。
|
|
25
|
-
6. 在弹窗/抽屉动画结束或布局切换后视情况调用 `recalculateHeight()` 验证最终高度。
|
|
26
|
-
|
|
27
|
-
## 硬约束(禁止/必须)
|
|
28
|
-
|
|
29
|
-
- 使用真实签名 `useTableHeight(tableAreaRef, options)` 和真实返回值 `tableHeight/isReady/recalculateHeight`。
|
|
30
|
-
- `tableAreaRef` 支持原生 DOM 或 Vue 组件实例(如 `YCard`)。绑定 DOM 时使用表格的直接父容器;绑定 Card 时 Hook 会尝试获取 `.ant-card-body`。
|
|
31
|
-
- 稳定布局使用“外层可计算高度 + flex column,表格区 `flex: 1; min-height: 0; overflow: hidden`”。禁止用大常量高度替代 Hook。
|
|
32
|
-
- YTable 开启 `pageable` 时设置 `withPagination: true`;开启 `toolbarConfig.custom` 或工具栏插槽时设置 `withToolbar: true`;YEditTable 显示 `addable` 按钮时设置 `withAddButton: true`。
|
|
33
|
-
- 默认偏移常量分别是分页 48px、工具栏 48px、添加按钮 40px;只在实际样式不同时使用 `paginationHeight/toolbarHeight/addButtonHeight` 覆盖。
|
|
34
|
-
- 把结果绑定到 `YTable/YEditTable` 的 `:height="tableHeight"`,不只设置 `max-height`。
|
|
35
|
-
- 直属容器由表格内容撑开时,不要观察该容器形成“子元素改变父高度、父高度又改变子元素”循环;传入更外层稳定容器 `boundaryRef`,并用 `extraOffset` 扣除边界内其他区域。
|
|
36
|
-
- Hook 已用 `ResizeObserver` 监听容器尺寸。不强制为每个弹窗/抽屉写 watch;只在动画或隐藏初始化导致高度不准时,于可见后 `nextTick(recalculateHeight)`。
|
|
37
|
-
|
|
38
|
-
## 标准代码骨架
|
|
39
|
-
|
|
40
|
-
```vue
|
|
41
|
-
<script setup lang="ts">
|
|
42
|
-
import { ref } from 'vue';
|
|
43
|
-
import { YTable, type YTableColumn } from '@yss-ui/components';
|
|
44
|
-
import { useTableHeight } from '@yss-ui/hooks';
|
|
45
|
-
|
|
46
|
-
const tableAreaRef = ref<HTMLDivElement>();
|
|
47
|
-
const dataList = ref<Array<{ id: string; name: string }>>([]);
|
|
48
|
-
const columns: YTableColumn[] = [
|
|
49
|
-
{ type: 'seq', title: '序号', width: 70 },
|
|
50
|
-
{ field: 'name', title: '名称', minWidth: 180 },
|
|
51
|
-
];
|
|
52
|
-
const { tableHeight, isReady, recalculateHeight } = useTableHeight(tableAreaRef, {
|
|
53
|
-
withPagination: true,
|
|
54
|
-
withToolbar: true,
|
|
55
|
-
});
|
|
56
|
-
</script>
|
|
57
|
-
|
|
58
|
-
<template>
|
|
59
|
-
<div class="page">
|
|
60
|
-
<div ref="tableAreaRef" class="table-area">
|
|
61
|
-
<YTable
|
|
62
|
-
v-if="isReady"
|
|
63
|
-
:height="tableHeight"
|
|
64
|
-
:data="dataList"
|
|
65
|
-
:columns="columns"
|
|
66
|
-
:toolbar-config="{ custom: true }"
|
|
67
|
-
pageable
|
|
68
|
-
/>
|
|
69
|
-
</div>
|
|
70
|
-
</div>
|
|
71
|
-
</template>
|
|
72
|
-
|
|
73
|
-
<style scoped lang="less">
|
|
74
|
-
@import './style.less';
|
|
75
|
-
</style>
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
```less
|
|
79
|
-
/* style.less */
|
|
80
|
-
.page {
|
|
81
|
-
height: 100%;
|
|
82
|
-
display: flex;
|
|
83
|
-
flex-direction: column;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
.table-area {
|
|
87
|
-
flex: 1;
|
|
88
|
-
min-height: 0;
|
|
89
|
-
overflow: hidden;
|
|
90
|
-
}
|
|
91
|
-
```
|
|
92
|
-
|
|
93
|
-
## shrink-wrap 容器
|
|
94
|
-
|
|
95
|
-
```typescript
|
|
96
|
-
const tableAreaRef = ref<HTMLDivElement>();
|
|
97
|
-
const boundaryRef = ref<HTMLDivElement>();
|
|
98
|
-
|
|
99
|
-
const { tableHeight } = useTableHeight(tableAreaRef, {
|
|
100
|
-
boundaryRef,
|
|
101
|
-
});
|
|
102
|
-
```
|
|
103
|
-
|
|
104
|
-
`extraOffset` 必须来自可说明的实际布局占位;如果区域高度会变,优先改成稳定 flex 布局,不固定一个近似大数。
|
|
105
|
-
|
|
106
|
-
## 弹层可见后补算
|
|
107
|
-
|
|
108
|
-
```typescript
|
|
109
|
-
import { nextTick } from 'vue';
|
|
110
|
-
|
|
111
|
-
/** 弹层完全展开后重算表格高度。 */
|
|
112
|
-
const handleAfterOpenChange = async (open: boolean) => {
|
|
113
|
-
if (!open) return;
|
|
114
|
-
await nextTick();
|
|
115
|
-
recalculateHeight();
|
|
116
|
-
};
|
|
117
|
-
```
|
|
118
|
-
|
|
119
|
-
## 交付检查清单
|
|
120
|
-
|
|
121
|
-
- [ ] 观察容器具有稳定高度,需要时已使用 `boundaryRef`。
|
|
122
|
-
- [ ] 分页、工具栏、添加按钮的偏移与实际开关一致,未重复扣减。
|
|
123
|
-
- [ ] 表格绑定 `height`,容器有 `min-height: 0`,无双滚动条和底部大空白。
|
|
124
|
-
- [ ] 只在实际出现隐藏态/动画时机问题时手动调用 `recalculateHeight()`。
|
|
125
|
-
|
|
126
|
-
## 失败兜底策略
|
|
127
|
-
|
|
128
|
-
- 高度持续闪烁时,检查被观察容器是否由表格内容撑开;是则使用稳定 `boundaryRef` 或改为 flex 布局。
|
|
129
|
-
- 底部空白或内容被遮挡时,逐项核对 `withPagination/withToolbar/withAddButton` 与实际开关,不反复调大 `extraOffset`。
|
|
130
|
-
- 弹层首次打开高度不准时,在可见或动画结束后 `nextTick(recalculateHeight)`;正常 ResizeObserver 已生效时不增加重复 watch。
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
# yss-use-table-height Frontend Documentation
|
|
2
|
-
|
|
3
|
-
Generated: 2026-08-17T12:03:37.436Z
|
|
4
|
-
|
|
5
|
-
Use these YSS UI documentation entry points as authoritative references when local repo examples are insufficient.
|
|
6
|
-
|
|
7
|
-
- hooks: http://192.168.164.27:3200/hooks
|
|
8
|
-
|
|
9
|
-
When documentation and local code differ, inspect the current project code before editing and prefer established local usage.
|
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: yss-use-tree-height
|
|
3
|
-
description: "用 useTreeHeight 实现 YTree 独立滚动,修复搜索区、Tab 或抽屉切换后的高度。"
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# useTreeHeight 使用
|
|
7
|
-
|
|
8
|
-
## 触发条件
|
|
9
|
-
|
|
10
|
-
- YTree 或左树右表需要独立滚动区和自适应高度。
|
|
11
|
-
- 树区域含内置搜索,或在 Tab/抽屉/折叠面板切换后高度不正确。
|
|
12
|
-
|
|
13
|
-
## 不适用场景
|
|
14
|
-
|
|
15
|
-
- 树节点很少、无需独立滚动,且父级布局已托管高度。
|
|
16
|
-
- 主要问题是树节点与右侧数据联动,而非布局高度。
|
|
17
|
-
|
|
18
|
-
## 文档检索
|
|
19
|
-
|
|
20
|
-
1. MCP 可用时,先用 `get_component_docs` 精确查询 `useTreeHeight`,需要示例时再调用 `get_demo`;不要仅凭 Skill 中的静态签名推断当前 API。
|
|
21
|
-
2. 精确查询无结果时,先用 `search_docs` 校正名称;仅在 MCP 不可用、调用失败或仍无结果时,回退读取最新 `llms-full.txt`。文档版本与当前依赖不一致时,再核对 Hook 源码、CodeGraph 和真实导出。
|
|
22
|
-
|
|
23
|
-
## 硬约束(禁止/必须)
|
|
24
|
-
|
|
25
|
-
- 把树区域的直接父容器 `ref` 传给 `useTreeHeight(treeAreaRef, options)`,并使用真实返回值 `treeHeight/recalculateHeight`。
|
|
26
|
-
- 最外层必须有可计算高度;树区域使用 `flex: 1; min-height: 0; overflow: hidden;`。
|
|
27
|
-
- 计算结果绑定到 `YTree` 的 `:height="treeHeight"`,不用固定魔法高度替代 Hook,也不为了触发虚拟滚动默认添加 `:virtual="true"`。
|
|
28
|
-
- 使用 YTree 内置搜索时配置 `extraOffset: YTREE_SEARCH_HEIGHT`;搜索区已放在 `treeAreaRef` 外部时不再扣除。
|
|
29
|
-
- `extraOffset` 只用于树区域内部实际占位的搜索、padding 或边框,禁止无依据叠加 `+16` 等偏移。
|
|
30
|
-
- Hook 仅在挂载时为当时存在的 `treeAreaRef` 建立 `ResizeObserver`。优先保持树区域外层容器挂载(如使用 `v-show`);Tab/抽屉可见后在 `nextTick` 调用 `recalculateHeight()`。
|
|
31
|
-
- 隐藏态容器可能得到 `minHeight` 而不是真实可用高度;不把该值当成最终布局结果。
|
|
32
|
-
|
|
33
|
-
## 标准代码骨架
|
|
34
|
-
|
|
35
|
-
```vue
|
|
36
|
-
<script setup lang="ts">
|
|
37
|
-
import { ref } from 'vue';
|
|
38
|
-
import { YTree } from '@yss-ui/components';
|
|
39
|
-
import { useTreeHeight, YTREE_SEARCH_HEIGHT } from '@yss-ui/hooks';
|
|
40
|
-
|
|
41
|
-
const treeAreaRef = ref<HTMLDivElement>();
|
|
42
|
-
const treeData = ref([]);
|
|
43
|
-
const { treeHeight, recalculateHeight } = useTreeHeight(treeAreaRef, {
|
|
44
|
-
extraOffset: YTREE_SEARCH_HEIGHT,
|
|
45
|
-
});
|
|
46
|
-
</script>
|
|
47
|
-
|
|
48
|
-
<template>
|
|
49
|
-
<div ref="treeAreaRef" class="tree-area">
|
|
50
|
-
<YTree :height="treeHeight" :tree-data="treeData" filterable />
|
|
51
|
-
</div>
|
|
52
|
-
</template>
|
|
53
|
-
|
|
54
|
-
<style scoped lang="less">
|
|
55
|
-
@import './style.less';
|
|
56
|
-
</style>
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
```less
|
|
60
|
-
/* style.less */
|
|
61
|
-
.tree-layout {
|
|
62
|
-
height: 100%;
|
|
63
|
-
display: flex;
|
|
64
|
-
flex-direction: column;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
.tree-area {
|
|
68
|
-
flex: 1;
|
|
69
|
-
min-height: 0;
|
|
70
|
-
overflow: hidden;
|
|
71
|
-
}
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
## 容器切换时机
|
|
75
|
-
|
|
76
|
-
```typescript
|
|
77
|
-
import { nextTick } from 'vue';
|
|
78
|
-
|
|
79
|
-
/** 容器显示后补充一次高度计算。 */
|
|
80
|
-
const handleVisibleChange = async (visible: boolean) => {
|
|
81
|
-
if (!visible) return;
|
|
82
|
-
await nextTick();
|
|
83
|
-
recalculateHeight();
|
|
84
|
-
};
|
|
85
|
-
```
|
|
86
|
-
|
|
87
|
-
## 交付检查清单
|
|
88
|
-
|
|
89
|
-
- [ ] `treeAreaRef` 在 Hook 挂载时可用,父级高度可计算。
|
|
90
|
-
- [ ] 内置搜索开关与 `YTREE_SEARCH_HEIGHT` 偏移一致,没有重复扣减。
|
|
91
|
-
- [ ] Tab/抽屉切换后使用真实的 `recalculateHeight()` 重算。
|
|
92
|
-
- [ ] 节点较少时未裁剪 DOM 被识别为正常虚拟滚动阈值行为。
|
|
93
|
-
|
|
94
|
-
## 失败兜底策略
|
|
95
|
-
|
|
96
|
-
- 树高度显示为 `minHeight` 且与容器不符时,检查是否在隐藏态完成首次计算,并在可见后重算。
|
|
97
|
-
- `treeAreaRef` 由 `v-if` 延迟创建且尺寸不再自动更新时,保持外层容器挂载后重新初始化 Hook,或使用 `v-show + recalculateHeight()`。
|
|
98
|
-
- 节点较少未触发 DOM 裁剪时,核对虚拟滚动阈值,不加 `virtual=true` 伪装修复。
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
# yss-use-tree-height Frontend Documentation
|
|
2
|
-
|
|
3
|
-
Generated: 2026-08-17T12:03:37.436Z
|
|
4
|
-
|
|
5
|
-
Use these YSS UI documentation entry points as authoritative references when local repo examples are insufficient.
|
|
6
|
-
|
|
7
|
-
- hooks: http://192.168.164.27:3200/hooks
|
|
8
|
-
|
|
9
|
-
When documentation and local code differ, inspect the current project code before editing and prefer established local usage.
|