@done-coding/admin-core 0.17.1-alpha.0 → 0.18.1-alpha.0

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.
Files changed (342) hide show
  1. package/README.md +77 -1
  2. package/es/_virtual/_plugin-vue_export-helper.mjs +7 -6
  3. package/es/bridge/config-hook.mjs +49 -37
  4. package/es/bridge/index.mjs +152 -109
  5. package/es/bridge/layout.mjs +45 -31
  6. package/es/bridge/plugin.mjs +22 -12
  7. package/es/bridge/route.mjs +59 -50
  8. package/es/bridge/state.mjs +54 -39
  9. package/es/bridge/storage.mjs +18 -8
  10. package/es/bridge/theme/index.mjs +200 -97
  11. package/es/bridge/theme/persist.mjs +11 -7
  12. package/es/bridge/theme/system-dark.mjs +13 -6
  13. package/es/components/app-layout/AppAside.vue.mjs +4 -4
  14. package/es/components/app-layout/AppAside.vue2.mjs +37 -30
  15. package/es/components/app-layout/AppBody.vue.mjs +4 -4
  16. package/es/components/app-layout/AppBody.vue2.mjs +97 -60
  17. package/es/components/app-layout/AppBreadcrumb.vue.mjs +4 -4
  18. package/es/components/app-layout/AppBreadcrumb.vue2.mjs +59 -38
  19. package/es/components/app-layout/AppCollapseToggle.vue.mjs +4 -4
  20. package/es/components/app-layout/AppCollapseToggle.vue2.mjs +51 -42
  21. package/es/components/app-layout/AppFooter.vue.mjs +4 -4
  22. package/es/components/app-layout/AppFooter.vue2.mjs +15 -12
  23. package/es/components/app-layout/AppHeader.vue.mjs +4 -4
  24. package/es/components/app-layout/AppHeader.vue2.mjs +81 -58
  25. package/es/components/app-layout/AppLayout.vue.mjs +4 -4
  26. package/es/components/app-layout/AppLayout.vue2.mjs +148 -112
  27. package/es/components/app-layout/AppPage.vue.mjs +4 -4
  28. package/es/components/app-layout/AppPage.vue2.mjs +254 -197
  29. package/es/components/app-layout/AppShell.vue.mjs +44 -42
  30. package/es/components/app-layout/AppShell.vue2.mjs +2 -2
  31. package/es/components/app-layout/AppSidebar.vue.mjs +4 -4
  32. package/es/components/app-layout/AppSidebar.vue2.mjs +76 -59
  33. package/es/components/app-layout/AppTheme.vue.mjs +4 -4
  34. package/es/components/app-layout/AppTheme.vue2.mjs +69 -57
  35. package/es/components/app-layout/app-page-geometry.mjs +44 -42
  36. package/es/components/app-layout/keep-alive.mjs +27 -19
  37. package/es/components/app-layout/viewport.mjs +4 -3
  38. package/es/components/data-view/DataListView.vue.mjs +4 -4
  39. package/es/components/data-view/DataListView.vue2.mjs +133 -93
  40. package/es/components/data-view/DataListViewItem.vue.mjs +4 -4
  41. package/es/components/data-view/DataListViewItem.vue2.mjs +11 -9
  42. package/es/components/data-view/utils.mjs +36 -34
  43. package/es/components/display/ActionBtn.vue.mjs +94 -71
  44. package/es/components/display/ActionBtn.vue2.mjs +2 -2
  45. package/es/components/display/ActionBtnGroup.vue.mjs +54 -48
  46. package/es/components/display/ActionBtnGroup.vue2.mjs +2 -2
  47. package/es/components/display/ActionConfirm.vue.mjs +4 -4
  48. package/es/components/display/ActionConfirm.vue2.mjs +116 -92
  49. package/es/components/display/BooleanTag.vue.mjs +24 -18
  50. package/es/components/display/BooleanTag.vue2.mjs +2 -2
  51. package/es/components/display/HeightProvider.vue.mjs +37 -27
  52. package/es/components/display/HeightProvider.vue2.mjs +2 -2
  53. package/es/components/display/TabsHeader.vue.mjs +4 -4
  54. package/es/components/display/TabsHeader.vue2.mjs +86 -57
  55. package/es/components/display/TabsMain.vue.mjs +156 -125
  56. package/es/components/display/TabsMain.vue2.mjs +2 -2
  57. package/es/components/display/TabsNaturalFlow.vue.mjs +15 -11
  58. package/es/components/display/TabsNaturalFlow.vue2.mjs +2 -2
  59. package/es/components/display/TabsRefineFlow.vue.mjs +55 -42
  60. package/es/components/display/TabsRefineFlow.vue2.mjs +2 -2
  61. package/es/components/display/TabsTile.vue.mjs +4 -4
  62. package/es/components/display/TabsTile.vue2.mjs +204 -146
  63. package/es/components/display/WatchSize.vue.mjs +50 -30
  64. package/es/components/display/WatchSize.vue2.mjs +2 -2
  65. package/es/components/display/use-tabs-query-sync.mjs +21 -17
  66. package/es/components/form/FormItem.vue.mjs +4 -4
  67. package/es/components/form/FormItem.vue2.mjs +183 -121
  68. package/es/components/form/FormItemNestForm.vue.mjs +4 -4
  69. package/es/components/form/FormItemNestForm.vue2.mjs +38 -34
  70. package/es/components/form/FormItemNestFormList.vue.mjs +4 -4
  71. package/es/components/form/FormItemNestFormList.vue2.mjs +135 -106
  72. package/es/components/form/FormMain.vue.mjs +4 -4
  73. package/es/components/form/FormMain.vue2.mjs +226 -139
  74. package/es/components/form/FormRadioGroup.vue.mjs +67 -52
  75. package/es/components/form/FormRadioGroup.vue2.mjs +2 -2
  76. package/es/components/form/FormSearch.vue.mjs +4 -4
  77. package/es/components/form/FormSearch.vue2.mjs +194 -156
  78. package/es/components/form/FormSelect.vue.mjs +69 -42
  79. package/es/components/form/FormSelect.vue2.mjs +2 -2
  80. package/es/components/form/FormSubmitBtn.vue.mjs +30 -25
  81. package/es/components/form/FormSubmitBtn.vue2.mjs +2 -2
  82. package/es/components/form/FormSubmitPanel.vue.mjs +4 -4
  83. package/es/components/form/FormSubmitPanel.vue2.mjs +129 -96
  84. package/es/components/form/FormTree.vue.mjs +19 -16
  85. package/es/components/form/FormTree.vue2.mjs +2 -2
  86. package/es/components/form/FormVerifyCode.vue.mjs +58 -41
  87. package/es/components/form/FormVerifyCode.vue2.mjs +2 -2
  88. package/es/components/form/FormVerifyImage.vue.mjs +4 -4
  89. package/es/components/form/FormVerifyImage.vue2.mjs +62 -40
  90. package/es/components/form/form-search-utils.mjs +83 -52
  91. package/es/components/form/nest-form-item-list.mjs +63 -55
  92. package/es/components/form/nest-form-item.mjs +30 -30
  93. package/es/components/form/nest-registry.mjs +4 -4
  94. package/es/components/form/use-form-submit.mjs +18 -15
  95. package/es/components/form/use-layout-by-container.mjs +23 -15
  96. package/es/components/form/use-nest-form-list.mjs +19 -16
  97. package/es/components/form/use-nest-form.mjs +37 -28
  98. package/es/components/form/use-nest-layout-scale.mjs +11 -10
  99. package/es/components/form/utils.mjs +233 -145
  100. package/es/components/list-page/ListPage.vue.mjs +4 -4
  101. package/es/components/list-page/ListPage.vue2.mjs +313 -207
  102. package/es/components/list-page/use-sticky.mjs +45 -33
  103. package/es/components/menu/MenuItemSub.vue.mjs +47 -43
  104. package/es/components/menu/MenuItemSub.vue2.mjs +2 -2
  105. package/es/components/menu/MenuTree.vue.mjs +84 -61
  106. package/es/components/menu/MenuTree.vue2.mjs +2 -2
  107. package/es/components/misc/AutoRefresh.vue.mjs +4 -4
  108. package/es/components/misc/AutoRefresh.vue2.mjs +78 -53
  109. package/es/components/misc/AutoRefreshGroup.vue.mjs +4 -4
  110. package/es/components/misc/AutoRefreshGroup.vue2.mjs +54 -51
  111. package/es/components/misc/SelectModule.vue.mjs +54 -45
  112. package/es/components/misc/SelectModule.vue2.mjs +2 -2
  113. package/es/components/misc/TriggerAutoImport.vue.mjs +7 -5
  114. package/es/components/misc/TriggerAutoImport.vue2.mjs +2 -2
  115. package/es/components/modal/ModalConfirm.vue.mjs +4 -4
  116. package/es/components/modal/ModalConfirm.vue2.mjs +160 -125
  117. package/es/components/modal/ModalDetail.vue.mjs +50 -39
  118. package/es/components/modal/ModalDetail.vue2.mjs +2 -2
  119. package/es/components/modal/ModalForm.vue.mjs +63 -52
  120. package/es/components/modal/ModalForm.vue2.mjs +2 -2
  121. package/es/components/modal/ModalPorter.vue.mjs +51 -36
  122. package/es/components/modal/ModalPorter.vue2.mjs +2 -2
  123. package/es/components/modal/ModalShelf.vue.mjs +38 -28
  124. package/es/components/modal/ModalShelf.vue2.mjs +2 -2
  125. package/es/components/modal/modal-shelf-core.mjs +52 -36
  126. package/es/components/modal/modal-shelf-hierarchy.mjs +11 -9
  127. package/es/components/panel/PanelEditSwitch.vue.mjs +4 -4
  128. package/es/components/panel/PanelEditSwitch.vue2.mjs +88 -66
  129. package/es/components/panel/PanelItem.vue.mjs +4 -4
  130. package/es/components/panel/PanelItem.vue2.mjs +103 -77
  131. package/es/components/panel/PanelItemNestForm.vue.mjs +4 -4
  132. package/es/components/panel/PanelItemNestForm.vue2.mjs +61 -52
  133. package/es/components/panel/PanelItemNestPanel.vue.mjs +22 -20
  134. package/es/components/panel/PanelItemNestPanel.vue2.mjs +2 -2
  135. package/es/components/panel/PanelMain.vue.mjs +4 -4
  136. package/es/components/panel/PanelMain.vue2.mjs +92 -74
  137. package/es/components/panel/nest-panel-form.mjs +44 -38
  138. package/es/components/panel/nest-panel-item.mjs +18 -17
  139. package/es/components/slot-layout/SlotLayoutFlowAside.vue.mjs +4 -4
  140. package/es/components/slot-layout/SlotLayoutFlowAside.vue2.mjs +55 -42
  141. package/es/components/slot-layout/SlotLayoutTemplate.vue.mjs +11 -9
  142. package/es/components/slot-layout/SlotLayoutTemplate.vue2.mjs +2 -2
  143. package/es/components/table/TableMain.vue.mjs +4 -4
  144. package/es/components/table/TableMain.vue2.mjs +378 -275
  145. package/es/components/table/TableSkeleton.vue.mjs +4 -4
  146. package/es/components/table/TableSkeleton.vue2.mjs +95 -74
  147. package/es/components/table/TableToolbar.vue.mjs +4 -4
  148. package/es/components/table/TableToolbar.vue2.mjs +170 -154
  149. package/es/components/table/ToolbarButtons.vue.mjs +12 -10
  150. package/es/components/table/ToolbarButtons.vue2.mjs +2 -2
  151. package/es/components/table/constants.mjs +4 -3
  152. package/es/components/table/use-fill-height.mjs +12 -10
  153. package/es/components/table/use-table-skeleton.mjs +19 -15
  154. package/es/config/list-model.mjs +2 -2
  155. package/es/config/route.mjs +4 -3
  156. package/es/helpers/form.mjs +35 -25
  157. package/es/helpers/list-helper.mjs +59 -44
  158. package/es/hooks/activated.mjs +49 -33
  159. package/es/hooks/feel-size.mjs +39 -23
  160. package/es/hooks/menus-dispatch.mjs +68 -35
  161. package/es/hooks/timeout.mjs +29 -14
  162. package/es/hooks/use-breakpoint.mjs +35 -23
  163. package/es/hooks/use-channel-viewport-height.mjs +30 -20
  164. package/es/hooks/use-custom-breakpoint.mjs +48 -31
  165. package/es/hooks/use-observe-size.mjs +37 -20
  166. package/es/hooks/use-theme-apply.mjs +175 -124
  167. package/es/hooks/use-viewport-apply.mjs +39 -27
  168. package/es/index.mjs +239 -239
  169. package/es/inject/key.mjs +52 -41
  170. package/es/injectInfo.json.mjs +2 -2
  171. package/es/router/group-redirect.mjs +22 -16
  172. package/es/router/guard/index.mjs +26 -21
  173. package/es/router/guard/login.mjs +4 -2
  174. package/es/router/guard/permission.mjs +4 -2
  175. package/es/store/app.mjs +163 -123
  176. package/es/store/router-permission.mjs +75 -46
  177. package/es/store/user.mjs +100 -71
  178. package/es/style.css +769 -1
  179. package/es/utils/dom.mjs +20 -16
  180. package/es/utils/export.mjs +34 -18
  181. package/es/utils/id.mjs +5 -3
  182. package/es/utils/router.mjs +21 -14
  183. package/es/utils/theme-scale.mjs +50 -35
  184. package/es/utils/time.mjs +20 -14
  185. package/package.json +4 -3
  186. package/src/bridge/README.md +5 -0
  187. package/src/bridge/docs/README.md +72 -0
  188. package/src/components/README.md +84 -0
  189. package/src/components/app-layout/README.md +46 -0
  190. package/src/components/app-layout/docs/README-AppAside.md +69 -0
  191. package/src/components/app-layout/docs/README-AppBody.md +81 -0
  192. package/src/components/app-layout/docs/README-AppBreadcrumb.md +71 -0
  193. package/src/components/app-layout/docs/README-AppFooter.md +41 -0
  194. package/src/components/app-layout/docs/README-AppHeader.md +73 -0
  195. package/src/components/app-layout/docs/README-AppLayout.md +83 -0
  196. package/src/components/app-layout/docs/README-AppPage.md +80 -0
  197. package/src/components/app-layout/docs/README-AppSidebar.md +70 -0
  198. package/src/components/app-layout/docs/README-AppTheme.md +66 -0
  199. package/src/components/data-view/README.md +19 -0
  200. package/src/components/data-view/docs/README-DataListView.md +114 -0
  201. package/src/components/display/README.md +23 -0
  202. package/src/components/display/docs/README-ActionBtn.md +84 -0
  203. package/src/components/display/docs/README-ActionBtnGroup.md +96 -0
  204. package/src/components/display/docs/README-ActionConfirm.md +77 -0
  205. package/src/components/display/docs/README-BooleanTag.md +76 -0
  206. package/src/components/display/docs/README-HeightProvider.md +74 -0
  207. package/src/components/display/docs/README-TabsMain.md +99 -0
  208. package/src/components/display/docs/README-WatchSize.md +70 -0
  209. package/src/components/form/README.md +24 -0
  210. package/src/components/form/docs/README-FormItemNestForm.md +86 -0
  211. package/src/components/form/docs/README-FormItemNestFormList.md +93 -0
  212. package/src/components/form/docs/README-FormMain.md +101 -0
  213. package/src/components/form/docs/README-FormSearch.md +89 -0
  214. package/src/components/form/docs/README-FormSubmitBtn.md +72 -0
  215. package/src/components/form/docs/README-FormSubmitPanel.md +97 -0
  216. package/src/components/list-page/README.md +16 -0
  217. package/src/components/list-page/docs/README-ListPage.md +136 -0
  218. package/src/components/menu/README.md +19 -0
  219. package/src/components/menu/docs/README-MenuItemSub.md +53 -0
  220. package/src/components/menu/docs/README-MenuTree.md +76 -0
  221. package/src/components/misc/README.md +21 -0
  222. package/src/components/misc/docs/README-AutoRefresh.md +74 -0
  223. package/src/components/misc/docs/README-AutoRefreshGroup.md +74 -0
  224. package/src/components/misc/docs/README-SelectModule.md +72 -0
  225. package/src/components/modal/README.md +21 -0
  226. package/src/components/modal/docs/README-ModalConfirm.md +105 -0
  227. package/src/components/modal/docs/README-ModalDetail.md +103 -0
  228. package/src/components/modal/docs/README-ModalForm.md +97 -0
  229. package/src/components/modal/docs/README-ModalPorter.md +92 -0
  230. package/src/components/modal/docs/README-ModalShelf.md +115 -0
  231. package/src/components/panel/README.md +19 -0
  232. package/src/components/panel/docs/README-PanelMain.md +149 -0
  233. package/src/components/slot-layout/README.md +17 -0
  234. package/src/components/slot-layout/docs/README-SlotLayoutFlowAside.md +83 -0
  235. package/src/components/slot-layout/docs/README-SlotLayoutTemplate.md +73 -0
  236. package/src/components/table/README.md +17 -0
  237. package/src/components/table/docs/README-TableMain.md +140 -0
  238. package/src/hooks/README.md +5 -0
  239. package/src/hooks/docs/README.md +49 -0
  240. package/types/bridge/config-hook.d.ts +68 -0
  241. package/types/bridge/index.d.ts +411 -0
  242. package/types/bridge/layout.d.ts +40 -0
  243. package/types/bridge/plugin.d.ts +18 -0
  244. package/types/bridge/route.d.ts +20 -1
  245. package/types/bridge/state.d.ts +14 -0
  246. package/types/bridge/storage.d.ts +9 -0
  247. package/types/bridge/theme/index.d.ts +7 -0
  248. package/types/bridge/theme/persist.d.ts +12 -0
  249. package/types/bridge/theme/system-dark.d.ts +12 -0
  250. package/types/bridge/theme/types.d.ts +238 -0
  251. package/types/components/app-layout/AppAside.vue.d.ts +1 -0
  252. package/types/components/app-layout/AppCollapseToggle.vue.d.ts +3 -0
  253. package/types/components/app-layout/AppHeader.vue.d.ts +3 -0
  254. package/types/components/app-layout/AppLayout.vue.d.ts +12 -0
  255. package/types/components/app-layout/AppPage.vue.d.ts +17 -0
  256. package/types/components/app-layout/AppSidebar.vue.d.ts +2 -0
  257. package/types/components/app-layout/app-page-geometry.d.ts +48 -0
  258. package/types/components/app-layout/keep-alive.d.ts +17 -0
  259. package/types/components/app-layout/types.d.ts +125 -0
  260. package/types/components/app-layout/viewport.d.ts +28 -0
  261. package/types/components/data-view/DataListViewItem.vue.d.ts +8 -0
  262. package/types/components/data-view/index.d.ts +4 -0
  263. package/types/components/data-view/types.d.ts +42 -0
  264. package/types/components/data-view/utils.d.ts +3 -0
  265. package/types/components/display/TabsHeader.vue.d.ts +2 -0
  266. package/types/components/display/TabsMain.vue.d.ts +2 -0
  267. package/types/components/display/TabsRefineFlow.vue.d.ts +1 -0
  268. package/types/components/display/TabsTile.vue.d.ts +247 -12
  269. package/types/components/display/WatchSize.vue.d.ts +9 -0
  270. package/types/components/display/index.d.ts +37 -1
  271. package/types/components/display/types.d.ts +163 -0
  272. package/types/components/display/use-tabs-query-sync.d.ts +29 -0
  273. package/types/components/form/FormItemNestForm.vue.d.ts +5 -0
  274. package/types/components/form/FormItemNestFormList.vue.d.ts +17 -0
  275. package/types/components/form/FormVerifyCode.vue.d.ts +9 -0
  276. package/types/components/form/FormVerifyImage.vue.d.ts +1 -0
  277. package/types/components/form/form-search-utils.d.ts +34 -0
  278. package/types/components/form/nest-form-item-list.d.ts +28 -0
  279. package/types/components/form/nest-form-item.d.ts +21 -0
  280. package/types/components/form/nest-registry.d.ts +14 -0
  281. package/types/components/form/types.d.ts +208 -8
  282. package/types/components/form/use-form-submit.d.ts +13 -0
  283. package/types/components/form/use-layout-by-container.d.ts +23 -0
  284. package/types/components/form/use-nest-form-list.d.ts +13 -0
  285. package/types/components/form/use-nest-form.d.ts +15 -0
  286. package/types/components/form/use-nest-layout-scale.d.ts +12 -0
  287. package/types/components/form/utils.d.ts +56 -1
  288. package/types/components/list-page/ListPage.vue.d.ts +6 -0
  289. package/types/components/list-page/types.d.ts +50 -2
  290. package/types/components/list-page/use-sticky.d.ts +23 -0
  291. package/types/components/misc/index.d.ts +6 -1
  292. package/types/components/misc/types.d.ts +7 -0
  293. package/types/components/modal/ModalConfirm.vue.d.ts +29 -0
  294. package/types/components/modal/index.d.ts +7 -1
  295. package/types/components/modal/modal-shelf-core.d.ts +3 -0
  296. package/types/components/modal/modal-shelf-hierarchy.d.ts +4 -0
  297. package/types/components/modal/modal-shelf-types.d.ts +34 -0
  298. package/types/components/modal/types.d.ts +63 -2
  299. package/types/components/panel/PanelItemNestForm.vue.d.ts +6 -0
  300. package/types/components/panel/PanelItemNestPanel.vue.d.ts +5 -0
  301. package/types/components/panel/nest-panel-form.d.ts +21 -0
  302. package/types/components/panel/nest-panel-item.d.ts +14 -0
  303. package/types/components/panel/types.d.ts +52 -1
  304. package/types/components/slot-layout/SlotLayoutTemplate.vue.d.ts +21 -0
  305. package/types/components/slot-layout/types.d.ts +4 -0
  306. package/types/components/table/constants.d.ts +8 -0
  307. package/types/components/table/types.d.ts +140 -9
  308. package/types/components/table/use-fill-height.d.ts +14 -0
  309. package/types/components/table/use-table-skeleton.d.ts +16 -0
  310. package/types/config/list-model.d.ts +29 -0
  311. package/types/config/route.d.ts +2 -0
  312. package/types/helpers/form.d.ts +5 -0
  313. package/types/helpers/list-helper.d.ts +26 -0
  314. package/types/helpers/types.d.ts +11 -0
  315. package/types/hooks/activated.d.ts +23 -0
  316. package/types/hooks/feel-size.d.ts +2 -0
  317. package/types/hooks/menus-dispatch.d.ts +4 -0
  318. package/types/hooks/timeout.d.ts +4 -0
  319. package/types/hooks/use-channel-viewport-height.d.ts +8 -0
  320. package/types/hooks/use-custom-breakpoint.d.ts +19 -0
  321. package/types/hooks/use-observe-size.d.ts +29 -0
  322. package/types/hooks/use-theme-apply.d.ts +23 -0
  323. package/types/hooks/use-viewport-apply.d.ts +12 -0
  324. package/types/inject/key.d.ts +163 -0
  325. package/types/injectInfo.json.d.ts +1 -1
  326. package/types/router/group-redirect.d.ts +9 -0
  327. package/types/router/guard/index.d.ts +13 -0
  328. package/types/router/guard/login.d.ts +1 -0
  329. package/types/router/guard/permission.d.ts +1 -0
  330. package/types/router/guard/types.d.ts +3 -0
  331. package/types/store/app.d.ts +27 -0
  332. package/types/store/router-permission.d.ts +53 -0
  333. package/types/store/user.d.ts +24 -0
  334. package/types/types/dot-path.d.ts +8 -0
  335. package/types/types/route.d.ts +45 -0
  336. package/types/types/utility-types.d.ts +7 -0
  337. package/types/utils/dom.d.ts +22 -0
  338. package/types/utils/export.d.ts +16 -1
  339. package/types/utils/id.d.ts +1 -0
  340. package/types/utils/router.d.ts +2 -0
  341. package/types/utils/theme-scale.d.ts +31 -0
  342. package/types/utils/time.d.ts +1 -0
