cabloy 5.1.61 → 5.1.62
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/.claude/skills/cabloy-backend-scaffold/SKILL.md +2 -0
- package/.claude/skills/cabloy-backend-scaffold/references/follow-up-checklist.md +1 -1
- package/.claude/skills/cabloy-domain-planning/SKILL.md +212 -0
- package/.claude/skills/cabloy-frontend-scaffold/SKILL.md +2 -0
- package/CHANGELOG.md +42 -0
- package/CLAUDE.md +1 -0
- package/cabloy-docs/.vitepress/config.mjs +158 -12
- package/cabloy-docs/ai/docs-skills-rules-mapping.md +8 -0
- package/cabloy-docs/ai/future-skill-roadmap.md +2 -0
- package/cabloy-docs/ai/skills.md +1 -0
- package/cabloy-docs/backend/backend-contract-emission-output-inspection.md +189 -0
- package/cabloy-docs/backend/backend-contract-emission-source-reading-map.md +160 -0
- package/cabloy-docs/backend/backend-contract-emission-specimen.md +170 -0
- package/cabloy-docs/backend/backend-resource-module-contract-chain.md +323 -0
- package/cabloy-docs/backend/backend-source-reading-debug-checklist.md +173 -0
- package/cabloy-docs/backend/backend-source-reading-roadmap.md +129 -0
- package/cabloy-docs/backend/backend-source-reading-verify-playbook.md +166 -0
- package/cabloy-docs/backend/bean-scene-authoring.md +4 -4
- package/cabloy-docs/backend/broadcast-guide.md +3 -3
- package/cabloy-docs/backend/cli.md +20 -11
- package/cabloy-docs/backend/config-guide.md +4 -4
- package/cabloy-docs/backend/controller-aop-guide.md +10 -10
- package/cabloy-docs/backend/controller-guide.md +12 -2
- package/cabloy-docs/backend/crud-workflow.md +7 -3
- package/cabloy-docs/backend/dto-guide.md +12 -2
- package/cabloy-docs/backend/dto-infer-generation.md +201 -25
- package/cabloy-docs/backend/election-guide.md +2 -2
- package/cabloy-docs/backend/entity-guide.md +12 -3
- package/cabloy-docs/backend/error-guide.md +3 -3
- package/cabloy-docs/backend/event-guide.md +4 -4
- package/cabloy-docs/backend/external-aop-guide.md +2 -2
- package/cabloy-docs/backend/field-indexes.md +9 -3
- package/cabloy-docs/backend/foundation.md +8 -8
- package/cabloy-docs/backend/i18n-guide.md +6 -6
- package/cabloy-docs/backend/internal-aop-guide.md +2 -2
- package/cabloy-docs/backend/introduction.md +13 -0
- package/cabloy-docs/backend/migration-and-changes.md +3 -3
- package/cabloy-docs/backend/model-guide.md +16 -6
- package/cabloy-docs/backend/openapi-guide.md +3 -0
- package/cabloy-docs/backend/queue-guide.md +3 -3
- package/cabloy-docs/backend/redlock-guide.md +2 -2
- package/cabloy-docs/backend/schedule-guide.md +2 -2
- package/cabloy-docs/backend/scripts.md +8 -0
- package/cabloy-docs/backend/serialization-guide.md +2 -2
- package/cabloy-docs/backend/service-guide.md +18 -9
- package/cabloy-docs/backend/startup-guide.md +5 -5
- package/cabloy-docs/backend/status-guide.md +7 -7
- package/cabloy-docs/backend/unit-testing.md +3 -3
- package/cabloy-docs/backend/vona-source-reading-map.md +157 -0
- package/cabloy-docs/backend/websocket-protocol-guide.md +5 -5
- package/cabloy-docs/backend/websocket-usage-guide.md +15 -8
- package/cabloy-docs/frontend/a-model-under-the-hood.md +281 -0
- package/cabloy-docs/frontend/a-openapi-under-the-hood.md +248 -0
- package/cabloy-docs/frontend/a-router-guide.md +307 -0
- package/cabloy-docs/frontend/api-guide.md +4 -4
- package/cabloy-docs/frontend/api-schema-guide.md +1 -0
- package/cabloy-docs/frontend/app-startup-guide.md +7 -4
- package/cabloy-docs/frontend/bean-scene-authoring.md +1 -1
- package/cabloy-docs/frontend/behavior-guide.md +16 -16
- package/cabloy-docs/frontend/cli.md +5 -5
- package/cabloy-docs/frontend/command-scene-authoring.md +17 -8
- package/cabloy-docs/frontend/component-guide.md +5 -5
- package/cabloy-docs/frontend/component-props-guide.md +1 -1
- package/cabloy-docs/frontend/component-v-model-guide.md +2 -2
- package/cabloy-docs/frontend/filter-query-select-data-flow-guide.md +260 -0
- package/cabloy-docs/frontend/form-guide.md +19 -28
- package/cabloy-docs/frontend/form-scene-to-page-meta-guide.md +303 -0
- package/cabloy-docs/frontend/foundation.md +10 -6
- package/cabloy-docs/frontend/frontend-source-reading-roadmap.md +249 -0
- package/cabloy-docs/frontend/generated-contract-consumption-debug-checklist.md +190 -0
- package/cabloy-docs/frontend/generated-contract-consumption-entry-branch.md +205 -0
- package/cabloy-docs/frontend/generated-contract-consumption-list-branch.md +157 -0
- package/cabloy-docs/frontend/generated-contract-consumption-specimen.md +203 -0
- package/cabloy-docs/frontend/generated-contract-consumption-verify-playbook.md +189 -0
- package/cabloy-docs/frontend/generic-component-guide.md +1 -1
- package/cabloy-docs/frontend/introduction.md +29 -7
- package/cabloy-docs/frontend/model-architecture.md +38 -2
- package/cabloy-docs/frontend/model-resource-cookbook.md +11 -8
- package/cabloy-docs/frontend/model-resource-internals-deep-dive.md +238 -0
- package/cabloy-docs/frontend/model-resource-owner-pattern.md +22 -2
- package/cabloy-docs/frontend/model-resource-usage-guide.md +22 -6
- package/cabloy-docs/frontend/model-state-guide.md +12 -9
- package/cabloy-docs/frontend/module-scope.md +8 -8
- package/cabloy-docs/frontend/modules-and-suites.md +2 -1
- package/cabloy-docs/frontend/navigation-guards-guide.md +7 -0
- package/cabloy-docs/frontend/openapi-sdk-guide.md +12 -4
- package/cabloy-docs/frontend/page-guide.md +9 -9
- package/cabloy-docs/frontend/page-meta-guide.md +466 -0
- package/cabloy-docs/frontend/page-params-guide.md +3 -3
- package/cabloy-docs/frontend/page-query-guide.md +2 -2
- package/cabloy-docs/frontend/page-route-guide.md +6 -0
- package/cabloy-docs/frontend/permission-formscene-action-visibility-guide.md +263 -0
- package/cabloy-docs/frontend/quickstart.md +14 -2
- package/cabloy-docs/frontend/resource-entry-page-deep-dive.md +271 -0
- package/cabloy-docs/frontend/resource-list-page-deep-dive.md +279 -0
- package/cabloy-docs/frontend/rest-resource-source-reading-map.md +522 -0
- package/cabloy-docs/frontend/rest-resource-under-the-hood.md +622 -0
- package/cabloy-docs/frontend/root-behaviors-guide.md +282 -0
- package/cabloy-docs/frontend/route-alias-guide.md +6 -0
- package/cabloy-docs/frontend/router-stack-guide.md +229 -0
- package/cabloy-docs/frontend/router-tabs-introduction.md +26 -3
- package/cabloy-docs/frontend/router-tabs-layout-integration.md +367 -0
- package/cabloy-docs/frontend/router-tabs-mechanism.md +6 -0
- package/cabloy-docs/frontend/router-tabs-route-meta-cookbook.md +7 -0
- package/cabloy-docs/frontend/router-tabs-vs-stack.md +167 -0
- package/cabloy-docs/frontend/router-view-hosts-guide.md +450 -0
- package/cabloy-docs/frontend/server-data.md +2 -1
- package/cabloy-docs/frontend/system-startup-guide.md +2 -2
- package/cabloy-docs/frontend/table-action-visibility-permission-flow-guide.md +263 -0
- package/cabloy-docs/frontend/table-cell-cookbook.md +568 -0
- package/cabloy-docs/frontend/table-guide.md +373 -0
- package/cabloy-docs/frontend/table-resource-crud-cookbook.md +496 -0
- package/cabloy-docs/frontend/zova-app-guide.md +251 -0
- package/cabloy-docs/frontend/zova-form-source-reading-map.md +7 -9
- package/cabloy-docs/frontend/zova-form-under-the-hood.md +5 -0
- package/cabloy-docs/frontend/zova-router-under-the-hood.md +561 -0
- package/cabloy-docs/frontend/zova-source-reading-map.md +101 -7
- package/cabloy-docs/frontend/zova-table-controller-render-supplement.md +225 -0
- package/cabloy-docs/frontend/zova-table-source-reading-map.md +317 -0
- package/cabloy-docs/frontend/zova-table-under-the-hood.md +532 -0
- package/cabloy-docs/fullstack/backend-metadata-to-frontend-table-actions-debug-checklist.md +245 -0
- package/cabloy-docs/fullstack/backend-metadata-to-frontend-table-actions-source-reading-map.md +139 -0
- package/cabloy-docs/fullstack/backend-metadata-to-frontend-table-actions-verify-playbook.md +248 -0
- package/cabloy-docs/fullstack/backend-metadata-to-frontend-table-actions.md +511 -0
- package/cabloy-docs/fullstack/contract-loop-playbook.md +8 -2
- package/cabloy-docs/fullstack/edition-collaboration-differences.md +6 -0
- package/cabloy-docs/fullstack/frontend-metadata-to-backend.md +181 -48
- package/cabloy-docs/fullstack/introduction.md +3 -0
- package/cabloy-docs/fullstack/openapi-to-sdk.md +116 -2
- package/cabloy-docs/fullstack/suites-and-modules.md +333 -0
- package/cabloy-docs/fullstack/tutorial-1-first-module.md +3 -0
- package/cabloy-docs/fullstack/tutorial-2-first-crud.md +4 -0
- package/cabloy-docs/fullstack/tutorial-3-frontend-metadata-sharing.md +4 -0
- package/cabloy-docs/fullstack/tutorial-4-custom-level-renderers.md +31 -19
- package/cabloy-docs/fullstack/tutorial-5-backend-contract-sharing.md +5 -0
- package/cabloy-docs/fullstack/tutorial-6-one-contract-four-uses.md +4 -0
- package/cabloy-docs/fullstack/tutorials-overview.md +1 -1
- package/cabloy-docs/reference/bean-scene-boilerplates.md +13 -13
- package/cabloy-docs/reference/package-map.md +4 -3
- package/package.json +1 -1
- package/vona/pnpm-lock.yaml +22 -258
- package/vona/src/suite/a-training/modules/training-student/package.json +53 -0
- package/vona/src/suite/a-training/modules/training-student/src/.metadata/index.ts +400 -0
- package/vona/src/suite/a-training/modules/training-student/src/.metadata/locales.ts +18 -0
- package/vona/src/suite/a-training/modules/training-student/src/.metadata/this.ts +2 -0
- package/vona/src/suite/a-training/modules/training-student/src/bean/meta.index.ts +12 -0
- package/vona/src/suite/a-training/modules/training-student/src/bean/meta.version.ts +21 -0
- package/vona/src/suite/a-training/modules/training-student/src/bean/ssrMenu.student.ts +29 -0
- package/vona/src/suite/a-training/modules/training-student/src/config/locale/en-us.ts +15 -0
- package/vona/src/suite/a-training/modules/training-student/src/config/locale/zh-cn.ts +15 -0
- package/vona/src/suite/a-training/modules/training-student/src/controller/student.ts +74 -0
- package/vona/src/suite/a-training/modules/training-student/src/dto/studentCreate.tsx +28 -0
- package/vona/src/suite/a-training/modules/training-student/src/dto/studentSelectReq.tsx +44 -0
- package/vona/src/suite/a-training/modules/training-student/src/dto/studentSelectRes.tsx +11 -0
- package/vona/src/suite/a-training/modules/training-student/src/dto/studentSelectResItem.tsx +45 -0
- package/vona/src/suite/a-training/modules/training-student/src/dto/studentSummary.tsx +42 -0
- package/vona/src/suite/a-training/modules/training-student/src/dto/studentUpdate.tsx +28 -0
- package/vona/src/suite/a-training/modules/training-student/src/dto/studentView.tsx +25 -0
- package/vona/src/suite/a-training/modules/training-student/src/entity/student.tsx +84 -0
- package/vona/src/suite/a-training/modules/training-student/src/index.ts +2 -0
- package/vona/src/suite/a-training/modules/training-student/src/model/student.ts +10 -0
- package/vona/src/suite/a-training/modules/training-student/src/service/student.ts +57 -0
- package/vona/src/suite/a-training/modules/training-student/test/student.test.ts +173 -0
- package/vona/src/suite/a-training/modules/training-student/tsconfig.build.json +11 -0
- package/vona/src/suite/a-training/modules/training-student/tsconfig.json +7 -0
- package/vona/src/suite/a-training/package.json +12 -0
- package/vona/src/suite/a-training/tsconfig.base.json +4 -0
- package/vona/src/suite/a-training/tsconfig.json +10 -0
- package/zova/packages-zova/zova/package.json +2 -2
- package/zova/pnpm-lock.yaml +406 -680
- package/zova/src/suite/a-training/modules/training-student/cli/openapi.config.ts +9 -0
- package/zova/src/suite/a-training/modules/training-student/package.json +52 -0
- package/zova/src/suite/a-training/modules/training-student/src/.metadata/component/formFieldLevel.ts +31 -0
- package/zova/src/suite/a-training/modules/training-student/src/.metadata/index.ts +258 -0
- package/zova/src/suite/a-training/modules/training-student/src/.metadata/locales.ts +7 -0
- package/zova/src/suite/a-training/modules/training-student/src/.metadata/this.ts +2 -0
- package/zova/src/suite/a-training/modules/training-student/src/api/openapi/baseURL.ts +5 -0
- package/zova/src/suite/a-training/modules/training-student/src/api/openapi/index.ts +3 -0
- package/zova/src/suite/a-training/modules/training-student/src/api/openapi/schemas.ts +196 -0
- package/zova/src/suite/a-training/modules/training-student/src/api/openapi/types.ts +4146 -0
- package/zova/src/suite/a-training/modules/training-student/src/api/trainingStudent.ts +151 -0
- package/zova/src/suite/a-training/modules/training-student/src/apiSchema/trainingStudent.ts +43 -0
- package/zova/src/suite/a-training/modules/training-student/src/bean/tableCell.actionDeleteForce.tsx +51 -0
- package/zova/src/suite/a-training/modules/training-student/src/bean/tableCell.actionSummary.tsx +56 -0
- package/zova/src/suite/a-training/modules/training-student/src/bean/tableCell.level.tsx +63 -0
- package/zova/src/suite/a-training/modules/training-student/src/component/formFieldLevel/controller.tsx +117 -0
- package/zova/src/suite/a-training/modules/training-student/src/config/locale/en-us.ts +9 -0
- package/zova/src/suite/a-training/modules/training-student/src/config/locale/zh-cn.ts +9 -0
- package/zova/src/suite/a-training/modules/training-student/src/index.ts +2 -0
- package/zova/src/suite/a-training/modules/training-student/src/model/student.ts +42 -0
- package/zova/src/suite/a-training/modules/training-student/tsconfig.build.json +13 -0
- package/zova/src/suite/a-training/modules/training-student/tsconfig.json +5 -0
- package/zova/src/suite/a-training/package.json +12 -0
- package/zova/src/suite/a-training/tsconfig.base.json +4 -0
- package/zova/src/suite/a-training/tsconfig.json +4 -0
- package/zova/src/suite/cabloy-basic/modules/basic-select/src/component/formFieldSelect/controller.tsx +29 -7
- package/zova/src/suite/cabloy-basic/modules/basic-select/src/component/select/controller.tsx +34 -11
- package/zova/src/suite-vendor/a-zova/modules/a-table/package.json +1 -1
- package/zova/src/suite-vendor/a-zova/modules/a-table/src/component/table/controller.tsx +3 -3
- package/zova/src/suite-vendor/a-zova/modules/a-table/src/lib/tableCell.ts +1 -1
- package/zova/src/suite-vendor/a-zova/package.json +2 -2
|
@@ -0,0 +1,307 @@
|
|
|
1
|
+
# A-Router Guide
|
|
2
|
+
|
|
3
|
+
This guide explains the router runtime boundary in Zova through the current public Cabloy Basic source:
|
|
4
|
+
|
|
5
|
+
```text
|
|
6
|
+
zova/src/suite-vendor/a-zova/modules/a-router
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Use this page when you want to understand:
|
|
10
|
+
|
|
11
|
+
- what `a-router` is responsible for
|
|
12
|
+
- what `a-router` is **not** responsible for
|
|
13
|
+
- how module route records become operational router records
|
|
14
|
+
- how system startup and app startup cooperate around routing
|
|
15
|
+
- where `$route`, `$params`, and `$query` reach page controllers
|
|
16
|
+
- where `a-router` stops and router-view host behavior begins
|
|
17
|
+
|
|
18
|
+
## Why this page exists
|
|
19
|
+
|
|
20
|
+
The existing router docs already explain several important layers:
|
|
21
|
+
|
|
22
|
+
- [Page Route Guide](/frontend/page-route-guide) explains the public route-record surface
|
|
23
|
+
- [Navigation Guards Guide](/frontend/navigation-guards-guide) explains route policy hooks
|
|
24
|
+
- [Page Params Guide](/frontend/page-params-guide) and [Page Query Guide](/frontend/page-query-guide) explain typed route-state authoring
|
|
25
|
+
- [Zova Router Under the Hood](/frontend/zova-router-under-the-hood) explains the broader runtime cooperation
|
|
26
|
+
- [Router View Hosts Guide](/frontend/router-view-hosts-guide) explains how routed pages are hosted after route resolution
|
|
27
|
+
|
|
28
|
+
What those pages do not isolate directly is the module boundary of `a-router` itself.
|
|
29
|
+
|
|
30
|
+
That is the gap this page fills.
|
|
31
|
+
|
|
32
|
+
In the current Basic source, `a-router` is not only a thin wrapper around Vue Router and not only a route-record registry. It is the runtime package that connects module route registration, router creation, startup readiness, guard flow, controller route-state injection, and the handoff into routed hosts.
|
|
33
|
+
|
|
34
|
+
## The shortest accurate mental model
|
|
35
|
+
|
|
36
|
+
A practical mental model is:
|
|
37
|
+
|
|
38
|
+
1. modules declare route records through `routes.ts`
|
|
39
|
+
2. `a-router` registers those records into the shared router during system startup
|
|
40
|
+
3. `a-router` merges config routes, expands module-relative paths, synthesizes aliases, and wraps routes with layout structure when needed
|
|
41
|
+
4. `a-router` makes the main router operational during app startup
|
|
42
|
+
5. `a-router` guard flow lazy-loads modules and normalizes alias or fallback behavior during navigation
|
|
43
|
+
6. `a-router` pushes `$route`, `$routeMatched`, `$params`, and `$query` onto page controllers
|
|
44
|
+
7. the resolved routed output then enters a router-view host for page-instance ownership and keep-alive behavior
|
|
45
|
+
|
|
46
|
+
That is why `a-router` is a real Zova architectural boundary rather than only a route-table utility.
|
|
47
|
+
|
|
48
|
+
## What `a-router` is
|
|
49
|
+
|
|
50
|
+
In the current Basic source, `a-router` is mainly these seven things:
|
|
51
|
+
|
|
52
|
+
- a **module integration surface** through generated metadata
|
|
53
|
+
- a **shared system router owner** through `SysRouter`
|
|
54
|
+
- a **module-route registration bridge** through `monkeySys.ts`
|
|
55
|
+
- an **app lifecycle and router readiness bridge** through `monkey.ts`
|
|
56
|
+
- a **guard service** through `ServiceRouterGuards`
|
|
57
|
+
- a **page-controller route-state injection layer** through `monkey.ts`
|
|
58
|
+
- a **routed-host handoff boundary** through `routerViewBase.tsx`
|
|
59
|
+
|
|
60
|
+
Those roles make `a-router` the package that turns route declarations into operational routed frontend behavior.
|
|
61
|
+
|
|
62
|
+
## What `a-router` is not
|
|
63
|
+
|
|
64
|
+
It is equally important to avoid over-assigning responsibilities to `a-router`.
|
|
65
|
+
|
|
66
|
+
`a-router` does **not** itself own:
|
|
67
|
+
|
|
68
|
+
- the authoring explanation for route records and their public meaning
|
|
69
|
+
- the full typed params/query authoring story
|
|
70
|
+
- the business-facing explanation for navigation policy and auth design
|
|
71
|
+
- the detailed semantics of `routerViewEmpty`, `routerViewTabs`, or `routerViewStack`
|
|
72
|
+
- the tabs or stack workspace models
|
|
73
|
+
- the layout component implementations themselves
|
|
74
|
+
|
|
75
|
+
Those responsibilities belong to other routing, host, and layout docs.
|
|
76
|
+
|
|
77
|
+
So when you read `a-router`, read it as the runtime package that operationalizes routing, not as the page-authoring guide and not as the routed-host guide.
|
|
78
|
+
|
|
79
|
+
## The core source-reading path
|
|
80
|
+
|
|
81
|
+
When reading `a-router`, use this order:
|
|
82
|
+
|
|
83
|
+
1. `zova/src/suite-vendor/a-zova/modules/a-router/src/.metadata/index.ts`
|
|
84
|
+
2. `zova/src/suite-vendor/a-zova/modules/a-router/src/bean/sys.router.ts`
|
|
85
|
+
3. `zova/src/suite-vendor/a-zova/modules/a-router/src/monkeySys.ts`
|
|
86
|
+
4. `zova/src/suite-vendor/a-zova/modules/a-router/src/monkey.ts`
|
|
87
|
+
5. `zova/src/suite-vendor/a-zova/modules/a-router/src/service/routerGuards.ts`
|
|
88
|
+
6. `zova/src/suite-vendor/a-zova/modules/a-router/src/bean/bean.router.ts`
|
|
89
|
+
7. `zova/src/suite-vendor/a-zova/modules/a-router/src/types/router.ts`
|
|
90
|
+
8. `zova/src/suite-vendor/a-zova/modules/a-router/src/lib/routerViewBase.tsx`
|
|
91
|
+
|
|
92
|
+
That order moves from integration surface, to system router ownership, to startup hooks, to navigation flow, to app-level router-view coordination, to type contract, and finally to the routed-host handoff boundary.
|
|
93
|
+
|
|
94
|
+
## What each source file clarifies
|
|
95
|
+
|
|
96
|
+
### `src/.metadata/index.ts`
|
|
97
|
+
|
|
98
|
+
This is the generated integration map for the module.
|
|
99
|
+
|
|
100
|
+
It shows that `a-router` contributes:
|
|
101
|
+
|
|
102
|
+
- model export and typing for page data
|
|
103
|
+
- router sys bean registration
|
|
104
|
+
- router bean registration
|
|
105
|
+
- router guard service registration
|
|
106
|
+
- the `routerViewEmpty` component export
|
|
107
|
+
- config, monkey, and scope integration
|
|
108
|
+
|
|
109
|
+
This file is the best single map of how `a-router` enters the larger Zova bean, config, and component records.
|
|
110
|
+
|
|
111
|
+
### `src/bean/sys.router.ts`
|
|
112
|
+
|
|
113
|
+
This is the shared router owner.
|
|
114
|
+
|
|
115
|
+
Its main jobs are:
|
|
116
|
+
|
|
117
|
+
- create the router instance and choose history mode
|
|
118
|
+
- load config routes by path and name
|
|
119
|
+
- load legacy routes if present
|
|
120
|
+
- register module routes into real router records
|
|
121
|
+
- expand module-relative route paths and names
|
|
122
|
+
- merge config-route overrides
|
|
123
|
+
- synthesize alias routes when needed
|
|
124
|
+
- wrap routed pages with layout routes when `meta.layout` requires it
|
|
125
|
+
- expose helpers such as `getPagePath(...)`, `resolveName(...)`, and `ensureRoute(...)`
|
|
126
|
+
|
|
127
|
+
This is the file that most clearly shows how a module-local route record becomes operational router structure.
|
|
128
|
+
|
|
129
|
+
### `src/monkeySys.ts`
|
|
130
|
+
|
|
131
|
+
This file is the system-startup route registration bridge.
|
|
132
|
+
|
|
133
|
+
Its most important job is:
|
|
134
|
+
|
|
135
|
+
- when a module is loading and contributes `resource.routes`, call `sysRouter._registerRoutes(module)`
|
|
136
|
+
|
|
137
|
+
That matters because route registration belongs to system startup rather than being delayed until page code happens to execute.
|
|
138
|
+
|
|
139
|
+
This file also exposes application-level helpers such as:
|
|
140
|
+
|
|
141
|
+
- `$gotoPage(...)`
|
|
142
|
+
- `$gotoHome(...)`
|
|
143
|
+
- `$gotoLogin(...)`
|
|
144
|
+
- `$getCurrentPagePath()`
|
|
145
|
+
|
|
146
|
+
So `monkeySys.ts` is not only about route registration. It also helps define the application-facing router convenience surface.
|
|
147
|
+
|
|
148
|
+
### `src/monkey.ts`
|
|
149
|
+
|
|
150
|
+
This file is the app lifecycle and controller route-state bridge.
|
|
151
|
+
|
|
152
|
+
Its main jobs are:
|
|
153
|
+
|
|
154
|
+
- create or retrieve the main router bean
|
|
155
|
+
- attach guard setup through the router-guards event flow
|
|
156
|
+
- make the router operational during `appReady()`
|
|
157
|
+
- inject `$router`, `$routerView`, `$pageRoute`, and `$currentRoute` onto bean instances
|
|
158
|
+
- prepare controller route context
|
|
159
|
+
- push `$route` and `$routeMatched` onto page controllers
|
|
160
|
+
- parse typed `$params` and `$query` from page schemas and preserve stable client references
|
|
161
|
+
- handle SSR/client redirect-related error behavior
|
|
162
|
+
|
|
163
|
+
This is the key source file if your question is: “where do page controllers actually receive route-aware state?”
|
|
164
|
+
|
|
165
|
+
## `src/service/routerGuards.ts`
|
|
166
|
+
|
|
167
|
+
This file is the navigation guard runtime layer.
|
|
168
|
+
|
|
169
|
+
Its main jobs are:
|
|
170
|
+
|
|
171
|
+
- run `beforeEach(...)` checks
|
|
172
|
+
- lazy-load modules during navigation when needed
|
|
173
|
+
- normalize alias redirect behavior
|
|
174
|
+
- retry route resolution after module loading when appropriate
|
|
175
|
+
- handle 404/module-load preparation checks
|
|
176
|
+
- emit back/forward notifications after navigation
|
|
177
|
+
|
|
178
|
+
This file is the best place to read when the route exists conceptually but is not yet fully operational at navigation time.
|
|
179
|
+
|
|
180
|
+
## `src/bean/bean.router.ts`
|
|
181
|
+
|
|
182
|
+
This file is the app-level router bean and router-view coordination surface.
|
|
183
|
+
|
|
184
|
+
Its main jobs are:
|
|
185
|
+
|
|
186
|
+
- create the main app router from `SysRouter`
|
|
187
|
+
- expose router APIs through the bean surface
|
|
188
|
+
- register and deregister active router-view hosts
|
|
189
|
+
- forward back-route and forward-route notifications to hosts
|
|
190
|
+
- forward `setPageMeta(...)` updates to hosts
|
|
191
|
+
|
|
192
|
+
This is the layer that connects the router runtime to routed-host controllers.
|
|
193
|
+
|
|
194
|
+
## `src/types/router.ts`
|
|
195
|
+
|
|
196
|
+
This file is the public type contract for the router package.
|
|
197
|
+
|
|
198
|
+
It shows the extended route meta and app/bean/controller-facing router surface, including:
|
|
199
|
+
|
|
200
|
+
- `RouteMeta.layout`
|
|
201
|
+
- `RouteMeta.requiresAuth`
|
|
202
|
+
- `RouteMeta.locale`
|
|
203
|
+
- `RouteMeta.componentKeyMode`
|
|
204
|
+
- `RouteMeta.componentKey`
|
|
205
|
+
- `RouteMeta.tabKey`
|
|
206
|
+
- `RouteMeta.keepAlive`
|
|
207
|
+
- app helpers such as `$gotoPage(...)`
|
|
208
|
+
- bean-level `$router`, `$routerView`, `$pageRoute`, and `$currentRoute`
|
|
209
|
+
- page-controller `$route` and `$routeMatched`
|
|
210
|
+
|
|
211
|
+
This is the best file to read when you want to verify what the router package promises to the rest of the application.
|
|
212
|
+
|
|
213
|
+
## `src/lib/routerViewBase.tsx`
|
|
214
|
+
|
|
215
|
+
This file is the handoff boundary from router runtime into routed-host behavior.
|
|
216
|
+
|
|
217
|
+
What matters here is not the full host model, but the boundary itself:
|
|
218
|
+
|
|
219
|
+
- `a-router` has already resolved the routed page path
|
|
220
|
+
- the routed output now enters a router-view host
|
|
221
|
+
- that host wraps `RouterView`, computes host-facing route meta, manages `KeepAlive`, and injects the current page route into the routed vnode
|
|
222
|
+
|
|
223
|
+
This is the point where router runtime responsibility gives way to routed-host responsibility.
|
|
224
|
+
|
|
225
|
+
For the detailed host layer, continue with [Router View Hosts Guide](/frontend/router-view-hosts-guide).
|
|
226
|
+
|
|
227
|
+
## System startup vs app startup
|
|
228
|
+
|
|
229
|
+
A practical distinction in `a-router` is:
|
|
230
|
+
|
|
231
|
+
- **system startup** registers module routes into the shared router structure
|
|
232
|
+
- **app startup** makes the operational router ready for the running application instance
|
|
233
|
+
|
|
234
|
+
In source terms:
|
|
235
|
+
|
|
236
|
+
- `monkeySys.ts` handles module route registration
|
|
237
|
+
- `monkey.ts` handles app readiness and page-controller route-state injection
|
|
238
|
+
|
|
239
|
+
This split matters because it explains why route-table wiring and first-screen navigation readiness are related but not identical responsibilities.
|
|
240
|
+
|
|
241
|
+
## How layout enters the router runtime
|
|
242
|
+
|
|
243
|
+
One of the most important source-confirmed details in `SysRouter._registerRoute(...)` is that layout is not only a visual afterthought.
|
|
244
|
+
|
|
245
|
+
When layout is enabled:
|
|
246
|
+
|
|
247
|
+
- `a-router` wraps the routed page in a parent route
|
|
248
|
+
- the parent route uses the resolved layout component
|
|
249
|
+
- the original page route becomes the child route
|
|
250
|
+
|
|
251
|
+
That means layout choice becomes runtime route structure inside `a-router`, not only a later rendering preference.
|
|
252
|
+
|
|
253
|
+
## How page controllers receive route-aware state
|
|
254
|
+
|
|
255
|
+
A key Zova-specific behavior in `a-router` is that route-aware page state becomes part of the page-controller surface.
|
|
256
|
+
|
|
257
|
+
In `monkey.ts`, page controllers receive:
|
|
258
|
+
|
|
259
|
+
- `$route`
|
|
260
|
+
- `$routeMatched`
|
|
261
|
+
- `$params`
|
|
262
|
+
- `$query`
|
|
263
|
+
|
|
264
|
+
The important point is that this is not only a thin `useRoute()` translation.
|
|
265
|
+
|
|
266
|
+
The route state is pushed through the controller lifecycle and, for `$params` and `$query`, parsed from the page-schema records that belong to the module resource.
|
|
267
|
+
|
|
268
|
+
That is one reason the routing model stays tightly integrated with the rest of Zova’s controller-oriented architecture.
|
|
269
|
+
|
|
270
|
+
## Where `a-router` stops and router-view hosts begin
|
|
271
|
+
|
|
272
|
+
A useful boundary rule is:
|
|
273
|
+
|
|
274
|
+
- `a-router` owns route registration, layout wrapping, startup readiness, guard flow, and page-controller route-state injection
|
|
275
|
+
- router-view hosts own routed page instance hosting, `tabKey`, `componentKey`, `keepAlive`, and empty/tabs/stack host behavior
|
|
276
|
+
|
|
277
|
+
So if your next question is:
|
|
278
|
+
|
|
279
|
+
- “how does the route become operational?” stay in `a-router`
|
|
280
|
+
- “which host owns the routed page instance now?” continue to [Router View Hosts Guide](/frontend/router-view-hosts-guide)
|
|
281
|
+
- “should this host behave like tabs or stack?” continue with [Router Tabs vs Stack](/frontend/router-tabs-vs-stack)
|
|
282
|
+
|
|
283
|
+
## Read together with
|
|
284
|
+
|
|
285
|
+
Use this page together with:
|
|
286
|
+
|
|
287
|
+
- [Page Route Guide](/frontend/page-route-guide)
|
|
288
|
+
- [Zova Router Under the Hood](/frontend/zova-router-under-the-hood)
|
|
289
|
+
- [Page Params Guide](/frontend/page-params-guide)
|
|
290
|
+
- [Page Query Guide](/frontend/page-query-guide)
|
|
291
|
+
- [Navigation Guards Guide](/frontend/navigation-guards-guide)
|
|
292
|
+
- [Router View Hosts Guide](/frontend/router-view-hosts-guide)
|
|
293
|
+
- [Zova Source Reading Map](/frontend/zova-source-reading-map)
|
|
294
|
+
|
|
295
|
+
## Final takeaway
|
|
296
|
+
|
|
297
|
+
The most accurate way to read `a-router` is not as a generic Vue Router wrapper and not as the owner of every routing-related concern.
|
|
298
|
+
|
|
299
|
+
Read it as the Zova router runtime package that:
|
|
300
|
+
|
|
301
|
+
- registers module routes
|
|
302
|
+
- creates and normalizes operational router structure
|
|
303
|
+
- makes the router ready during app startup
|
|
304
|
+
- injects route-aware state into page controllers
|
|
305
|
+
- hands routed output into router-view hosts
|
|
306
|
+
|
|
307
|
+
That is the source-confirmed role of `a-router` in the current Basic frontend architecture.
|
|
@@ -10,10 +10,10 @@ That means frontend code does not need to scatter raw request details everywhere
|
|
|
10
10
|
|
|
11
11
|
## Create an API service
|
|
12
12
|
|
|
13
|
-
Example: create an API service named `menu` in module `
|
|
13
|
+
Example: create an API service named `menu` in module `training-student`.
|
|
14
14
|
|
|
15
15
|
```bash
|
|
16
|
-
npm run zova :create:bean api menu -- --module=
|
|
16
|
+
npm run zova :create:bean api menu -- --module=training-student
|
|
17
17
|
```
|
|
18
18
|
|
|
19
19
|
## API definition
|
|
@@ -63,9 +63,9 @@ Representative pattern:
|
|
|
63
63
|
|
|
64
64
|
```typescript
|
|
65
65
|
@UseScope()
|
|
66
|
-
$$
|
|
66
|
+
$$scopeTrainingStudent: ScopeModuleTrainingStudent;
|
|
67
67
|
|
|
68
|
-
const menus = await this.$$
|
|
68
|
+
const menus = await this.$$scopeTrainingStudent.api.menu.retrieveMenus();
|
|
69
69
|
```
|
|
70
70
|
|
|
71
71
|
## Built-in `$api` access
|
|
@@ -35,6 +35,7 @@ Use this page together with:
|
|
|
35
35
|
- [OpenAPI SDK Guide](/frontend/openapi-sdk-guide)
|
|
36
36
|
- [Backend OpenAPI to Frontend SDK](/fullstack/openapi-to-sdk)
|
|
37
37
|
- [SDK Guide](/frontend/sdk-guide)
|
|
38
|
+
- [A-OpenAPI Under the Hood](/frontend/a-openapi-under-the-hood)
|
|
38
39
|
|
|
39
40
|
## Implementation checks for schema-driven UI changes
|
|
40
41
|
|
|
@@ -68,7 +68,7 @@ A module can provide its own main lifecycle entrypoints.
|
|
|
68
68
|
Representative creation command:
|
|
69
69
|
|
|
70
70
|
```bash
|
|
71
|
-
npm run zova :init:main
|
|
71
|
+
npm run zova :init:main training-student
|
|
72
72
|
```
|
|
73
73
|
|
|
74
74
|
Representative pattern:
|
|
@@ -87,7 +87,7 @@ A module can also provide broader app hook behavior through a monkey entry.
|
|
|
87
87
|
Representative creation command:
|
|
88
88
|
|
|
89
89
|
```bash
|
|
90
|
-
npm run zova :init:monkey
|
|
90
|
+
npm run zova :init:monkey training-student
|
|
91
91
|
```
|
|
92
92
|
|
|
93
93
|
Representative pattern:
|
|
@@ -164,8 +164,11 @@ A practical reading sequence is:
|
|
|
164
164
|
|
|
165
165
|
1. [System Startup Guide](/frontend/system-startup-guide)
|
|
166
166
|
2. this page for router/guard readiness
|
|
167
|
-
3. [
|
|
168
|
-
4. [
|
|
167
|
+
3. [Zova App Guide](/frontend/zova-app-guide)
|
|
168
|
+
4. [Page Route Guide](/frontend/page-route-guide)
|
|
169
|
+
5. [Navigation Guards Guide](/frontend/navigation-guards-guide)
|
|
170
|
+
|
|
171
|
+
If you want the thin root app-host layer that sits inside the running frontend app, read [Zova App Guide](/frontend/zova-app-guide). That guide focuses on `a-app` as the root controller/behavior host rather than on startup hook timings.
|
|
169
172
|
|
|
170
173
|
## Relationship to environment/config selection
|
|
171
174
|
|
|
@@ -25,7 +25,7 @@ The public decorator is:
|
|
|
25
25
|
At the source level, the decorator is implemented as:
|
|
26
26
|
|
|
27
27
|
```typescript
|
|
28
|
-
createBeanDecorator('behavior', 'new', true, options)
|
|
28
|
+
createBeanDecorator('behavior', 'new', true, options);
|
|
29
29
|
```
|
|
30
30
|
|
|
31
31
|
That matters because Behavior is authored as a **fresh-instance bean scene** with decorator options, while the runtime may reuse existing behavior instances across reloads when appropriate.
|
|
@@ -41,6 +41,9 @@ Typical use cases include:
|
|
|
41
41
|
- prop transformation before the final render
|
|
42
42
|
- UI wrappers that should stay composable instead of being copied into many components
|
|
43
43
|
- module-level behavior selection through provider config
|
|
44
|
+
- app-wide wrappers that should participate around the routed tree through the root app host
|
|
45
|
+
|
|
46
|
+
For the root hosting point used by app-wide behavior composition, see [Zova App Guide](/frontend/zova-app-guide). For the end-to-end app-scope composition path around the routed tree, continue with [Root Behaviors Guide](/frontend/root-behaviors-guide).
|
|
44
47
|
|
|
45
48
|
Do **not** reach for Behavior first when a plain helper or a normal component is enough.
|
|
46
49
|
|
|
@@ -54,11 +57,11 @@ A practical rule is:
|
|
|
54
57
|
|
|
55
58
|
Use these three tools for different kinds of reuse.
|
|
56
59
|
|
|
57
|
-
| Tool
|
|
58
|
-
|
|
|
59
|
-
| Behavior
|
|
60
|
-
| Component | standalone UI unit
|
|
61
|
-
| Helper
|
|
60
|
+
| Tool | Best fit | Typical responsibility |
|
|
61
|
+
| --------- | ------------------------------------ | -------------------------------------------------------------------------------------------------------- |
|
|
62
|
+
| Behavior | render-time interception or wrapping | adjust props, intercept refs, wrap a vnode, compose multiple render concerns |
|
|
63
|
+
| Component | standalone UI unit | own a reusable UI contract and render structure directly |
|
|
64
|
+
| Helper | framework-neutral utility | transform data, normalize values, or share logic that does not need bean lifecycle or render composition |
|
|
62
65
|
|
|
63
66
|
A practical decision map is:
|
|
64
67
|
|
|
@@ -115,12 +118,12 @@ Use `@Behavior()` to declare a behavior bean.
|
|
|
115
118
|
Representative shape:
|
|
116
119
|
|
|
117
120
|
```typescript
|
|
118
|
-
import { BeanBehaviorBase, Behavior } from 'zova-module-a-behavior'
|
|
121
|
+
import { BeanBehaviorBase, Behavior } from 'zova-module-a-behavior';
|
|
119
122
|
|
|
120
123
|
@Behavior()
|
|
121
124
|
export class BehaviorFocus extends BeanBehaviorBase {
|
|
122
125
|
protected render(props, next) {
|
|
123
|
-
return next(props)
|
|
126
|
+
return next(props);
|
|
124
127
|
}
|
|
125
128
|
}
|
|
126
129
|
```
|
|
@@ -152,7 +155,7 @@ This is one of the main reasons Behavior fits naturally into the Zova bean archi
|
|
|
152
155
|
Representative shape:
|
|
153
156
|
|
|
154
157
|
```typescript
|
|
155
|
-
$UseBehavior('a-behaviors:focus', { always: true })
|
|
158
|
+
$UseBehavior('a-behaviors:focus', { always: true });
|
|
156
159
|
```
|
|
157
160
|
|
|
158
161
|
The helper returns one behavior declaration item in object form. Broader normalization into onion items happens later in the runtime composer path.
|
|
@@ -164,7 +167,7 @@ The helper returns one behavior declaration item in object form. Broader normali
|
|
|
164
167
|
Representative shape:
|
|
165
168
|
|
|
166
169
|
```typescript
|
|
167
|
-
$UseBehaviorTag('input')
|
|
170
|
+
$UseBehaviorTag('input');
|
|
168
171
|
```
|
|
169
172
|
|
|
170
173
|
### `ZBehavior`
|
|
@@ -194,7 +197,7 @@ At the type level, `IBehaviors` accepts these shapes:
|
|
|
194
197
|
Representative forms:
|
|
195
198
|
|
|
196
199
|
```typescript
|
|
197
|
-
'a-behaviors:focus'
|
|
200
|
+
'a-behaviors:focus';
|
|
198
201
|
```
|
|
199
202
|
|
|
200
203
|
```typescript
|
|
@@ -202,10 +205,7 @@ Representative forms:
|
|
|
202
205
|
```
|
|
203
206
|
|
|
204
207
|
```typescript
|
|
205
|
-
[
|
|
206
|
-
'a-behaviors:focus',
|
|
207
|
-
{ 'home-login:formFieldLayoutLogin': {} },
|
|
208
|
-
]
|
|
208
|
+
['a-behaviors:focus', { 'home-login:formFieldLayoutLogin': {} }];
|
|
209
209
|
```
|
|
210
210
|
|
|
211
211
|
At runtime, the composer normalizes these forms into onion items before the render chain is built.
|
|
@@ -370,7 +370,7 @@ Behavior metadata generation also exposes shorthand HTML/JSX attributes.
|
|
|
370
370
|
For example, a behavior such as `a-behaviors:focus` generates an attribute like:
|
|
371
371
|
|
|
372
372
|
```tsx
|
|
373
|
-
bs-behaviors-focus
|
|
373
|
+
bs - behaviors - focus;
|
|
374
374
|
```
|
|
375
375
|
|
|
376
376
|
The generation rule is defined by the behavior metadata generator and is based on the module name and bean name.
|
|
@@ -10,10 +10,10 @@ For AI-assisted development, the CLI should be the default starting point whenev
|
|
|
10
10
|
|
|
11
11
|
## Example
|
|
12
12
|
|
|
13
|
-
Create a `component` named `test` in module `
|
|
13
|
+
Create a `component` named `test` in module `training-student`:
|
|
14
14
|
|
|
15
15
|
```bash
|
|
16
|
-
npm run zova :create:component test -- --module=
|
|
16
|
+
npm run zova :create:component test -- --module=training-student
|
|
17
17
|
```
|
|
18
18
|
|
|
19
19
|
## Command discovery pattern
|
|
@@ -84,9 +84,9 @@ A practical rule is:
|
|
|
84
84
|
The built-in `command` scene is the clearest current example:
|
|
85
85
|
|
|
86
86
|
```bash
|
|
87
|
-
npm run zova :create:bean command test -- --module=
|
|
88
|
-
npm run zova :create:bean command test -- --module=
|
|
89
|
-
npm run zova :create:bean command test -- --module=
|
|
87
|
+
npm run zova :create:bean command test -- --module=training-student
|
|
88
|
+
npm run zova :create:bean command test -- --module=training-student --boilerplate=commandBulk
|
|
89
|
+
npm run zova :create:bean command test -- --module=training-student --boilerplate=commandRow
|
|
90
90
|
```
|
|
91
91
|
|
|
92
92
|
Use the default template for the command shape without the bulk/row helper bases, `commandBulk` for resource-oriented bulk commands, and `commandRow` for row-oriented commands that need both `resource` and `id`.
|
|
@@ -114,7 +114,12 @@ The default command boilerplate currently generates this shape:
|
|
|
114
114
|
import type { IJsxRenderContextBase } from 'zova-module-a-openapi';
|
|
115
115
|
|
|
116
116
|
import { BeanBase } from 'zova';
|
|
117
|
-
import {
|
|
117
|
+
import {
|
|
118
|
+
Command,
|
|
119
|
+
type ICommandExecute,
|
|
120
|
+
type ICommandOptionsBase,
|
|
121
|
+
type NextCommandExecute,
|
|
122
|
+
} from 'zova-module-a-command';
|
|
118
123
|
|
|
119
124
|
export type TypeCommandExampleResult = unknown;
|
|
120
125
|
|
|
@@ -122,7 +127,11 @@ export interface ICommandOptionsExample extends ICommandOptionsBase<TypeCommandE
|
|
|
122
127
|
|
|
123
128
|
@Command<ICommandOptionsExample>()
|
|
124
129
|
export class CommandExample extends BeanBase implements ICommandExecute {
|
|
125
|
-
execute(
|
|
130
|
+
execute(
|
|
131
|
+
_options: ICommandOptionsExample,
|
|
132
|
+
_renderContext: IJsxRenderContextBase,
|
|
133
|
+
next: NextCommandExecute,
|
|
134
|
+
) {
|
|
126
135
|
return next();
|
|
127
136
|
}
|
|
128
137
|
}
|
|
@@ -165,7 +174,7 @@ A representative call shape looks like this:
|
|
|
165
174
|
|
|
166
175
|
```typescript
|
|
167
176
|
await this.$performCommand('basic-commands:create', {
|
|
168
|
-
resource: '
|
|
177
|
+
resource: 'training-student:student',
|
|
169
178
|
replace: false,
|
|
170
179
|
});
|
|
171
180
|
```
|
|
@@ -174,7 +183,7 @@ A row-oriented example looks like this:
|
|
|
174
183
|
|
|
175
184
|
```typescript
|
|
176
185
|
await this.$performCommand('basic-commands:delete', {
|
|
177
|
-
resource: '
|
|
186
|
+
resource: 'training-student:student',
|
|
178
187
|
id: row.id,
|
|
179
188
|
});
|
|
180
189
|
```
|
|
@@ -345,7 +354,7 @@ npm run zova :create:bean sceneName beanName -- [--module=] [--boilerplate=]
|
|
|
345
354
|
Use the default template when the command bean does not need `BeanCommandBulkBase` or `BeanCommandRowBase`:
|
|
346
355
|
|
|
347
356
|
```bash
|
|
348
|
-
npm run zova :create:bean command test -- --module=
|
|
357
|
+
npm run zova :create:bean command test -- --module=training-student
|
|
349
358
|
```
|
|
350
359
|
|
|
351
360
|
### `commandBulk` boilerplate
|
|
@@ -353,7 +362,7 @@ npm run zova :create:bean command test -- --module=demo-student
|
|
|
353
362
|
Use the bulk variant when the command should resolve `resource` through `BeanCommandBulkBase`:
|
|
354
363
|
|
|
355
364
|
```bash
|
|
356
|
-
npm run zova :create:bean command test -- --module=
|
|
365
|
+
npm run zova :create:bean command test -- --module=training-student --boilerplate=commandBulk
|
|
357
366
|
```
|
|
358
367
|
|
|
359
368
|
### `commandRow` boilerplate
|
|
@@ -361,7 +370,7 @@ npm run zova :create:bean command test -- --module=demo-student --boilerplate=co
|
|
|
361
370
|
Use the row variant when the command should resolve `resource` and `id` through `BeanCommandRowBase`:
|
|
362
371
|
|
|
363
372
|
```bash
|
|
364
|
-
npm run zova :create:bean command test -- --module=
|
|
373
|
+
npm run zova :create:bean command test -- --module=training-student --boilerplate=commandRow
|
|
365
374
|
```
|
|
366
375
|
|
|
367
376
|
For the cross-scene lookup table, also see [Bean Scene Boilerplate Variants](/reference/bean-scene-boilerplates).
|
|
@@ -492,4 +501,4 @@ When documenting or reviewing command-scene behavior, verify in this order:
|
|
|
492
501
|
|
|
493
502
|
```bash
|
|
494
503
|
npm run docs:build
|
|
495
|
-
```
|
|
504
|
+
```
|
|
@@ -18,10 +18,10 @@ For the practical styling decision map around local `$style`, dedicated style be
|
|
|
18
18
|
|
|
19
19
|
## Create a component
|
|
20
20
|
|
|
21
|
-
Example: create a component named `card` in module `
|
|
21
|
+
Example: create a component named `card` in module `training-student`.
|
|
22
22
|
|
|
23
23
|
```bash
|
|
24
|
-
npm run zova :create:component card -- --module=
|
|
24
|
+
npm run zova :create:component card -- --module=training-student
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
## Controller definition
|
|
@@ -53,7 +53,7 @@ The `Z` prefix is useful because it makes framework components easy to identify
|
|
|
53
53
|
Representative usage pattern:
|
|
54
54
|
|
|
55
55
|
```typescript
|
|
56
|
-
import { ZCard } from 'zova-module-
|
|
56
|
+
import { ZCard } from 'zova-module-training-student';
|
|
57
57
|
|
|
58
58
|
class RenderPageCounter {
|
|
59
59
|
render() {
|
|
@@ -75,8 +75,8 @@ Instead of relying on template refs in the usual Vue style, Zova prefers direct
|
|
|
75
75
|
Representative pattern:
|
|
76
76
|
|
|
77
77
|
```typescript
|
|
78
|
-
import type { ControllerCard } from 'zova-module-
|
|
79
|
-
import { ZCard } from 'zova-module-
|
|
78
|
+
import type { ControllerCard } from 'zova-module-training-student';
|
|
79
|
+
import { ZCard } from 'zova-module-training-student';
|
|
80
80
|
|
|
81
81
|
class RenderPageCounter {
|
|
82
82
|
cardRef: ControllerCard;
|
|
@@ -13,7 +13,7 @@ Zova uses a more unified approach centered on component props, which makes the p
|
|
|
13
13
|
Example: add props support to component `card`.
|
|
14
14
|
|
|
15
15
|
```bash
|
|
16
|
-
npm run zova :refactor:componentProps card -- --module=
|
|
16
|
+
npm run zova :refactor:componentProps card -- --module=training-student
|
|
17
17
|
```
|
|
18
18
|
|
|
19
19
|
## Define props
|
|
@@ -13,7 +13,7 @@ That is important because the framework treats model binding as part of the cont
|
|
|
13
13
|
Example: add `modelValue` to component `card`.
|
|
14
14
|
|
|
15
15
|
```bash
|
|
16
|
-
npm run zova :refactor:componentModel card modelValue -- --module=
|
|
16
|
+
npm run zova :refactor:componentModel card modelValue -- --module=training-student
|
|
17
17
|
```
|
|
18
18
|
|
|
19
19
|
## Representative generated shape
|
|
@@ -83,7 +83,7 @@ class ControllerOther {
|
|
|
83
83
|
Representative generation command:
|
|
84
84
|
|
|
85
85
|
```bash
|
|
86
|
-
npm run zova :refactor:componentModel card title -- --module=
|
|
86
|
+
npm run zova :refactor:componentModel card title -- --module=training-student
|
|
87
87
|
```
|
|
88
88
|
|
|
89
89
|
Representative usage pattern:
|