@done-coding/admin-core 0.8.3-alpha.0 → 0.9.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.
- package/docs/nested-config-paradigm.md +80 -0
- package/es/bridge/config-hook.mjs +37 -0
- package/es/bridge/index.mjs +157 -62
- package/es/bridge/plugin.mjs +29 -0
- package/es/bridge/theme.mjs +65 -0
- package/es/components/app-layout/AppBody.vue.mjs +1 -1
- package/es/components/app-layout/AppBody.vue2.mjs +47 -49
- package/es/components/app-layout/AppBreadcrumb.vue.mjs +1 -1
- package/es/components/app-layout/AppBreadcrumb.vue2.mjs +35 -41
- package/es/components/app-layout/AppFooter.vue.mjs +2 -2
- package/es/components/app-layout/AppFooter.vue2.mjs +8 -8
- package/es/components/app-layout/AppHeader.vue.mjs +1 -1
- package/es/components/app-layout/AppHeader.vue2.mjs +60 -69
- package/es/components/app-layout/AppLayout.vue.mjs +2 -2
- package/es/components/app-layout/AppLayout.vue2.mjs +95 -93
- package/es/components/app-layout/AppSidebar.vue.mjs +2 -2
- package/es/components/app-layout/AppSidebar.vue2.mjs +79 -82
- package/es/components/app-layout/AppTheme.vue.mjs +7 -0
- package/es/components/app-layout/AppTheme.vue2.mjs +38 -0
- package/es/components/data-view/DataListView.vue.mjs +2 -2
- package/es/components/data-view/DataListView.vue2.mjs +36 -36
- package/es/components/display/ActionConfirm.vue2.mjs +16 -16
- package/es/components/display/HeightProvider.vue.mjs +10 -10
- package/es/components/display/TabsHeader.vue.mjs +4 -4
- package/es/components/display/TabsHeader.vue2.mjs +34 -34
- package/es/components/display/TabsMain.vue.mjs +40 -39
- package/es/components/display/TabsRefineFlow.vue.mjs +30 -28
- package/es/components/form/FormItem.vue.mjs +1 -1
- package/es/components/form/FormItem.vue2.mjs +75 -81
- package/es/components/form/FormItemNestForm.vue.mjs +7 -0
- package/es/components/form/FormItemNestForm.vue2.mjs +49 -0
- package/es/components/form/FormItemNestFormList.vue.mjs +7 -0
- package/es/components/form/FormItemNestFormList.vue2.mjs +137 -0
- package/es/components/form/FormMain.vue.mjs +5 -147
- package/es/components/form/FormMain.vue2.mjs +160 -2
- package/es/components/form/FormRadioGroup.vue.mjs +42 -49
- package/es/components/form/FormSearch.vue.mjs +2 -2
- package/es/components/form/FormSearch.vue2.mjs +122 -128
- package/es/components/form/FormSelect.vue.mjs +34 -40
- package/es/components/form/FormSubmitBtn.vue.mjs +23 -28
- package/es/components/form/FormSubmitPanel.vue.mjs +2 -2
- package/es/components/form/FormSubmitPanel.vue2.mjs +29 -28
- package/es/components/form/FormTree.vue.mjs +16 -21
- package/es/components/form/FormVerifyCode.vue.mjs +37 -43
- package/es/components/form/FormVerifyImage.vue.mjs +2 -2
- package/es/components/form/FormVerifyImage.vue2.mjs +36 -41
- package/es/components/form/nest-form-item-list.mjs +71 -0
- package/es/components/form/nest-form-item.mjs +42 -0
- package/es/components/form/nest-registry.mjs +7 -0
- package/es/components/form/use-nest-form-list.mjs +22 -0
- package/es/components/form/use-nest-form.mjs +34 -0
- package/es/components/form/use-nest-layout-scale.mjs +14 -0
- package/es/components/form/utils.mjs +77 -61
- package/es/components/list-page/ListPage.vue.mjs +2 -2
- package/es/components/list-page/ListPage.vue2.mjs +134 -139
- package/es/components/menu/MenuItemSub.vue.mjs +41 -48
- package/es/components/menu/MenuTree.vue.mjs +58 -65
- package/es/components/misc/AutoRefresh.vue.mjs +2 -2
- package/es/components/misc/AutoRefresh.vue2.mjs +44 -51
- package/es/components/misc/AutoRefreshGroup.vue.mjs +2 -2
- package/es/components/misc/AutoRefreshGroup.vue2.mjs +37 -43
- package/es/components/modal/ConfirmModal.vue.mjs +3 -4
- package/es/components/modal/ConfirmModal.vue2.mjs +83 -111
- package/es/components/modal/DetailModal.vue.mjs +38 -41
- package/es/components/panel/PanelEditSwitch.vue.mjs +1 -1
- package/es/components/panel/PanelEditSwitch.vue2.mjs +50 -55
- package/es/components/panel/PanelItemNestForm.vue.mjs +7 -0
- package/es/components/panel/PanelItemNestForm.vue2.mjs +69 -0
- package/es/components/panel/PanelItemNestPanel.vue.mjs +34 -0
- package/es/components/panel/PanelItemNestPanel.vue2.mjs +4 -0
- package/es/components/panel/PanelMain.vue.mjs +1 -1
- package/es/components/panel/PanelMain.vue2.mjs +72 -72
- package/es/components/panel/nest-panel-form.mjs +53 -0
- package/es/components/panel/nest-panel-item.mjs +25 -0
- package/es/components/table/TableMain.vue.mjs +2 -2
- package/es/components/table/TableMain.vue2.mjs +221 -229
- package/es/components/table/TableToolbar.vue.mjs +2 -2
- package/es/components/table/TableToolbar.vue2.mjs +115 -126
- package/es/hooks/use-admin-theme-apply.mjs +84 -0
- package/es/hooks/use-admin-viewport-apply.mjs +27 -0
- package/es/index.mjs +190 -153
- package/es/inject/key.mjs +15 -6
- package/es/store/app.mjs +75 -84
- package/es/style.css +1 -1
- package/es/utils/theme-scale.mjs +37 -0
- package/package.json +2 -4
- package/types/bridge/config-hook.d.ts +91 -0
- package/types/bridge/index.d.ts +108 -8
- package/types/bridge/plugin.d.ts +39 -0
- package/types/bridge/theme.d.ts +85 -0
- package/types/components/app-layout/AppTheme.vue.d.ts +2 -0
- package/types/components/app-layout/types.d.ts +1 -1
- package/types/components/form/FormItem.vue.d.ts +12 -12
- package/types/components/form/FormItemNestForm.vue.d.ts +36 -0
- package/types/components/form/FormItemNestFormList.vue.d.ts +63 -0
- package/types/components/form/FormMain.vue.d.ts +2 -2
- package/types/components/form/FormSearch.vue.d.ts +2 -2
- package/types/components/form/FormTree.vue.d.ts +50 -50
- package/types/components/form/index.d.ts +9 -1
- package/types/components/form/nest-form-item-list.d.ts +63 -0
- package/types/components/form/nest-form-item.d.ts +36 -0
- package/types/components/form/nest-registry.d.ts +22 -0
- package/types/components/form/types.d.ts +2 -0
- package/types/components/form/use-nest-form-list.d.ts +20 -0
- package/types/components/form/use-nest-form.d.ts +26 -0
- package/types/components/form/use-nest-layout-scale.d.ts +17 -0
- package/types/components/form/utils.d.ts +26 -1
- package/types/components/menu/MenuTree.vue.d.ts +10 -10
- package/types/components/modal/ModalShelf.vue.d.ts +1 -1
- package/types/components/panel/PanelItemNestForm.vue.d.ts +35 -0
- package/types/components/panel/PanelItemNestPanel.vue.d.ts +22 -0
- package/types/components/panel/index.d.ts +5 -1
- package/types/components/panel/nest-panel-form.d.ts +38 -0
- package/types/components/panel/nest-panel-item.d.ts +28 -0
- package/types/components/panel/types.d.ts +2 -0
- package/types/components/table/TableMain.vue.d.ts +3 -3
- package/types/hooks/activated.d.ts +2 -2
- package/types/hooks/feel-size.d.ts +1 -1
- package/types/hooks/index.d.ts +2 -0
- package/types/hooks/menus-dispatch.d.ts +5 -5
- package/types/hooks/use-admin-theme-apply.d.ts +17 -0
- package/types/hooks/use-admin-viewport-apply.d.ts +15 -0
- package/types/hooks/use-breakpoint.d.ts +1 -1
- package/types/inject/key.d.ts +46 -1
- package/types/store/app.d.ts +138 -59
- package/types/utils/index.d.ts +1 -0
- package/types/utils/theme-scale.d.ts +35 -0
|
@@ -1,11 +1,36 @@
|
|
|
1
1
|
import { DatePickerShortcut, FormItemConfig, FormItemConfigList, ExtractFormStringifyFromObject, FormItemConfigSwiftOptions } from './types';
|
|
2
2
|
import { ColProps } from 'element-plus';
|
|
3
|
+
/**
|
|
4
|
+
* 嵌套布局 rebase 的栅格档集(P3)。
|
|
5
|
+
* ---
|
|
6
|
+
* FormMain/PanelMain 配置化 `span` 约定用 24 的约数 {6,8,12,24}(admin 常用档);
|
|
7
|
+
* 子层 rebase(×scale)后 ceil 到这组档,避免非约数(18/16/7)致行铺不满 ragged。
|
|
8
|
+
*/
|
|
9
|
+
export declare const NEST_LAYOUT_TIERS: readonly [6, 8, 12, 24];
|
|
10
|
+
/**
|
|
11
|
+
* 把数值 ceil 到档集中 ≥ value 的最近一档(偏宽取向)。
|
|
12
|
+
* ---
|
|
13
|
+
* - value ≤ 下限 → 取下限;value ≥ 上限 → 封顶上限。
|
|
14
|
+
* - 落档间 → 抬到上一档(如 16 → 24,非更近的 12),合「容器窄字段更宽」意图。
|
|
15
|
+
*/
|
|
16
|
+
export declare const ceilToTier: (value: number, tiers?: readonly number[]) => number;
|
|
17
|
+
/**
|
|
18
|
+
* 从 layout 解析父 item 实际分配的代表 span(P3 rebase 算因子用)。
|
|
19
|
+
* ---
|
|
20
|
+
* span 优先;无 span 时取 lg→md→sm→xl→xs 首个数值断点代表;都无 → 24(本层不缩)。
|
|
21
|
+
*/
|
|
22
|
+
export declare const resolveLayoutSpan: (layout?: Partial<ColProps>) => number;
|
|
3
23
|
/**
|
|
4
24
|
* 将 layout 解析为各屏幕尺寸的显式值:
|
|
5
25
|
* - 配置 span: xxx 时,xs/sm/md/lg/xl 默认全部视为 xxx
|
|
6
26
|
* - 单独设置某个尺寸则该尺寸覆盖 span 推导值
|
|
27
|
+
* ---
|
|
28
|
+
* **P3 嵌套 rebase**:可选第 2 参 `scale`(嵌套累乘因子,缺省 1)。
|
|
29
|
+
* - `scale === 1` → 现状行为不变(非档值原样透传,[MUST NOT] ceil,向后兼容关键)。
|
|
30
|
+
* - `scale !== 1` → span 及各断点数值 `× scale` 后经 `ceilToTier` 取整到档集,
|
|
31
|
+
* 维持子层字段绝对宽与顶级一致(容器变窄 → span 变大)。
|
|
7
32
|
*/
|
|
8
|
-
export declare const resolveFormLayout: (layout?: Partial<ColProps
|
|
33
|
+
export declare const resolveFormLayout: (layout?: Partial<ColProps>, scale?: number) => Partial<ColProps>;
|
|
9
34
|
/**
|
|
10
35
|
* 生成 ElDatePicker 原生 `shortcuts` 的默认时间段快捷值:今日、昨日、近7日。
|
|
11
36
|
* 直接用于 `<ElDatePicker :shortcuts="getDatePickerShortcuts()">`——
|
|
@@ -10,7 +10,7 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {
|
|
|
10
10
|
open: (index: string) => void | undefined;
|
|
11
11
|
close: (index: string) => void | undefined;
|
|
12
12
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
13
|
-
elMenu: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<
|
|
13
|
+
elMenu: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('vue').ExtractPropTypes<{
|
|
14
14
|
readonly mode: import('element-plus/es/utils/index.mjs').EpPropFinalized<StringConstructor, "horizontal" | "vertical", unknown, "vertical", boolean>;
|
|
15
15
|
readonly defaultActive: import('element-plus/es/utils/index.mjs').EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
16
16
|
readonly defaultOpeneds: import('element-plus/es/utils/index.mjs').EpPropFinalized<(new (...args: any[]) => string[]) | (() => string[]) | (((new (...args: any[]) => string[]) | (() => string[])) | null)[], unknown, unknown, () => [], boolean>;
|
|
@@ -25,11 +25,11 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {
|
|
|
25
25
|
readonly collapseTransition: import('element-plus/es/utils/index.mjs').EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
26
26
|
readonly ellipsis: import('element-plus/es/utils/index.mjs').EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
27
27
|
readonly popperOffset: import('element-plus/es/utils/index.mjs').EpPropFinalized<NumberConstructor, unknown, unknown, 6, boolean>;
|
|
28
|
-
readonly ellipsisIcon: import('element-plus/es/utils/index.mjs').EpPropFinalized<(new (...args: any[]) => (string | Component) & {}) | (() => string | Component) | (((new (...args: any[]) => (string | Component) & {}) | (() => string | Component)) | null)[], unknown, unknown, () => import('vue').DefineComponent<{}, void, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>, boolean>;
|
|
28
|
+
readonly ellipsisIcon: import('element-plus/es/utils/index.mjs').EpPropFinalized<(new (...args: any[]) => (string | import('vue').Component) & {}) | (() => string | import('vue').Component) | (((new (...args: any[]) => (string | import('vue').Component) & {}) | (() => string | import('vue').Component)) | null)[], unknown, unknown, () => import('vue').DefineComponent<{}, void, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>, boolean>;
|
|
29
29
|
readonly popperEffect: import('element-plus/es/utils/index.mjs').EpPropFinalized<(new (...args: any[]) => string) | (() => import('element-plus').PopperEffect) | (((new (...args: any[]) => string) | (() => import('element-plus').PopperEffect)) | null)[], unknown, unknown, "dark", boolean>;
|
|
30
30
|
readonly popperClass: StringConstructor;
|
|
31
31
|
readonly popperStyle: {
|
|
32
|
-
readonly type:
|
|
32
|
+
readonly type: import('vue').PropType<import('element-plus/es/utils/index.mjs').EpPropMergeType<(new (...args: any[]) => string | import('vue').CSSProperties) | (() => string | import('vue').CSSProperties) | (((new (...args: any[]) => string | import('vue').CSSProperties) | (() => string | import('vue').CSSProperties)) | null)[], unknown, unknown>>;
|
|
33
33
|
readonly required: false;
|
|
34
34
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
35
35
|
__epPropKey: true;
|
|
@@ -41,7 +41,7 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {
|
|
|
41
41
|
onClose?: ((index: string, indexPath: string[]) => any) | undefined;
|
|
42
42
|
onSelect?: ((index: string, indexPath: string[], item: import('element-plus').MenuItemClicked, routerResult?: Promise<void | import('vue-router').NavigationFailure> | undefined) => any) | undefined;
|
|
43
43
|
onOpen?: ((index: string, indexPath: string[]) => any) | undefined;
|
|
44
|
-
}>, () => VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
44
|
+
}>, () => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
45
45
|
[key: string]: any;
|
|
46
46
|
}>, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
47
47
|
close: (index: string, indexPath: string[]) => boolean;
|
|
@@ -59,7 +59,7 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {
|
|
|
59
59
|
readonly menuTrigger: import('element-plus/es/utils/index.mjs').EpPropMergeType<StringConstructor, "click" | "hover", unknown>;
|
|
60
60
|
readonly collapseTransition: import('element-plus/es/utils/index.mjs').EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
61
61
|
readonly popperOffset: number;
|
|
62
|
-
readonly ellipsisIcon: import('element-plus/es/utils/index.mjs').EpPropMergeType<(new (...args: any[]) => (string | Component) & {}) | (() => string | Component) | (((new (...args: any[]) => (string | Component) & {}) | (() => string | Component)) | null)[], unknown, unknown>;
|
|
62
|
+
readonly ellipsisIcon: import('element-plus/es/utils/index.mjs').EpPropMergeType<(new (...args: any[]) => (string | import('vue').Component) & {}) | (() => string | import('vue').Component) | (((new (...args: any[]) => (string | import('vue').Component) & {}) | (() => string | import('vue').Component)) | null)[], unknown, unknown>;
|
|
63
63
|
readonly popperEffect: import('element-plus/es/utils/index.mjs').EpPropMergeType<(new (...args: any[]) => string) | (() => import('element-plus').PopperEffect) | (((new (...args: any[]) => string) | (() => import('element-plus').PopperEffect)) | null)[], unknown, unknown>;
|
|
64
64
|
readonly uniqueOpened: boolean;
|
|
65
65
|
readonly router: boolean;
|
|
@@ -71,7 +71,7 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {
|
|
|
71
71
|
C: {};
|
|
72
72
|
M: {};
|
|
73
73
|
Defaults: {};
|
|
74
|
-
}, Readonly<
|
|
74
|
+
}, Readonly<import('vue').ExtractPropTypes<{
|
|
75
75
|
readonly mode: import('element-plus/es/utils/index.mjs').EpPropFinalized<StringConstructor, "horizontal" | "vertical", unknown, "vertical", boolean>;
|
|
76
76
|
readonly defaultActive: import('element-plus/es/utils/index.mjs').EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
77
77
|
readonly defaultOpeneds: import('element-plus/es/utils/index.mjs').EpPropFinalized<(new (...args: any[]) => string[]) | (() => string[]) | (((new (...args: any[]) => string[]) | (() => string[])) | null)[], unknown, unknown, () => [], boolean>;
|
|
@@ -86,11 +86,11 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {
|
|
|
86
86
|
readonly collapseTransition: import('element-plus/es/utils/index.mjs').EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
87
87
|
readonly ellipsis: import('element-plus/es/utils/index.mjs').EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
88
88
|
readonly popperOffset: import('element-plus/es/utils/index.mjs').EpPropFinalized<NumberConstructor, unknown, unknown, 6, boolean>;
|
|
89
|
-
readonly ellipsisIcon: import('element-plus/es/utils/index.mjs').EpPropFinalized<(new (...args: any[]) => (string | Component) & {}) | (() => string | Component) | (((new (...args: any[]) => (string | Component) & {}) | (() => string | Component)) | null)[], unknown, unknown, () => import('vue').DefineComponent<{}, void, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>, boolean>;
|
|
89
|
+
readonly ellipsisIcon: import('element-plus/es/utils/index.mjs').EpPropFinalized<(new (...args: any[]) => (string | import('vue').Component) & {}) | (() => string | import('vue').Component) | (((new (...args: any[]) => (string | import('vue').Component) & {}) | (() => string | import('vue').Component)) | null)[], unknown, unknown, () => import('vue').DefineComponent<{}, void, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>, boolean>;
|
|
90
90
|
readonly popperEffect: import('element-plus/es/utils/index.mjs').EpPropFinalized<(new (...args: any[]) => string) | (() => import('element-plus').PopperEffect) | (((new (...args: any[]) => string) | (() => import('element-plus').PopperEffect)) | null)[], unknown, unknown, "dark", boolean>;
|
|
91
91
|
readonly popperClass: StringConstructor;
|
|
92
92
|
readonly popperStyle: {
|
|
93
|
-
readonly type:
|
|
93
|
+
readonly type: import('vue').PropType<import('element-plus/es/utils/index.mjs').EpPropMergeType<(new (...args: any[]) => string | import('vue').CSSProperties) | (() => string | import('vue').CSSProperties) | (((new (...args: any[]) => string | import('vue').CSSProperties) | (() => string | import('vue').CSSProperties)) | null)[], unknown, unknown>>;
|
|
94
94
|
readonly required: false;
|
|
95
95
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
96
96
|
__epPropKey: true;
|
|
@@ -102,7 +102,7 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {
|
|
|
102
102
|
onClose?: ((index: string, indexPath: string[]) => any) | undefined;
|
|
103
103
|
onSelect?: ((index: string, indexPath: string[], item: import('element-plus').MenuItemClicked, routerResult?: Promise<void | import('vue-router').NavigationFailure> | undefined) => any) | undefined;
|
|
104
104
|
onOpen?: ((index: string, indexPath: string[]) => any) | undefined;
|
|
105
|
-
}>, () => VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
105
|
+
}>, () => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
106
106
|
[key: string]: any;
|
|
107
107
|
}>, {}, {}, {}, {
|
|
108
108
|
readonly collapse: boolean;
|
|
@@ -116,7 +116,7 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {
|
|
|
116
116
|
readonly menuTrigger: import('element-plus/es/utils/index.mjs').EpPropMergeType<StringConstructor, "click" | "hover", unknown>;
|
|
117
117
|
readonly collapseTransition: import('element-plus/es/utils/index.mjs').EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
118
118
|
readonly popperOffset: number;
|
|
119
|
-
readonly ellipsisIcon: import('element-plus/es/utils/index.mjs').EpPropMergeType<(new (...args: any[]) => (string | Component) & {}) | (() => string | Component) | (((new (...args: any[]) => (string | Component) & {}) | (() => string | Component)) | null)[], unknown, unknown>;
|
|
119
|
+
readonly ellipsisIcon: import('element-plus/es/utils/index.mjs').EpPropMergeType<(new (...args: any[]) => (string | import('vue').Component) & {}) | (() => string | import('vue').Component) | (((new (...args: any[]) => (string | import('vue').Component) & {}) | (() => string | import('vue').Component)) | null)[], unknown, unknown>;
|
|
120
120
|
readonly popperEffect: import('element-plus/es/utils/index.mjs').EpPropMergeType<(new (...args: any[]) => string) | (() => import('element-plus').PopperEffect) | (((new (...args: any[]) => string) | (() => import('element-plus').PopperEffect)) | null)[], unknown, unknown>;
|
|
121
121
|
readonly uniqueOpened: boolean;
|
|
122
122
|
readonly router: boolean;
|
|
@@ -13,7 +13,7 @@ declare function __VLS_template(): {
|
|
|
13
13
|
};
|
|
14
14
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
15
15
|
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
|
|
16
|
-
items: Ref<import('./modal-shelf-types').ShelfItem[]>;
|
|
16
|
+
items: import('vue').Ref<import('./modal-shelf-types').ShelfItem[]>;
|
|
17
17
|
level: ModalLevel;
|
|
18
18
|
evoke: (nsKey: string, component: Component | (() => Promise<Component>), options: {
|
|
19
19
|
payload: Record<string, unknown>;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { ColProps } from 'element-plus';
|
|
2
|
+
import { FormItemConfigList } from '../form';
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
/** 子 FormMain 数据(= 父 item 草稿的嵌套对象,子 in-place 改草稿) */
|
|
5
|
+
data: Record<string, any>;
|
|
6
|
+
/** 子表单配置列表 */
|
|
7
|
+
list: FormItemConfigList;
|
|
8
|
+
layout?: Partial<ColProps>;
|
|
9
|
+
rowGutter?: number;
|
|
10
|
+
submitText?: string;
|
|
11
|
+
cancelText?: string;
|
|
12
|
+
/** 校验通过后的业务提交(helper 内 wire submitFn(草稿) → closeEdit);返回 Promise 自动 loading */
|
|
13
|
+
submit?: () => Promise<unknown> | unknown;
|
|
14
|
+
/** 取消编辑(helper 内 wire closeEdit) */
|
|
15
|
+
cancel?: () => void;
|
|
16
|
+
/** 父 item 代表 span(P3 rebase 算因子用;helper 经 resolveLayoutSpan(layout) 传入) */
|
|
17
|
+
parentSpan?: number;
|
|
18
|
+
/** 是否叠本层嵌套布局 rebase(缺省 true;false = 逆向逃生口,layout 原样直透) */
|
|
19
|
+
rebase?: boolean;
|
|
20
|
+
};
|
|
21
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
22
|
+
submitText: string;
|
|
23
|
+
cancelText: string;
|
|
24
|
+
rebase: boolean;
|
|
25
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
26
|
+
childRef: {
|
|
27
|
+
validate: () => Promise<void>;
|
|
28
|
+
resetFields: () => void;
|
|
29
|
+
clearValidate: (key?: string) => void;
|
|
30
|
+
generate: () => Record<string, any>;
|
|
31
|
+
parse: (stringifyData: import('../form').ExcludeNeverProperties<import('../form').ExtractFormStringifyRawFromObject<Record<string, any>, Record<string, any>>>) => Record<string, any>;
|
|
32
|
+
stringify: () => import('../form').ExcludeNeverProperties<import('../form').ExtractFormStringifyRawFromObject<Record<string, any>, Record<string, any>>>;
|
|
33
|
+
} | null;
|
|
34
|
+
}, any>;
|
|
35
|
+
export default _default;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { PanelItemConfigList } from './types';
|
|
2
|
+
import { ColProps, CardProps } from 'element-plus';
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
/** 子 PanelMain 数据(= 父 item value,嵌套对象) */
|
|
5
|
+
data: Record<string, any>;
|
|
6
|
+
/** 子 PanelMain 配置列表 */
|
|
7
|
+
list: PanelItemConfigList;
|
|
8
|
+
/** 子项是否包 Card,缺省继承 PanelMain 默认 */
|
|
9
|
+
itemCard?: boolean | Partial<CardProps & {
|
|
10
|
+
lastMarginBottom?: string;
|
|
11
|
+
}>;
|
|
12
|
+
layout?: Partial<ColProps>;
|
|
13
|
+
rowGutter?: number;
|
|
14
|
+
/** 父 item 代表 span(P3 rebase 算因子用;helper 经 resolveLayoutSpan(layout) 传入) */
|
|
15
|
+
parentSpan?: number;
|
|
16
|
+
/** 是否叠本层嵌套布局 rebase(缺省 true;false = 逆向逃生口,layout 原样直透) */
|
|
17
|
+
rebase?: boolean;
|
|
18
|
+
};
|
|
19
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
20
|
+
rebase: boolean;
|
|
21
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
22
|
+
export default _default;
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { default as PanelMain } from './PanelMain.vue';
|
|
2
2
|
import { default as PanelItem } from './PanelItem.vue';
|
|
3
3
|
import { default as PanelEditSwitch } from './PanelEditSwitch.vue';
|
|
4
|
+
import { default as PanelItemNestPanel } from './PanelItemNestPanel.vue';
|
|
5
|
+
import { default as PanelItemNestForm } from './PanelItemNestForm.vue';
|
|
4
6
|
export * from './types';
|
|
5
|
-
export
|
|
7
|
+
export * from './nest-panel-item';
|
|
8
|
+
export * from './nest-panel-form';
|
|
9
|
+
export { PanelMain, PanelItem, PanelEditSwitch, PanelItemNestPanel, PanelItemNestForm, };
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { ColProps } from 'element-plus';
|
|
2
|
+
import { PanelItemConfig, PanelScopeBase } from './types';
|
|
3
|
+
import { FormItemConfigList } from '../form';
|
|
4
|
+
export interface NestPanelFormOptions {
|
|
5
|
+
/** 父 item key */
|
|
6
|
+
key: string;
|
|
7
|
+
/** 父 item label */
|
|
8
|
+
label?: string;
|
|
9
|
+
/** 子 FormMain 配置列表(吃嵌套子对象) */
|
|
10
|
+
list: FormItemConfigList;
|
|
11
|
+
/** 父 item 栅格布局 */
|
|
12
|
+
layout?: Partial<ColProps>;
|
|
13
|
+
/** 子表单行间距 */
|
|
14
|
+
rowGutter?: number;
|
|
15
|
+
/** 提交按钮文案 */
|
|
16
|
+
submitText?: string;
|
|
17
|
+
/** 取消按钮文案 */
|
|
18
|
+
cancelText?: string;
|
|
19
|
+
/** 是否可编辑,缺省 true */
|
|
20
|
+
editable?: boolean | ((scope: PanelScopeBase) => boolean);
|
|
21
|
+
/** 单字段提交:校验通过后回流草稿到父数据(panel 既有 submitFn 语义) */
|
|
22
|
+
submitFn: PanelItemConfig["submitFn"];
|
|
23
|
+
/** 只读态展示渲染;缺省走 PanelItem 默认(纯文本 data[key]) */
|
|
24
|
+
render?: PanelItemConfig["render"];
|
|
25
|
+
/** 是否叠本层嵌套布局 rebase(P3,缺省 true;false = 逆向逃生口,子层 layout 原样直透) */
|
|
26
|
+
rebase?: boolean;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* 生成「父 panel item 编辑态内嵌子 FormMain」的 PanelItemConfig(C3 配套 helper)
|
|
30
|
+
* ----
|
|
31
|
+
* 走 editorRender(优先级高于 editorConfig,panel/types.ts L65-77)挂 PanelItemNestForm:
|
|
32
|
+
* - 编辑态:PanelEditSwitch 进编辑时深克隆草稿(scope.data),子 FormMain 绑草稿嵌套对象
|
|
33
|
+
* in-place 编辑(不穿透真实 data,ADR-5 panel 分支);
|
|
34
|
+
* - 提交:组件内 validateChild 通过 → 本 helper wire 的 submit(`submitFn(草稿) → closeEdit`)回流;
|
|
35
|
+
* - 取消:closeEdit 关编辑态,草稿丢弃,下次进编辑重新克隆。
|
|
36
|
+
* editorConfig 与 editorRender 互斥——C3 用 editorRender,同一 item [MUST NOT] 再配 editorConfig。
|
|
37
|
+
*/
|
|
38
|
+
export declare function nestPanelForm(options: NestPanelFormOptions): PanelItemConfig;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { ColProps, CardProps } from 'element-plus';
|
|
2
|
+
import { PanelItemConfig, PanelItemConfigList } from './types';
|
|
3
|
+
export interface NestPanelItemOptions {
|
|
4
|
+
/** 父 item key */
|
|
5
|
+
key: string;
|
|
6
|
+
/** 父 item label */
|
|
7
|
+
label?: string;
|
|
8
|
+
/** 子 PanelMain 配置列表(吃嵌套子对象) */
|
|
9
|
+
list: PanelItemConfigList;
|
|
10
|
+
/** 父 item 栅格布局 */
|
|
11
|
+
layout?: Partial<ColProps>;
|
|
12
|
+
/** 子 PanelMain 子项是否包 Card */
|
|
13
|
+
itemCard?: boolean | Partial<CardProps & {
|
|
14
|
+
lastMarginBottom?: string;
|
|
15
|
+
}>;
|
|
16
|
+
/** 子 PanelMain 行间距 */
|
|
17
|
+
rowGutter?: number;
|
|
18
|
+
/** 是否叠本层嵌套布局 rebase(P3,缺省 true;false = 逆向逃生口,子层 layout 原样直透) */
|
|
19
|
+
rebase?: boolean;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* 生成「父 panel item 内嵌子 PanelMain」的 PanelItemConfig(C2 配套 helper)
|
|
23
|
+
* ----
|
|
24
|
+
* 降低业务方手写 h(PanelItemNestPanel) 噪音:传 key/label/子 list 即得一个满足
|
|
25
|
+
* PanelItemConfig 的纯展示配置项,render 出口挂 PanelItemNestPanel(嵌套对象只读展示)。
|
|
26
|
+
* 值贯通:render scope.value(= data[key] 嵌套对象)作子 PanelMain.data。
|
|
27
|
+
*/
|
|
28
|
+
export declare function nestPanelItem(options: NestPanelItemOptions): PanelItemConfig;
|
|
@@ -63,6 +63,8 @@ export interface PanelMainProps<PO extends Record<string, any> = Record<string,
|
|
|
63
63
|
/** 行水平间距 */
|
|
64
64
|
rowGutter?: number;
|
|
65
65
|
layout?: Partial<ColProps>;
|
|
66
|
+
/** P3 嵌套 rebase 累乘因子(缺省 1 = 顶级行为不变,向后兼容)。由联结薄壳算出后传子 PanelMain */
|
|
67
|
+
layoutScale?: number;
|
|
66
68
|
list: PanelItemConfigList<PO, SO>;
|
|
67
69
|
/** item是否包括Card */
|
|
68
70
|
itemCard?: boolean | Partial<CardProps & {
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { TableMainProps, TableMainInstance, ElTableColumnProps, TablePageInfo } from './types';
|
|
2
2
|
declare const _default: <T extends Record<string, any>, SQ extends Record<string, any>, F extends Record<string, any>>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
3
3
|
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
|
|
4
|
-
readonly onLoadingChange?: ((value: boolean) => any) | undefined;
|
|
5
4
|
readonly "onUpdate:isAutoRefresh"?: ((value: boolean) => any) | undefined;
|
|
5
|
+
readonly onLoadingChange?: ((value: boolean) => any) | undefined;
|
|
6
6
|
readonly "onUpdate:refreshInterval"?: ((value: number) => any) | undefined;
|
|
7
7
|
readonly "onUpdate:customView"?: ((value: boolean) => any) | undefined;
|
|
8
8
|
readonly onPageChange?: ((value: number) => any) | undefined;
|
|
9
9
|
readonly onPageSizeChange?: ((value: number) => any) | undefined;
|
|
10
10
|
readonly onDataChange?: ((data: T[]) => any) | undefined;
|
|
11
11
|
readonly onPageInfoChange?: ((info: TablePageInfo) => any) | undefined;
|
|
12
|
-
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, "
|
|
12
|
+
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, "onUpdate:isAutoRefresh" | "onLoadingChange" | "onUpdate:refreshInterval" | "onUpdate:customView" | "onPageChange" | "onPageSizeChange" | "onDataChange" | "onPageInfoChange"> & ({
|
|
13
13
|
isAutoRefresh?: boolean;
|
|
14
14
|
refreshInterval?: number;
|
|
15
15
|
customView?: boolean;
|
|
@@ -29,7 +29,7 @@ declare const _default: <T extends Record<string, any>, SQ extends Record<string
|
|
|
29
29
|
exposeInfo: TableMainInstance;
|
|
30
30
|
}) => any>> & {
|
|
31
31
|
'custom-view-item'?(_: {
|
|
32
|
-
fieldComponentMap: Record<string, Component>;
|
|
32
|
+
fieldComponentMap: Record<string, import('vue').Component>;
|
|
33
33
|
row: T;
|
|
34
34
|
index: number;
|
|
35
35
|
selected: boolean;
|
|
@@ -5,8 +5,8 @@ export interface ActivatedInfo {
|
|
|
5
5
|
}
|
|
6
6
|
/** 是否激活 */
|
|
7
7
|
export declare const useActivated: (watchFn?: (info: ActivatedInfo) => void) => {
|
|
8
|
-
isActivated:
|
|
9
|
-
activatedInfo:
|
|
8
|
+
isActivated: import('vue').ComputedRef<boolean>;
|
|
9
|
+
activatedInfo: import('vue').ComputedRef<{
|
|
10
10
|
readonly isActivated: boolean;
|
|
11
11
|
readonly triggerType: "mounted" | "activated" | "deactivated" | "unmounted";
|
|
12
12
|
}>;
|
package/types/hooks/index.d.ts
CHANGED
|
@@ -8,8 +8,8 @@ export declare const useMenusDataDispatch: ({ getMenus, getMenuFlatList, getExtr
|
|
|
8
8
|
/** 判断是否提取1级路由模块到HEADER */
|
|
9
9
|
getExtractLevel1ToHeader: () => boolean;
|
|
10
10
|
}) => {
|
|
11
|
-
sidebarMenus:
|
|
12
|
-
headerMenus:
|
|
11
|
+
sidebarMenus: import('vue').ComputedRef<RouteMetaResolveRaw[]>;
|
|
12
|
+
headerMenus: import('vue').ComputedRef<{
|
|
13
13
|
children: never[];
|
|
14
14
|
path: string;
|
|
15
15
|
title: string;
|
|
@@ -26,7 +26,7 @@ export declare const useMenusDataDispatch: ({ getMenus, getMenuFlatList, getExtr
|
|
|
26
26
|
permissionEditShow: boolean;
|
|
27
27
|
needLogin: boolean;
|
|
28
28
|
}[]>;
|
|
29
|
-
activeMenu:
|
|
30
|
-
activeModuleMenu:
|
|
31
|
-
needRedirectToFirstChildMenu:
|
|
29
|
+
activeMenu: import('vue').ComputedRef<RouteMetaResolveRaw | undefined>;
|
|
30
|
+
activeModuleMenu: import('vue').ComputedRef<RouteMetaResolveRaw | undefined>;
|
|
31
|
+
needRedirectToFirstChildMenu: import('vue').ComputedRef<RouteMetaResolveRaw | undefined>;
|
|
32
32
|
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { DeepReadonly } from 'vue';
|
|
2
|
+
import { AppThemeConfig } from '../bridge';
|
|
3
|
+
/** `useAdminThemeApply` 入参。 */
|
|
4
|
+
export interface UseAdminThemeApplyOptions {
|
|
5
|
+
/** 当前风格 config 响应式获取器(= `bridge.APP_THEME_CONFIG`,含 light/dark) */
|
|
6
|
+
getThemeConfig: () => AppThemeConfig | DeepReadonly<AppThemeConfig>;
|
|
7
|
+
/** 是否暗色响应式获取器(= `bridge.themeIsDark.value`) */
|
|
8
|
+
getThemeIsDark: () => boolean;
|
|
9
|
+
/** 注入 document(测试 / SSR);缺省 `globalThis.document`,不存在时静默跳过 */
|
|
10
|
+
document?: Document;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* 启动 core 主题挂值——watch 风格 config 重写 `<style>`、watch 暗色 toggle `<html>.dark`。
|
|
14
|
+
*
|
|
15
|
+
* 在组件 setup(`AppLayout`)内调用以随组件作用域自动停 watch。返回 void。
|
|
16
|
+
*/
|
|
17
|
+
export declare function useAdminThemeApply(options: UseAdminThemeApplyOptions): void;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { DeepReadonly } from 'vue';
|
|
2
|
+
import { AppLayoutViewportConfig } from '../bridge';
|
|
3
|
+
/** `useAdminViewportApply` 入参。 */
|
|
4
|
+
export interface UseAdminViewportApplyOptions {
|
|
5
|
+
/** viewport 边框配置响应式获取器(= `bridge.APP_LAYOUT_VIEWPORT_CONFIG`) */
|
|
6
|
+
getViewportConfig: () => AppLayoutViewportConfig | DeepReadonly<AppLayoutViewportConfig>;
|
|
7
|
+
/** 注入 document(测试 / SSR);缺省 `globalThis.document`,不存在时静默跳过 */
|
|
8
|
+
document?: Document;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* 启动 viewport CSS var 挂值——watch viewport config 重写 `<style>`。
|
|
12
|
+
*
|
|
13
|
+
* 在组件 setup(`AppLayout`)内调用以随组件作用域自动停 watch。返回 void。
|
|
14
|
+
*/
|
|
15
|
+
export declare function useAdminViewportApply(options: UseAdminViewportApplyOptions): void;
|
package/types/inject/key.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import { InjectionKey } from 'vue';
|
|
1
|
+
import { InjectionKey, Ref } from 'vue';
|
|
2
|
+
import { AdminBridge } from '../bridge';
|
|
2
3
|
import { ModalLevel, ShelfController } from '../components/modal';
|
|
3
4
|
import { AppLayoutAppStoreSlice, AppLayoutUserStoreSlice, AppLayoutBridgeSlice } from '../components/app-layout';
|
|
5
|
+
import { NestFormExposeMap } from '../components/form';
|
|
4
6
|
/**
|
|
5
7
|
* body 视口高度
|
|
6
8
|
* ---
|
|
@@ -52,3 +54,46 @@ export declare const APP_LAYOUT_USER_STORE_KEY: InjectionKey<AppLayoutUserStoreS
|
|
|
52
54
|
* Symbol.for 保证跨包同一性(同 APP_LAYOUT_APP_STORE_KEY / APP_LAYOUT_USER_STORE_KEY)。
|
|
53
55
|
*/
|
|
54
56
|
export declare const APP_LAYOUT_BRIDGE_KEY: InjectionKey<AppLayoutBridgeSlice>;
|
|
57
|
+
/**
|
|
58
|
+
* 整 admin bridge app 级注入 key(#插件系统一期挂载)。
|
|
59
|
+
* ---
|
|
60
|
+
* `bridge.install(app)`(即 `app.use(bridge)`)经 `app.provide(ADMIN_BRIDGE_KEY, bridge)`
|
|
61
|
+
* 把**整个 bridge 实例**注入应用级 provide 链;任意后代组件经 `inject(ADMIN_BRIDGE_KEY)`
|
|
62
|
+
* 取整 bridge(含 7 响应式只读配置视图 + `update` + 全部 auth/api/派生方法)。
|
|
63
|
+
* ---
|
|
64
|
+
* **opt-in**:仅当 app 显式 `app.use(bridge)` 时注入;未 use 则 `inject(ADMIN_BRIDGE_KEY)`
|
|
65
|
+
* 返回 `undefined`(不报错)。
|
|
66
|
+
* ---
|
|
67
|
+
* **区别于 `APP_LAYOUT_BRIDGE_KEY`**:后者是 AppLayout 族**组件级**窄切片(`AppLayoutBridgeSlice`
|
|
68
|
+
* Pick 子集,由 AppLayout 从 `props.adminBridge` 接收后 provide,供 layout 子组件 inject),
|
|
69
|
+
* 两 KEY 各管各、并存——本 KEY 注入的是 app 级**整 bridge**,非 layout 窄切片。
|
|
70
|
+
* ---
|
|
71
|
+
* Symbol.for 保证跨包/跨 chunk/跨 ESM 实例唯一(同 APP_LAYOUT_BRIDGE_KEY,规则 8)。
|
|
72
|
+
*/
|
|
73
|
+
export declare const ADMIN_BRIDGE_KEY: InjectionKey<AdminBridge>;
|
|
74
|
+
/**
|
|
75
|
+
* 嵌套子 FormMain exposeMap inject key(配置化嵌套联结组件 Nest 三件套挂载)。
|
|
76
|
+
* ---
|
|
77
|
+
* 每个 FormMain `provide` 一份本 key 的空 exposeMap(shallowReactive,按 item key 索引),
|
|
78
|
+
* 供其后代联结组件(FormItemNestForm)`inject` 到**最近祖先** FormMain 的 map 并把子
|
|
79
|
+
* FormMain 的级联 expose 写入(key = 自身 item key);FormMain 的 validate/clearValidate/
|
|
80
|
+
* resetFields 遍历自身 map 级联子表单。
|
|
81
|
+
* ---
|
|
82
|
+
* provide/inject 链天然实现「只挂最近祖先」(inject 向上解析至最近 provide)。
|
|
83
|
+
* 注册由联结组件显式触发(非裸嵌套 FormMain 自动注册)→ 旧用法零回归(additive)。
|
|
84
|
+
* ---
|
|
85
|
+
* Symbol.for 保证跨包/跨 chunk/跨 ESM 实例唯一(规则 8,同上)。
|
|
86
|
+
*/
|
|
87
|
+
export declare const FORM_NEST_REGISTRY_KEY: InjectionKey<NestFormExposeMap>;
|
|
88
|
+
/**
|
|
89
|
+
* 嵌套布局 rebase 累乘因子 inject key(P3 嵌套布局 rebase 挂载)。
|
|
90
|
+
* ---
|
|
91
|
+
* 每个 FormMain / PanelMain `provide` 自身 `layoutScale`(缺省 1)的响应式只读引用;
|
|
92
|
+
* 其后代联结组件(FormItemNestForm / FormItemNestFormList / PanelItemNestPanel /
|
|
93
|
+
* PanelItemNestForm)`inject` 到**最近祖先**的 scale,叠本层因子
|
|
94
|
+
* `childScale = parentScale × (24 / parentItemSpan)` 后作 `layoutScale` 传子 Form/PanelMain。
|
|
95
|
+
* ---
|
|
96
|
+
* 顶级 FormMain/PanelMain 未嵌套时 provide 1 → 子层缺省行为不变(向后兼容)。
|
|
97
|
+
* Symbol.for 保证跨包/跨 chunk/跨 ESM 实例唯一(规则 8,同上)。
|
|
98
|
+
*/
|
|
99
|
+
export declare const NEST_LAYOUT_SCALE_KEY: InjectionKey<Readonly<Ref<number>>>;
|