@@ -0,0 +1,149 @@
1
+ # PanelMain(配置化面板)
2
+
3
+ > 配置驱动的字段面板:`PanelItem` 逐项渲染,只读展示 + 就地编辑(`editorConfig` 内嵌表单提交 / `editorRender` 自管提交 / `nestPanelForm` 编辑态子表单 / `nestPanelItem` 只读子面板)全链路。
4
+ > 范式页:`apps/reference/src/pages/panel/panel-main/showcase/`、`pages/panel/nest-panel/showcase/`
5
+
6
+ ## 定位
7
+
8
+ - ⚠️ **将废弃(一等公民地位撤销)**:页级纯展示场景由 `ViewLayout`(展示布局,后续迭代)承接——PanelMain 定位为 ViewLayout 默认插槽内容;**表单预览 / 就地编辑场景保留**。新页面 [MUST NOT] 以 PanelMain 作页级展示根容器
9
+ - **何时用(存量保留场景)**:表单预览 / 就地编辑(配置驱动逐项渲染,单开互斥)
10
+ - **何时不用**:页级纯展示用未来 `ViewLayout`(其默认插槽内放 PanelMain);纯表格用 `TableMain`;多字段整体录入表单用 `FormMain`;列表 + 录入用 `ListPage`
11
+ - 内部组合:`ElRow` / `ElCol` 栅格承载逐项 `PanelItem`;编辑态**单开互斥**(打开一项自动清空其余)
12
+ - 行为:`list` 变化时修剪 `editingMap`;卡片与裸排分别加 `panel-main-item-col-wrap_card` / `_plain` class
13
+
14
+ ## 快速上手(最小可用)
15
+
16
+ 只读详情面板零配置——两必传即得纯展示字段面板(`panel-main/showcase/Index.vue` 范式 A 摘要):
17
+
18
+ ```vue
19
+ <PanelMain :data="data" :list="list" />
20
+ ```
21
+
22
+ **要点**:
23
+
24
+ - 两必传:`data`(序列化 SO 形态数据源)、`list`(`PanelItemConfigList<PO,SO>` 配置项数组)
25
+ - 默认只读展示:item 未配 `editable` 时纯展示,`render` 缺省纯文本 `data[key]`,默认栅格 `{span:24}` 裸 div 包裹
26
+
27
+ ## 能力边界 / 按需使用
28
+
29
+ - ⚠️ **将废弃**:页级展示场景将由 `ViewLayout`(后续迭代)承接——新页面 [MUST NOT] 以 PanelMain 作页级展示根容器(纯展示场景:待 ViewLayout 落地后以 PanelMain 为其默认插槽内容)
30
+ - **存量保留场景**:表单预览 / 就地编辑——只传 `data`/`list` 即得纯展示字段面板(`ViewLayout` 插槽内用法同此)。
31
+ - `editable` + `editorConfig`:**仅当某项需要就地编辑时**配(内嵌 FormSubmitPanel,自带取消/重置/提交 + parse/stringify,提交成功自动退编辑并冒泡 `submitSuccess`)——且 [MUST] 同配 `submitFn`(editable 无 submitFn 提交会 throw)。
32
+ - `editorRender`:优先级高于 editorConfig,**无内置按钮、消费方自管提交**——仅当编辑交互需完全自绘时用;与 `editorConfig` 互斥,同一 item [MUST NOT] 同配。
33
+ - `nestPanelForm`/`nestPanelItem`:仅当详情面板需要嵌套子表单/子面板(复合数据结构)时用。
34
+ - `itemCard`:默认不套卡片(裸 div `_plain`);仅当需要每项卡片化展示时传对象/true。
35
+ - `rowGutter`/`layout`/`layoutScale`:默认即够用;仅栅格/嵌套布局需求时配。
36
+ - `refreshFn`:仅当 render/editorRender 内需要 `scope.refresh()` 旁路刷新时传(不承接 editorConfig 提交成功——那走 `submitSuccess`)。
37
+ - **完整能力演示**(editorConfig 基础提交 + editorRender 自管 + 嵌套表单/面板 + 卡片化):`apps/reference/src/pages/panel/panel-main/showcase/`、`apps/reference/src/pages/panel/nest-panel/showcase/`——能力展示,非推荐默认。
38
+
39
+ ## API
40
+ > ⚠️ API 以 types.ts 与组件源码为真相源;与文档冲突时以源码为准。
41
+
42
+ ### Props(泛型 `PO` 解析 / `SO` 格式化)
43
+
44
+ | name | type | 默认 | 语义 |
45
+ | --- | --- | --- | --- |
46
+ | `data` | `ExtractFormStringifyFromObject<PO, SO>`(必填) | — | 序列化(SO)形态的数据源,render/editable 回调的 scope.data |
47
+ | `list` | `PanelItemConfigList<PO, SO>`(必填) | — | 配置项数组,逐项渲染 PanelItem |
48
+ | `rowGutter` | `number` | `8` | 行水平间距(ElRow :gutter) |
49
+ | `layout` | `Partial<ColProps>` | `() => ({ span: 24 })` | 缺省栅格,item 未配 layout 时继承;经 resolveFormLayout(layout, scale) 与 layoutScale 相乘 |
50
+ | `layoutScale` | `number` | `1` | P3 嵌套布局 rebase 累乘因子;同时 provide NEST_LAYOUT_SCALE_KEY 给后代 |
51
+ | `itemCard` | `boolean \| Partial<CardProps & { lastMarginBottom?: string }>` | 无默认 | 是否给每项包 ElCard;对象态可配 lastMarginBottom。⚠️ 旧默认 `{lastMarginBottom:'8px'}` 已移除(breaking,现在默认不套卡片) |
52
+ | `refreshFn` | `(currentStringifyData: any, key: string) => Promise<unknown> \| void` | — | render/editorRender 内 scope.refresh() 的旁路刷新回调;不承接 editorConfig 提交成功(那走 submitSuccess) |
53
+
54
+ ### Emits
55
+
56
+ | 事件 | 载荷 | 语义 |
57
+ | --- | --- | --- |
58
+ | `submitSuccess` | `(currentStringifyData: FormDataInfo<PO,SO>["stringifyData"], key: string)` | 编辑提交成功(key 标识哪项) |
59
+
60
+ ### Slots
61
+
62
+ 无(直接内渲染 ElCol + PanelItem)
63
+
64
+ ### Expose
65
+
66
+
67
+
68
+ ### PanelItem 关键配置(`PanelItemConfig<PO, SO>`)
69
+
70
+ | 字段 | type | 语义 |
71
+ | --- | --- | --- |
72
+ | `key` | `string`(必填) | 数据键 |
73
+ | `label` | `string?` | 标签文本 |
74
+ | `labelHide` | `boolean?` | 展示态隐藏标签(编辑态 label 已由 PanelItem 层接管并强制 `labelHide: true`) |
75
+ | `labelStyle` | `CSSProperties \| string?` | 标签元素样式 |
76
+ | `labelPosition` | `"inline" \| "top"?` | 默认 inline;top = 上方 |
77
+ | `layout` | `Partial<ColProps>?` | 栅格布局,缺省继承 PanelMain.layout |
78
+ | `hide` | `boolean \| (scope: PanelScopeBase) => boolean?` | 隐藏(函数态入 scope) |
79
+ | `render` | `string \| Record<string, any> \| ((scope: PanelRenderScope) => VNode[])?` | 只读渲染;缺省纯文本 data[key] |
80
+ | `editable` | `boolean \| (scope: PanelScopeBase) => boolean?` | 是否可就地编辑 |
81
+ | `editorRender` | 同 render | 编辑器渲染,优先级高于 editorConfig;此分支**无内置按钮**,消费方自管提交 |
82
+ | `editorConfig` | `Omit<FormItemConfig<PO,SO>, "key"\|"label"\|"labelHide"\|"layout">?` | 编辑器表单配置,内嵌 FormSubmitPanel(自带取消/重置/提交 + parse/stringify),提交成功自动退编辑并冒泡 |
83
+ | `submitFn` | `FormSubmitPanelProps["submitFn"]` | 单字段提交;draft = 深克隆副本 |
84
+
85
+ 作用域类型:`PanelScopeBase = { data, value: data[config.key], config }`;`PanelRenderScope` 扩展 `{ editing: boolean, refresh?: () => Promise<unknown>|void, closeEdit?: () => void }`。
86
+
87
+ ### PanelItem(单项容器)
88
+
89
+ - props:`data`(必填)、`config: PanelItemConfig<PO, SO>`(必填)、`refreshFn: (currentStringifyData) => Promise<unknown> | void`(**无 key 参数**,key 由外层 PanelMain 注入)
90
+ - model:`editing`(defineModel<boolean>,默认 false,支持 `v-model:editing`)
91
+ - emits:`submitSuccess(data: stringifyData)`——注意是**合并后数据**(`{...props.data, ...data}`)
92
+ - slots/expose:无(内部转发给 PanelEditSwitch 的 default/editor 槽)
93
+
94
+ ### PanelEditSwitch(编辑态切换核心)
95
+
96
+ - props:`data`(必填)、`config`(`Omit<PanelItemConfig,"editorConfig"> & { editorConfig?: FormItemConfig }`,缺失 key/label 由 PanelItem 补齐)、`editable?: boolean`,另继承 `Partial<Pick<FormSubmitPanelProps, "submitFn">>`
97
+ - model:`editing`(默认 false)
98
+ - emits:`submitSuccess(data)`
99
+ - slots:`default` + `#editor`(scope 均 `{ stringifyDraftData }`)
100
+ - 行为:进编辑时 `_cloneDeep(data)` 生成草稿;`editable` 变 false 自动退编辑;`editable` 且无 `submitFn` 时提交会 throw(「可编辑 那么必须提供 submitFn」)
101
+
102
+ ### PanelItemNestPanel / PanelItemNestForm / Helper 函数
103
+
104
+ - `PanelItemNestPanel`:内联 props `data`(必填)/ `list`(必填)/ `itemCard?` / `layout?` / `rowGutter?` / `parentSpan?`(父 item 代表 span,P3 算因子)/ `rebase?`(默认 true;false = 逆向逃生口,layout 原样直透);无 emits/slots/expose;`inheritAttrs: false`;内部 useNestLayoutScale 叠本层因子作为子 PanelMain 的 layoutScale
105
+ - `PanelItemNestForm`:内联 props `data`(必填,子 FormMain 数据 = 草稿嵌套对象)/ `list`(必填)/ `layout?` / `rowGutter?` / `submitText?`(默认「提交」)/ `cancelText?`(默认「取消」)/ `submit?: () => Promise<unknown> | unknown`(校验通过后的业务提交,返 Promise 自动 loading)/ `cancel?: () => void` / `parentSpan?` / `rebase?`(默认 true);无 emits/slots/expose;`inheritAttrs: false`;提交先 `validateChild()`,reject 留在编辑态
106
+ - `nestPanelItem(options: NestPanelItemOptions): PanelItemConfig` — 生成「父 item 内嵌子 PanelMain」的**只读**配置项。NestPanelItemOptions:`key`(必填)、`label?`、`list: PanelItemConfigList`(必填)、`layout?`、`itemCard?`、`rowGutter?`、`rebase?`(默认 true)。render 出口挂 PanelItemNestPanel,`scope.value ?? {}` 作子 data
107
+ - `nestPanelForm(options: NestPanelFormOptions): PanelItemConfig` — 生成「编辑态挂子 FormMain」的配置项。NestPanelFormOptions:`key`(必填)、`label?`、`list: FormItemConfigList`(必填)、`layout?`、`rowGutter?`、`submitText?`、`cancelText?`、`editable?: boolean | fn`(默认 true)、`submitFn`(**必填**,校验通过后 submitFn(草稿) → closeEdit 回流)、`render?`(只读态回退)、`rebase?`(默认 true)。⚠️ 走 `editorRender` 分支——与 `editorConfig` 互斥,同一 item [MUST NOT] 同配
108
+
109
+ C3 用例(`nest-panel/showcase/Index.vue`——编辑态挂子 FormMain + 内嵌 C1,多层校验闭环):
110
+
111
+ ```ts
112
+ nestPanelForm({
113
+ key: "address",
114
+ label: "地址(C3:编辑态挂子 FormMain + 内嵌 C1,多层校验闭环)",
115
+ list: addressFormList,
116
+ render: ({ value }) => {
117
+ const addr = value as DemoAddress | undefined;
118
+ return (
119
+ <span style="color:#409eff">
120
+ {addr?.province} / {addr?.city} · 联系人 {addr?.contact?.name}
121
+ </span>
122
+ );
123
+ },
124
+ submitFn: (draft) =>
125
+ new Promise<void>((resolve) => {
126
+ setTimeout(() => {
127
+ data.value = { ...(draft as unknown as DemoData) };
128
+ successCount.value += 1;
129
+ resolve();
130
+ }, 300);
131
+ }),
132
+ }),
133
+ ```
134
+
135
+ ## 反模式 / 注意
136
+
137
+ - **同 item 同配 `editorRender` 与 `editorConfig`**:[MUST NOT]——互斥(nestPanelForm 走 editorRender 分支)
138
+ - **编辑态多开**:PanelMain 单编辑态互斥(打开一项清空其余),[MUST NOT] 试图手动多开
139
+ - **动态改 list**:`list` 变化时 `editingMap` 会被修剪,进行中的编辑态可能被清
140
+ - **itemCard 默认不套卡片**(breaking):需卡片态显式传对象/true;裸排(undefined → `_plain` class)是默认
141
+ - **refreshFn 与 submitSuccess 分工**:refreshFn 只承接 render/editorRender 内 scope.refresh() 的旁路刷新;editorConfig 提交成功走 submitSuccess,[MUST NOT] 期待 refreshFn 接收
142
+ - **editable 无 submitFn**:提交会 throw——`editable` [MUST] 配 `submitFn`
143
+
144
+ ## 关联
145
+
146
+ - 内部组件:`PanelItem` / `PanelEditSwitch` / `PanelItemNestPanel` / `PanelItemNestForm`(同族)
147
+ - 表单引擎:`FormItemConfig`(form 族)、`FormSubmitPanel`(内嵌编辑器)
148
+ - 嵌套布局:`layoutScale` / NEST_LAYOUT_SCALE_KEY(P3 嵌套布局 rebase 累乘链)
149
+ - 范式页:`apps/reference/src/pages/panel/panel-main/showcase/`、`pages/panel/nest-panel/showcase/`
@@ -0,0 +1,17 @@
1
+ # slot-layout 插槽布局族
2
+
3
+ 以槽位驱动的轻量布局族:`SlotLayoutTemplate`(透明转发包裹器)+ `SlotLayoutFlowAside`(主区 / 侧栏流式布局,内部基于 SlotLayoutTemplate 组合)。
4
+
5
+ ## 组件文档(docs/)
6
+
7
+ - [SlotLayoutTemplate](./docs/README-SlotLayoutTemplate.md) — 透明转发包裹器(tag 宿主 + 全槽转发 + disabled 透传)
8
+ - [SlotLayoutFlowAside](./docs/README-SlotLayoutFlowAside.md) — 主区 + 侧栏布局(v-model:separate 分离态)
9
+
10
+ ## 关键类型
11
+
12
+ - `SlotLayoutFlowAsideProps`(type / gap / asideWidth / asideMaxHeight 四键,types.ts 导出)
13
+ - 内部不导出:无(SlotLayoutTemplate 零类型导出,props 直声明于组件)
14
+
15
+ ## 范式页(apps/reference)
16
+
17
+ - `/slot-layout/showcase`(全 props + 双示例:单槽包裹 / 具名 + 作用域槽全转发)
@@ -0,0 +1,83 @@
1
+ # SlotLayoutFlowAside(主区 + 侧栏流式布局)
2
+
3
+ > 「主区 + 侧栏」双槽流式布局:默认槽为主区、`#aside` 为侧栏;`v-model:separate` 切换分离态(侧栏 absolute 定位 + 主区 padding 让位)。
4
+ > 范式页:`apps/reference/src/pages/slot-layout/showcase/Index.vue`
5
+
6
+ ## 定位
7
+
8
+ - **何时用**:页面 / 卡片内部需要「主区 + 侧栏」双区布局,且要求侧栏在分离态下绝对定位、主区自动让位
9
+ - **何时不用**:整页级左右布局交给 app-layout 族(AppSidebar / AppAside);只差一个静态侧栏时直接写两列 flex
10
+ - 内部组合:基于 `SlotLayoutTemplate` 组合(两侧各一个实例),非分离态下不做 absolute、不占位让位
11
+ - 分离态行为:`type` 决定侧栏贴左 / 贴右;`asideWidth` 控制侧栏宽;`asideMaxHeight` 限高、超出滚动;主区 padding 为侧栏让位(含 -1px 亚像素补偿)
12
+ - 消费方:ListPage `separateSearch`(搜索 / header / 操作区整体移入侧栏)即基于本组件
13
+
14
+ ## 快速上手(最小可用)
15
+
16
+ 默认值即够用——侧栏贴右、240px 宽、常规文档流:
17
+
18
+ ```html
19
+ <SlotLayoutFlowAside>
20
+ <template #aside>侧栏</template>
21
+ 主区
22
+ </SlotLayoutFlowAside>
23
+ ```
24
+
25
+ 需要分离态时 `v-model:separate` 切换:
26
+
27
+ ```html
28
+ <SlotLayoutFlowAside v-model:separate="separate">
29
+ <template #aside>侧栏(absolute 定位)</template>
30
+ 主区(padding 让位)
31
+ </SlotLayoutFlowAside>
32
+ ```
33
+
34
+ **要点**:
35
+
36
+ - `v-model:separate`:true = 分离态(侧栏 absolute 定位 + 主区 padding 让位);false = 常规文档流,无 absolute、无让位
37
+ - `type` 决定侧栏贴左 / 贴右;侧栏宽由 `asideWidth` 控制
38
+
39
+ ## 能力边界 / 按需使用
40
+
41
+ - **`v-model:separate`:默认 `false`(常规文档流)即够用。** 仅当侧栏需要「绝对定位脱离文档流 + 主区自动让位」才开分离态——判据:侧栏内容超高需独立滚动、且不挤占主区布局(ListPage `separateSearch` 把搜索 / header / 操作区整体移入侧栏即此场景)。
42
+ - **`type` / `gap` / `asideWidth`:默认贴右 / `12px` / `240px` 即够用。** 仅当侧栏要贴左、间距或宽度与默认不同才显式传。
43
+ - **`asideMaxHeight`:默认 `100vh` 即够用(容器内实际取 `min(100%, 100vh)`)。** 仅当容器超高、需要限高承接侧栏滚动才显式限高——判据:侧栏内容比容器高且要独立滚动(超高滚动依赖分离态 + `asideMaxHeight`,两者缺一不可)。
44
+ - **完整能力演示**(全 props 分离态互动面板):`apps/reference/src/pages/slot-layout/showcase/Index.vue`——能力展示,非推荐默认。
45
+
46
+ ## API
47
+ > ⚠️ API 以 types.ts 与组件源码为真相源;与文档冲突时以源码为准。
48
+
49
+ ### Props(`SlotLayoutFlowAsideProps`,types.ts 导出)
50
+
51
+ | name | type | 默认 | 语义 |
52
+ | --- | --- | --- | --- |
53
+ | `type` | `"left" \| "right"` | `"right"` | 侧栏所在侧 |
54
+ | `gap` | `string` | `"12px"` | 主区与侧栏间距 |
55
+ | `asideWidth` | `string` | `"240px"` | 侧栏宽度 |
56
+ | `asideMaxHeight` | `string` | `"100vh"` | 侧栏最大高度(超出滚动) |
57
+
58
+ ### Emits
59
+
60
+ 无(`v-model:separate` 走 defineModel)
61
+
62
+ ### Slots
63
+
64
+ | 槽 | 语义 |
65
+ | --- | --- |
66
+ | `default` | 主区 |
67
+ | `#aside` | 侧栏 |
68
+
69
+ ### Expose
70
+
71
+
72
+
73
+ ## 反模式 / 注意
74
+
75
+ - **非分离态下期待 absolute 行为**:`v-model:separate=false` 时侧栏与主区走常规文档流(垂直排布、无让位),绝对定位只在分离态生效
76
+ - **容器级忘给 asideMaxHeight**:默认 `100vh` 在容器内实际取 `min(100%, 100vh)`,容器超高场景记得显式限高(如上例 `320px`)
77
+ - **侧栏超高溢出**:超高滚动依赖分离态 + `asideMaxHeight`,两者缺一不可
78
+
79
+ ## 关联
80
+
81
+ - 内部基石:`SlotLayoutTemplate`(slot-layout 族)
82
+ - 消费方:`ListPage` `separateSearch`(list-page 族)
83
+ - 范式页:`apps/reference/src/pages/slot-layout/showcase/Index.vue`
@@ -0,0 +1,73 @@
1
+ # SlotLayoutTemplate(透明转发包裹器)
2
+
3
+ > 以 tag 为宿主包裹内容并「透明转发全部插槽」(默认 + 具名 + 作用域)到宿主的布局槽位模板;disabled 时宿主消失、只渲染默认槽内容。
4
+ > 范式页:`apps/reference/src/pages/slot-layout/showcase/`(ⓑ 节单槽包裹 / ⓒ 节具名 + 作用域槽全转发)
5
+
6
+ ## 定位
7
+
8
+ - **何时用**:需要一个「可开关的包裹宿主」——宿主在时把默认 / 具名 / 作用域槽整体转交给 tag 渲染,宿主不在时退化为纯内容渲染
9
+ - **何时不用**:需要自定义插槽编排 / 命名转换时直接用普通 `<component :is>` + `<slot>`;需要「主区 + 侧栏」双区布局用 `SlotLayoutFlowAside`
10
+ - 实现:Options API `defineComponent` + render 函数(`h(tag, attrs, slots)`)——render 直接把 slots 对象整体喂给 `h()`,绕开模板 slot 类型推断,转发更彻底(含具名 / 作用域槽)
11
+ - 内部基石:`SlotLayoutFlowAside` 基于它组合(两侧各一个实例)
12
+
13
+ ## 快速上手(最小可用)
14
+
15
+ 默认 `tag="div"` 即够用——包裹 + 透明转发零配置:
16
+
17
+ ```html
18
+ <SlotLayoutTemplate>
19
+ 包裹内容
20
+ </SlotLayoutTemplate>
21
+ ```
22
+
23
+ 需要「宿主可开关」时(核心场景)加 `disabled`:
24
+
25
+ ```html
26
+ <SlotLayoutTemplate :disabled="tplDisabled">
27
+ 宿主消失时这里的内容直接渲染
28
+ </SlotLayoutTemplate>
29
+ ```
30
+
31
+ **要点**:
32
+
33
+ - 宿主 `tag` 可传原生标签名(`"div"`)/ 组件对象 / 函数式组件;懒加载组件 [MUST] 先经 `defineAsyncComponent` 包裹再传——裸异步工厂 `() => import("./X.vue")` 会被当函数式组件调用、不 resolve Promise
34
+ - `inheritAttrs: false`:attrs 整包转发宿主 tag,不落在本组件根上
35
+
36
+ ## 能力边界 / 按需使用
37
+
38
+ - **透明转发全部插槽(默认 + 具名 + 作用域):默认即全量生效,是本组件的核心能力,零配置。** 组件存在的全部意义就是把 slots 对象整体交给宿主 tag 渲染——常规包裹使用不需要任何开关。
39
+ - **`disabled`:默认 `false`(恒包裹)即够用。** 仅当「宿主存在与否需要运行时切换」(如工具栏按开关决定是否包布局根)才管理该值——判据:宿主在时套布局、宿主不在时退化为纯内容渲染,二者由同一个开关切换。注意 disabled 态只保默认槽(具名槽无落点,属透传语义固有边界)。
40
+ - **完整能力演示**(单槽包裹 + 具名 + 作用域槽全转发):`apps/reference/src/pages/slot-layout/showcase/`(ⓑ / ⓒ 节)——能力展示,非推荐默认。
41
+
42
+ ## API
43
+ > ⚠️ API 以 types.ts 与组件源码为真相源;与文档冲突时以源码为准。
44
+
45
+ ### Props
46
+
47
+ | name | type | 默认 | 语义 |
48
+ | --- | --- | --- | --- |
49
+ | `tag` | `String \| Object \| Function` | `"div"` | 包裹宿主:原生标签名 / 组件对象 / 函数式组件(懒加载组件须先经 `defineAsyncComponent` 包裹) |
50
+ | `disabled` | `boolean` | `false` | true = 透传态(宿主消失、只渲染默认槽内容) |
51
+
52
+ ### Emits
53
+
54
+
55
+
56
+ ### Slots
57
+
58
+ 透明转发全部插槽(默认 + 具名 + 作用域)到宿主 tag;disabled 时仅默认槽。
59
+
60
+ ### Expose
61
+
62
+ 无(`inheritAttrs: false`,attrs 转发宿主)
63
+
64
+ ## 反模式 / 注意
65
+
66
+ - **裸异步工厂直传 tag**:`() => import("./X.vue")` 会被当函数式组件调用、不 resolve Promise,[MUST] 先 `defineAsyncComponent`
67
+ - **disabled 态依赖具名槽**:宿主消失后具名槽无落点,disabled 态只保默认槽
68
+ - **用模板实现透明转发**:模板内 v-for `$slots` + `<slot :name>` 会触发 vue-tsc TS7022 自指推断,须走 render 函数整体转发
69
+
70
+ ## 关联
71
+
72
+ - 内部组合方:`SlotLayoutFlowAside`(slot-layout 族,基于本组件组合两侧)
73
+ - 范式页:`apps/reference/src/pages/slot-layout/showcase/`(ⓑ / ⓒ 节)
@@ -0,0 +1,17 @@
1
+ # table 表格族
2
+
3
+ 单组件族:`TableMain`——列配置 `ElTableColumnProps` 超集(render 三态)+ toolbar + refine 高度链 + 骨架屏 + fillHeight + customView 数据视图切换。
4
+
5
+ ## 组件文档(docs/)
6
+
7
+ - [TableMain](./docs/README-TableMain.md) — 配置驱动表格(api / columns / toolbar / 高度链三选一)
8
+
9
+ ## 关键类型与常量
10
+
11
+ - 类型:`ElTableColumnProps` / `TableToolbarConfig` / `ToolbarButtonConfig` / `TablePageInfo` / `TableApiParams` / `TableApiResult` / `TableMainInstance`(经 `./types` 导出)
12
+ - 常量:`TABLE_COLUMN_KEY_OPERATE = "OPERATE"` / `TABLE_COLUMN_KEY_SELECTION = "SELECTION"`
13
+ - 内部件不导出:`TableSkeleton` / `TableToolbar` / `ToolbarButtons`
14
+
15
+ ## 范式页(apps/reference)
16
+
17
+ - `/table/toolbar`(toolbar 按钮 4 场景)/ `/table/skeleton`(骨架屏 + fillHeight)
@@ -0,0 +1,140 @@
1
+ # TableMain(配置化数据表格)
2
+
3
+ > 配置化表格:列配置(ElTableColumnProps 超集)驱动渲染 + 内置分页 / 工具栏 / 骨架屏 / 精细化布局高度链。
4
+ > 范式页:`apps/reference/src/pages/table/toolbar/`(工具栏)、`apps/reference/src/pages/table/skeleton/`(骨架屏 + fillHeight)、`apps/reference/src/pages/list-page/guide/`(与 FormSearch 组合成列表页)
5
+
6
+ ## 定位
7
+
8
+ - **空间一等公民是 `ListPage`**:常规列表页 [MUST] 走 `ListPage`(内部已组合 FormSearch + TableMain + 高度链 + 分页 + 粘性,常用配置提升为直属 prop;TableMain 恒收 `refine=false`)——**TableMain 一般不直接使用**
9
+ - **直接使用仅当**:纯表格页(无搜索区)/ 嵌入卡片或面板的局部表格 / 特殊布局——此时取数/分页/工具栏/高度链全由自己负责
10
+ - 纯展示静态表格用 ElTable 即可
11
+ - 泛型三参:`T` 行数据类型 / `SQ` 静态查询参数 / `F` 注入对象类型;`query` 变化时重置到第 1 页重新拉取
12
+
13
+ ## 快速上手(最小可用)
14
+
15
+ 标准数据表格零配置——只传三必传即得「取数 + 分页 + 骨架屏 + 工具栏 + 布局」全默认(`table/toolbar/Index.vue`):
16
+
17
+ ```vue
18
+ <TableMain
19
+ ref="tableRef"
20
+ :api="api"
21
+ :columns="columns"
22
+ row-key="id"
23
+ />
24
+ ```
25
+
26
+ 需要工具栏按钮时配 `toolbar`(ActionBtn 配置驱动,context 消费选中列表):
27
+
28
+ ```tsx
29
+ const toolbarConfig: TableToolbarConfig<Row> = {
30
+ leftExtraButtons: [{ key: "batch-archive", label: "批量归档", actionBtnProps: (ctx) => ({ disabled: ctx.selectedList.length === 0, onClick: () => { /* ctx.selectedList 消费 */ } }) }],
31
+ };
32
+ ```
33
+
34
+ ```vue
35
+ <TableMain ref="tableRef" :api="api" :columns="columns" row-key="id" :toolbar="toolbarConfig" />
36
+ ```
37
+
38
+ **要点**:
39
+
40
+ - 三必传 `api`/`columns`/`rowKey`;`api` 收到的是 `query` 深合并 `page.page/page.pageSize` 后的参数(键名由 `APP_API_LIST_MODEL_KEY_CONFIG` 单源定义),返回 `TableApiResult<T>` 的 `items` + `page.totalRecord` 子集
41
+ - 增删改后的刷新:`refresh()`(当前页重拉)或 `reload()`(回第 1 页重拉,已在第 1 页则等同 refresh);keepAlive 返回刷新由 core 内置承担(onActivated 自动 refresh 留页码)——**[MUST NOT]** app 侧再手写刷新信号补偿
42
+
43
+ ## 能力边界 / 按需使用
44
+
45
+ - **默认即够用:分页 + 骨架屏 + refine 布局 + 工具栏全开**——只传 `api`/`columns`/`rowKey` 即得标准数据表格。
46
+ - **高度链三选一(判据)**:`refine` 默认开(按 viewport 高减 toolbar/pager 得出数据区高)即够用;`maxHeight` 显式定高仅当表格嵌定高容器(如固定高度卡片)时配;`viewportHeight` 显式指定视口可用高仅当 refine 计算不满足(嵌套弹层内消费外层 scope,优先级最高)时配。
47
+ - `fillHeight`:默认关;仅当数据稀疏/为空时需要数据区撑满、分页器贴底(视觉稳定)时开——需已有 `maxHeight` 或 refine+viewportHeight 基准。
48
+ - `skeleton`:默认开(冷启行数自适应 3~8);热刷不出骨架属设计语义(外层遮罩盖旧数据),勿改。
49
+ - `customView`(v-model):默认关;仅当需要网格/卡片视图替代表格(DataListView)时开,且 [MUST] 配 `#custom-view-item` 插槽。
50
+ - `query`:仅当有静态查询参数(固定过滤条件)时传;变化自动重置第 1 页重拉。
51
+ - `showSwitchView`:默认关;仅当需要表格/网格视图切换按钮时开。
52
+ - `tableProps`:仅当需透传 ElTable 事件(如 `onSelectionChange` 供工具栏选中联动)时配。
53
+ - `showPager`/`pageSizeInit`/`pageSizeOptions`:仅分页形态不满足时调;常规列表不动。
54
+ - **完整能力演示**(工具栏按钮组 + 骨架屏 + fillHeight + 网格视图):`apps/reference/src/pages/table/toolbar/`、`apps/reference/src/pages/table/skeleton/`——能力展示,非推荐默认。
55
+
56
+ ## API
57
+ > ⚠️ API 以 types.ts 与组件源码为真相源;与文档冲突时以源码为准。
58
+
59
+ ### Props(泛型 `T` 行 / `SQ` 静态 / `F` 注入)
60
+
61
+ | name | type | 默认 | 语义 |
62
+ | --- | --- | --- | --- |
63
+ | `api` | `(params: TableApiParams<SQ>) => Promise<TableApiResult<T>>`(必传) | — | 列表请求;params = query 深合并 page.page/page.pageSize(键名由 APP_API_LIST_MODEL_KEY_CONFIG 定) |
64
+ | `columns` | `ElTableColumnProps<T,F>[]`(必传) | — | 列配置数组 |
65
+ | `rowKey` | `Extract<keyof T,string> \| ((row:T)=>string)`(必传) | — | 行主键 |
66
+ | `query` | `SQ` | — | 静态查询参数;变化时重置到第 1 页重新拉取 |
67
+ | `showPager` | `boolean` | `true` | 展示分页器 |
68
+ | `pageSizeInit` | `number` | `20` | 初始每页条数 |
69
+ | `pageSizeOptions` | `number[]` | `[10,20,30,40]` | 分页器每页条数选项 |
70
+ | `pageLayout` | `string` | `"total, sizes, prev, pager, next, jumper"` | ElPagination layout |
71
+ | `showSwitchView` | `boolean` | `false` | 显示切换视图按钮(表格/网格) |
72
+ | `showToolbar` | `boolean` | `true` | toolbar 顶层开关 |
73
+ | `toolbar` | `TableToolbarConfig<T,SQ,F>` | — | toolbar 配置(按钮 / 刷新 / 自动刷新 / 导出) |
74
+ | `tableProps` | `Omit<TableProps<T>,"data"\|"maxHeight"\|"rowKey"> & Record<`on${...}`,fn>` | — | 透传 ElTable props + 事件(如 `{ onSelectionChange }`,内部与选中存储合并) |
75
+ | `maxHeight` | `number` | — | 表格最大高度;与 refine 二选一作为高度基准 |
76
+ | `headerColor` | `string` | `"rgb(240,240,240)"` | @deprecated,样式已注释无实际效果 |
77
+ | `refine` | `boolean` | `true` | 精细化布局:无 maxHeight 时按 viewport 高减 toolbar/pager 得出数据区高 |
78
+ | `refineReduceHeight` | `number` | `0` | refine 模式下预留高度减量 |
79
+ | `injectInfo` | `F` | — | 注入列插槽 / DataListView 作用域的额外对象 |
80
+ | `dataViewMaxHeightMinValue` | `number` | `500` | 数据视口最大高最小值 floor 兜底 |
81
+ | `skeleton` | `boolean` | `true` | 冷启(首次无数据)骨架屏;热刷不出骨架(外层遮罩盖旧数据) |
82
+ | `skeletonRows` | `number` | 自适应 3~8 | 骨架行数(table)/ 卡片数(grid) |
83
+ | `fillHeight` | `boolean` | `false` | 数据滚动区 min-height 撑满可用高、稀疏/空数据时分页器顶到底;需有 maxHeight 或 refine+viewportHeight 基准 |
84
+ | `viewportHeight` | `number` | — | 显式指定视口可用高(优先级最高);缺省走 SCOPE_VIEWPORT_MAX_HEIGHT scope 链 + fallback 0(500 floor 兜底) |
85
+ | `parentChannel` | `string` | — | 定向消费的祖先 scope 标识;setup 期快照,沿 scope 链找 scope === parentChannel 取高 |
86
+
87
+ **v-model**:`isAutoRefresh`(boolean)、`refreshInterval`(number,秒)、`customView`(boolean,默认 false,显式切 DataListView 替代 ElTable,需配 `#custom-view-item` 插槽)
88
+
89
+ ### Emits
90
+
91
+ | 事件 | 载荷 | 语义 |
92
+ | --- | --- | --- |
93
+ | `pageChange` | `number` | 页码变化 |
94
+ | `pageSizeChange` | `number` | 每页条数变化 |
95
+ | `dataChange` | `T[]` | 数据变更 |
96
+ | `loadingChange` | `boolean` | 加载态变化 |
97
+ | `pageInfoChange` | `TablePageInfo` | 分页信息(pageSize/currentPage/total) |
98
+
99
+ ### Slots
100
+
101
+ 无默认插槽。动态列插槽:
102
+
103
+ | 槽 | scope | 语义 |
104
+ | --- | --- | --- |
105
+ | `#<column.prop>` | `TableColumnDefaultScope`:`{row, column, $index, injectInfo, exposeInfo}` | 覆盖列单元格 |
106
+ | `#header-<column.prop>` | `TableColumnHeaderScope`:`{column, $index, injectInfo, exposeInfo}` | 覆盖列表头 |
107
+ | `#custom-view-item` | `DataListViewItemScope<T>` | customView 模式单项渲染 |
108
+
109
+ ### Expose(`TableMainInstance`)
110
+
111
+ `refresh(silent?: boolean): Promise<unknown>`(当前页重拉)、`reload(slice?: boolean): Promise<unknown>`(回第 1 页重拉,已在第 1 页则等同 refresh)、`getTableInstance(): TableInstance | undefined`(底层 el-table 实例)
112
+
113
+ ## 关键类型
114
+
115
+ - `ElTableColumnProps<T,F>`:EP ElTableColumn 全量 props + `render`/`headerRender` 三态——string 全局组件名 / 组件对象 / functional `(props)=>VNode`
116
+ - `TableColumnDefaultScope` / `TableColumnHeaderScope` / `TableColumnComponentProps`:组件 props 版把 `$index` 改 `_index`(`$` 开头属性 vue 报错)
117
+ - `TableToolbarConfig<T,SQ,F>`:`showRefresh?`/`showAutoRefresh?`(默认均 true)、`exportByFe?`(默认 true,前端 fetchListAll + exportCSV)、`exportFn?`(exportByFe=false 时必传)、`exportColumns?`(ExportColumnConfig,不传则不显示导出按钮)、`leftExtraButtons?`/`rightExtraButtons?`(均默认 `[]`)
118
+ - `ToolbarButtonConfig`:`ActionBtnConfigItem<ToolbarButtonContext>` 别名——`key`/`actionBtnProps`/`props`/`label`/`render`/`show`
119
+ - `ToolbarButtonContext`:`{tableExpose, loading, exportContext, selectedList, pagination}`
120
+ - `TableExportContext<T,SQ,F>`:`{columns(prop+label), selectedList, currentPageList, api, query?, total, hasSelection}`
121
+ - `TablePageInfo`:`{pageSize, currentPage, total}`;`ExportType`:`"selected"|"current"|"all"`
122
+ - `TableInstance`:el-table 实例 Pick 子集
123
+
124
+ ## 反模式 / 注意
125
+
126
+ - **`headerColor` 勿用**:@deprecated,样式已注释无实际效果
127
+ - **`fillHeight` 需高度基准**:必须已有 maxHeight 或 refine+viewportHeight 基准,否则撑高无据
128
+ - **keepAlive 页返回刷新**:core 内置(onActivated refresh 留页码),app 侧 [MUST NOT] 补偿(双重请求反模式)
129
+ - **`skeleton` 只覆盖冷启**:热刷不出骨架(外层遮罩盖旧数据),勿误判为骨架失效
130
+ - **customView 需配套插槽**:`customView=true` 显式切 DataListView 时 [MUST] 配 `#custom-view-item` 插槽,否则无渲染
131
+ - **组件 props 版列 scope 是 `_index`**:`$index` 仅插槽 scope 可用;组件 props 版 `$` 开头属性 vue 报错
132
+ - **TableSkeleton / TableToolbar / ToolbarButtons 是内部件**:index.ts 不导出,[MUST NOT] 外部直接消费;对外只认 `TableMain` + types/constants
133
+
134
+ ## 关联
135
+
136
+ - 组合页:`ListPage`(list-page 族,内部 FormSearch + TableMain,常用配置提升为直属 prop,TableMain 恒收 `refine=false`)
137
+ - 列表接口模型:`APP_API_LIST_MODEL_KEY_CONFIG`(core config 单源,api 参数/结果类型由它推导)
138
+ - 高度链:`refine` + `viewportHeight`/`parentChannel`(SCOPE_VIEWPORT_MAX_HEIGHT scope 链,见 modal 族 ModalConfirm 的 `modalReserve`)
139
+ - 常量:`TABLE_COLUMN_KEY_OPERATE = "OPERATE"`、`TABLE_COLUMN_KEY_SELECTION = "SELECTION"`(index.ts 导出)
140
+ - 范式页:`apps/reference/src/pages/table/toolbar/`、`apps/reference/src/pages/table/skeleton/`、`apps/reference/src/pages/list-page/guide/`
@@ -0,0 +1,5 @@
1
+ # hooks 模块
2
+
3
+ 激活态 / 尺寸 / 断点 / 视口高度链 / 主题挂值等 10 个组合函数,全部经顶层 barrel 导出。
4
+
5
+ > 详情见 [docs/README.md](./docs/README.md)(hook 清单表 + useActivated 使用范式 + 高度链消费范式)
@@ -0,0 +1,49 @@
1
+ # hooks 模块引导
2
+
3
+ 全部经顶层 barrel 导出(`import { useActivated } from "@done-coding/admin-core"`)。命名空间前缀:`use<Feature>`。
4
+
5
+ | hook | 职责 | 何时用 |
6
+ | --- | --- | --- |
7
+ | `useActivated` | 激活态 hook:mounted/activated/deactivated/unmounted 四时机**直接派发** watchFn(`activatedInfo.isActivated` 分流),卸载必派发 | **组件内「随激活态绑解」副作用一律用它**(绑解成对写一处,天然覆盖 KeepAlive 失活/卸载);发布库组件 [MUST] 用它(无宿主假设) |
8
+ | `useFeelSize` | 感知元素尺寸(ResizeObserver):`watchDom(dom)` / `unwatchDom()` + `sizeInfo` | 需要感知某元素宽高变化 |
9
+ | `useBreakpoint` | 视口断点:xs<768 / sm≥768 / md≥992 / lg≥1200 / xl≥1920(matchMedia,SSR 守护) | 响应式 span 默认走视口(与 ElCol 同引擎) |
10
+ | `useCustomBreakpoint` | 容器宽断点:`useCustomBreakpoint()` + `resolveBreakpointByWidth(width)` + `resolveRootEl`(EP 栅格同源阈值) | **容器断点**(非视口):FormMain `layoutByContainer`、compact 搜索等 |
11
+ | `useObserveSize` | 激活态感知 RO 观测原语:`getTarget` / `onResize` / `enabled` / `debounce`(默认 100ms,leading+trailing) | 需要「捕获渲染后尺寸变化」(CSS 折叠/异步撑开),WatchSize `observeResize` 底层 |
12
+ | `useChannelViewportHeight` | 视口可用最大高解析:`viewportHeight` > scope 链(parentChannel 定向/就近)> fallback;返回 `viewportHeightFinal` + `nearestScope` | 列表/表格/弹窗的高度计算核心消费契约 |
13
+ | `useCoreThemeApply` | 主题挂值:JS → root CSS var(`--dc-core-*` + `--el-*` 双命名空间)+ `buildRhythmCss`(density/motion 节奏) | 由 AppLayout 启动;业务一般不直接调 |
14
+ | `useCoreViewportApply` | viewport 边框 CSS var 挂值(`--dc-core-viewport-*` / `--dc-core-gap`) | 由 AppLayout 启动 |
15
+ | `useMenusDataDispatch` | 菜单数据分发:`menus` / `menuFlatList` / `extractLevel1ToHeader` + 当前路由聚焦菜单 | AppHeader/AppSidebar 消费;业务接 meta.menu 树 |
16
+ | `useTimeout` | 定时器 `[setTimer, clearTimer]`,`autoClear` 随激活态/卸载清理 | 组件内延时逻辑(替代裸 setTimeout,防泄漏) |
17
+
18
+ ## 使用范式
19
+
20
+ **组件内副作用(最重要的一条)**:
21
+
22
+ ```ts
23
+ // ✅ 绑解成对写一处(useActivated 四态直接派发,卸载自动解绑外部 target 监听)
24
+ useActivated((info) => {
25
+ if (info.isActivated) {
26
+ window.addEventListener("resize", onResize);
27
+ } else {
28
+ window.removeEventListener("resize", onResize);
29
+ }
30
+ });
31
+ ```
32
+
33
+ ```ts
34
+ // ❌ 禁用:useActivatedExec / useActivatedEvent(已 deprecated,碎片化包装)
35
+ // ❌ 组件内禁用 onScopeDispose(语义 ≈ onUnmounted 但不覆盖 KeepAlive 失活 → 观测/订阅泄漏)
36
+ // ✅ 非组件 scope(hooks/store/裸 effectScope)才用 onScopeDispose
37
+ ```
38
+
39
+ **视口高度链消费**(列表/表格高度):
40
+
41
+ ```ts
42
+ const { viewportHeightFinal } = useChannelViewportHeight({ scope: "my-scope" });
43
+ // 或作为子定向消费祖先:useChannelViewportHeight({ scope: "my-scope", parentChannel: "parent-scope" })
44
+ ```
45
+
46
+ ## 关联
47
+
48
+ - `useActivated` 详细语义见 `docs/specs/` 相关任务文档与 CLAUDE.md 规则 21
49
+ - 断点体系:`useBreakpoint`(视口)与 `useCustomBreakpoint`(容器)双源,见 FormMain `layoutByContainer` 文档
@@ -1,31 +1,99 @@
1
1
  import { DeepReadonly } from 'vue';
2
2
  import { AppBaseInfo, AppLayoutHeaderConfig, AppLayoutFooterConfig, AppLayoutSidebarConfig, AppLayoutAsideConfig, AppLayoutBreadcrumbConfig, AppLayoutBodyConfig, AppLayoutViewportConfig, AppLayoutGapConfig, AppThemeConfig, AppLayoutConfig } from './index';
3
+ /**
4
+ * 可 update 的响应式配置字段 key 联合(插件系统一期 7 个 + viewport 边框期补 1 = 8 个)。
5
+ *
6
+ * #插件系统一期:bridge 的布局/主题/基础信息字段下沉为 reactive 响应式,
7
+ * 经 `update(key, partial)` 单字段一级浅合并触发。viewport 边框期新增
8
+ * `APP_LAYOUT_VIEWPORT_CONFIG`(同属布局子,纳入本联合 + layoutAggregate)。
9
+ * 其余 init 字段(env / cache / router 族 / userInfoAccess)非响应式范围,[MUST NOT] 纳入本联合。
10
+ */
3
11
  export type UpdatableConfigKey = "APP_BASE_INFO" | "APP_LAYOUT_HEADER_CONFIG" | "APP_LAYOUT_FOOTER_CONFIG" | "APP_LAYOUT_SIDEBAR_CONFIG" | "APP_LAYOUT_ASIDE_CONFIG" | "APP_LAYOUT_BREADCRUMB_CONFIG" | "APP_LAYOUT_BODY_CONFIG" | "APP_LAYOUT_VIEWPORT_CONFIG" | "APP_LAYOUT_GAP_CONFIG" | "APP_THEME_CONFIG";
12
+ /**
13
+ * 7 个可 update 字段 key → 值类型映射。
14
+ *
15
+ * `update<K>(key, partial)` 的 `partial` 类型经 `Partial<UpdatableConfigMap[K]>`
16
+ * 推导;`createBridgeConfigHook` 的 init 入参亦以本映射约束(见 `BridgeConfigInit`)。
17
+ */
4
18
  export interface UpdatableConfigMap {
19
+ /** 应用基础信息 */
5
20
  APP_BASE_INFO: AppBaseInfo;
21
+ /** 应用布局-header 配置 */
6
22
  APP_LAYOUT_HEADER_CONFIG: AppLayoutHeaderConfig;
23
+ /** 应用布局-footer 配置 */
7
24
  APP_LAYOUT_FOOTER_CONFIG: AppLayoutFooterConfig;
25
+ /** 应用布局-sidebar 配置 */
8
26
  APP_LAYOUT_SIDEBAR_CONFIG: AppLayoutSidebarConfig;
27
+ /** 应用布局-aside 右侧补充区配置(P1' additive) */
9
28
  APP_LAYOUT_ASIDE_CONFIG: AppLayoutAsideConfig;
29
+ /** 应用布局-面包屑配置 */
10
30
  APP_LAYOUT_BREADCRUMB_CONFIG: AppLayoutBreadcrumbConfig;
31
+ /** 应用布局-页面主体配置 */
11
32
  APP_LAYOUT_BODY_CONFIG: AppLayoutBodyConfig;
33
+ /** 应用布局-视口边框配置 */
12
34
  APP_LAYOUT_VIEWPORT_CONFIG: AppLayoutViewportConfig;
35
+ /** 应用布局-模块间距配置(内缝 gap) */
13
36
  APP_LAYOUT_GAP_CONFIG: AppLayoutGapConfig;
37
+ /** 应用主题配置 */
14
38
  APP_THEME_CONFIG: AppThemeConfig;
15
39
  }
40
+ /**
41
+ * `createBridgeConfigHook` 入参类型——7 个本期响应式字段的初值(= `UpdatableConfigMap`)。
42
+ *
43
+ * 由 `createCoreBridge` 闭包内从 `options` 的对应 7 字段直传;入参字段对象将被
44
+ * 直接 `reactive()` 化(方案 A,[MUST NOT] 浅拷贝),故 [MUST] 为去 freeze 后的非
45
+ * frozen 裸对象(app 端去字段级 freeze 保证)。
46
+ */
16
47
  export type BridgeConfigInit = UpdatableConfigMap;
48
+ /**
49
+ * configHook 内部返回契约——`update` 方法 + 8 个对外 readonly 视图。
50
+ *
51
+ * **不对外 export**:`createBridgeConfigHook` / 本 interface / 上述类型符号 [MUST NOT]
52
+ * 在 `bridge/index.ts` re-export(守封装边界)。`bridge/index.ts` 仅内部 import 工厂,
53
+ * 把 `update` 与各 `roXxx` 视图组装进 `CoreBridge` 公开面。
54
+ *
55
+ * 7 个 readonly 视图各为对应 reactive 子配置的 `readonly()` 深只读包装;`roLayout`
56
+ * 为 5 布局子的 `reactive({...})` 聚合的 readonly 包装——5 字段指向各 reactive 子配置,
57
+ * 任一布局子 `update` 原地改经叶子代理同步跟随(Vue reactive 深度转换保留嵌套响应式),零拷贝。
58
+ */
17
59
  export interface BridgeConfigHook {
60
+ /** 单字段一级浅合并 update(`Object.assign` 派发到对应 reactive 子配置) */
18
61
  update: <K extends UpdatableConfigKey>(key: K, partial: Partial<UpdatableConfigMap[K]>) => void;
62
+ /** 应用基础信息对外只读视图 */
19
63
  roBaseInfo: DeepReadonly<AppBaseInfo>;
64
+ /** 应用布局-header 配置对外只读视图 */
20
65
  roHeader: DeepReadonly<AppLayoutHeaderConfig>;
66
+ /** 应用布局-footer 配置对外只读视图 */
21
67
  roFooter: DeepReadonly<AppLayoutFooterConfig>;
68
+ /** 应用布局-sidebar 配置对外只读视图 */
22
69
  roSidebar: DeepReadonly<AppLayoutSidebarConfig>;
70
+ /** 应用布局-aside 右侧补充区配置对外只读视图(P1' additive) */
23
71
  roAside: DeepReadonly<AppLayoutAsideConfig>;
72
+ /** 应用布局-面包屑配置对外只读视图 */
24
73
  roBreadcrumb: DeepReadonly<AppLayoutBreadcrumbConfig>;
74
+ /** 应用布局-页面主体配置对外只读视图 */
25
75
  roBody: DeepReadonly<AppLayoutBodyConfig>;
76
+ /** 应用布局-视口边框配置对外只读视图 */
26
77
  roViewport: DeepReadonly<AppLayoutViewportConfig>;
78
+ /** 应用布局-模块间距配置对外只读视图(内缝 gap) */
27
79
  roGap: DeepReadonly<AppLayoutGapConfig>;
80
+ /** 应用主题配置对外只读视图 */
28
81
  roTheme: DeepReadonly<AppThemeConfig>;
82
+ /**
83
+ * 应用布局聚合配置只读视图(5 布局子 reactive 聚合的 readonly 包装)。
84
+ *
85
+ * `reactive({header: reactiveHeader, ...})` 5 字段指向各 reactive 子配置,任一布局子
86
+ * update 原地改经叶子代理同步跟随(Vue reactive 深度转换保留嵌套响应式),零拷贝。
87
+ */
29
88
  roLayout: DeepReadonly<AppLayoutConfig>;
30
89
  }
90
+ /**
91
+ * bridge 响应式配置 hook 工厂。
92
+ *
93
+ * 接收 7 个本期字段初值,逐字段 `reactive()` 化(方案 A:直接 reactive 入参对象,
94
+ * [MUST NOT] 浅拷贝),内部把 5 布局子聚合为 `layoutAggregate = reactive({...})`,
95
+ * 对外返回 `update`(单字段一级浅合并 `Object.assign`,[MUST NOT] 深合并 / merge / clone)+
96
+ * 7 个 `readonly()` 视图 + 1 个 `roLayout`(readonly 聚合视图)。每次 `createCoreBridge`
97
+ * 调用各自闭包内构造一份,零模块级单例(守实例隔离)。
98
+ */
31
99
  export declare function createBridgeConfigHook(init: BridgeConfigInit): BridgeConfigHook;