@done-coding/admin-core 0.19.0 → 0.20.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 (55) hide show
  1. package/es/components/display/TabsTile.vue.mjs +1 -1
  2. package/es/components/list-layout/ListLayout.vue.mjs +7 -0
  3. package/es/components/{list-page/ListPage.vue2.mjs → list-layout/ListLayout.vue2.mjs} +16 -16
  4. package/es/components/{list-page/use-sticky.mjs → list-layout/use-list-layout-sticky.mjs} +2 -2
  5. package/es/components/misc/AutoRefreshGroup.vue.mjs +1 -1
  6. package/es/components/misc/AutoRefreshGroup.vue2.mjs +2 -1
  7. package/es/components/modal/ModalConfirm.vue.mjs +1 -1
  8. package/es/components/panel/PanelMain.vue.mjs +1 -1
  9. package/es/components/panel/PanelMain.vue2.mjs +2 -2
  10. package/es/components/table/TableMain.vue.mjs +1 -1
  11. package/es/components/table/TableMain.vue2.mjs +1 -1
  12. package/es/components/view-layout/ViewLayout.vue.mjs +7 -0
  13. package/es/components/view-layout/ViewLayout.vue2.mjs +117 -0
  14. package/es/helpers/list-helper.mjs +1 -1
  15. package/es/index.mjs +17 -14
  16. package/es/style.css +49 -31
  17. package/package.json +2 -2
  18. package/src/components/README.md +8 -7
  19. package/src/components/app-layout/README.md +1 -1
  20. package/src/components/app-layout/docs/README-AppPage.md +3 -3
  21. package/src/components/data-view/README.md +1 -1
  22. package/src/components/data-view/docs/README-DataListView.md +2 -2
  23. package/src/components/display/docs/README-ActionBtnGroup.md +1 -1
  24. package/src/components/display/docs/README-HeightProvider.md +2 -2
  25. package/src/components/display/docs/README-TabsMain.md +1 -1
  26. package/src/components/display/docs/README-WatchSize.md +1 -1
  27. package/src/components/form/docs/README-FormSearch.md +6 -6
  28. package/src/components/list-layout/README.md +16 -0
  29. package/src/components/{list-page/docs/README-ListPage.md → list-layout/docs/README-ListLayout.md} +18 -17
  30. package/src/components/misc/docs/README-AutoRefreshGroup.md +1 -1
  31. package/src/components/modal/docs/README-ModalDetail.md +5 -5
  32. package/src/components/modal/docs/README-ModalPorter.md +1 -1
  33. package/src/components/panel/README.md +1 -1
  34. package/src/components/panel/docs/README-PanelMain.md +5 -5
  35. package/src/components/slot-layout/docs/README-SlotLayoutFlowAside.md +3 -3
  36. package/src/components/table/docs/README-TableMain.md +4 -4
  37. package/src/components/view-layout/README.md +11 -0
  38. package/src/components/view-layout/docs/README-ViewLayout.md +81 -0
  39. package/types/components/app-layout/app-page-geometry.d.ts +1 -1
  40. package/types/components/form/types.d.ts +1 -1
  41. package/types/components/{list-page/ListPage.vue.d.ts → list-layout/ListLayout.vue.d.ts} +6 -6
  42. package/types/components/list-layout/index.d.ts +5 -0
  43. package/types/components/{list-page → list-layout}/types.d.ts +13 -7
  44. package/types/components/{list-page/use-sticky.d.ts → list-layout/use-list-layout-sticky.d.ts} +10 -10
  45. package/types/components/table/types.d.ts +1 -1
  46. package/types/components/view-layout/ViewLayout.vue.d.ts +19 -0
  47. package/types/components/view-layout/index.d.ts +2 -0
  48. package/types/components/view-layout/types.d.ts +36 -0
  49. package/types/helpers/list-helper.d.ts +1 -1
  50. package/types/index.d.ts +2 -1
  51. package/types/inject/key.d.ts +2 -2
  52. package/types/injectInfo.json.d.ts +1 -1
  53. package/es/components/list-page/ListPage.vue.mjs +0 -7
  54. package/src/components/list-page/README.md +0 -16
  55. package/types/components/list-page/index.d.ts +0 -3
@@ -170,7 +170,7 @@ export interface FormMainProps<PO extends Record<string, any>, SO extends Record
170
170
  * 仍生效致单行挤爆。开启后以 FormMain 根自身宽(= 直接父容器内容宽)定档,
171
171
  * 把响应式配置解析成该档**定值 span**(剥除断点键,window 媒体查询不再参与)。
172
172
  * FormSearch 同名 prop 会把折叠几何引擎断点源一并切到容器档(两引擎同源),
173
- * 并透传本 prop 给内部 FormMain;ListPage 经 `formSearchProps` 透传。
173
+ * 并透传本 prop 给内部 FormMain;ListLayout 经 `formSearchProps` 透传。
174
174
  * 嵌套子表单(FormNest 等联结组件)是独立 FormMain 实例,需各自开启。
175
175
  */
176
176
  layoutByContainer?: boolean;
@@ -1,6 +1,6 @@
1
1
  import { FormItemConfigList, FormScope, FormSearchSearchType } from '../form';
2
2
  import { TableColumnDefaultScope, TableColumnHeaderScope, TablePageInfo } from '../table';
3
- import { ListPageInnerInjectInfo, ListPageInstance } from './types';
3
+ import { ListLayoutInnerInjectInfo, ListLayoutInstance } from './types';
4
4
  import { VNode } from 'vue';
5
5
  import { DataListViewItemScope } from '../data-view';
6
6
  declare const _default: <T extends Record<string, any>, PO extends Record<string, any>, SO 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<{
@@ -16,8 +16,8 @@ declare const _default: <T extends Record<string, any>, PO extends Record<string
16
16
  customView?: boolean;
17
17
  } & Partial<Pick<import('../form').FormSearchProps<PO, SO, {}>, "staticQuery">> & {
18
18
  formSearchProps?: Partial<Omit<import('../form').FormSearchProps<PO, SO, {}>, "staticQuery" | "compact" | "list">> | undefined;
19
- } & Pick<import('../table').TableMainProps<T, import('../form').ExcludeNeverProperties<import('../form').ExtractFormStringifyRawFromObject<PO, SO>> & SQ, ListPageInnerInjectInfo<PO, F>>, import('./types').TableMainRequiredKey> & Partial<Pick<import('../table').TableMainProps<T, import('../form').ExcludeNeverProperties<import('../form').ExtractFormStringifyRawFromObject<PO, SO>> & SQ, ListPageInnerInjectInfo<PO, F>>, import('./types').TableMainOptionsKey>> & {
20
- tableMainProps?: Partial<Omit<import('../table').TableMainProps<T, import('../form').ExcludeNeverProperties<import('../form').ExtractFormStringifyRawFromObject<PO, SO>> & SQ, ListPageInnerInjectInfo<PO, F>>, import('./types').TableMainOptionsKey | import('./types').TableMainRewriteKey>> | undefined;
19
+ } & Pick<import('../table').TableMainProps<T, import('../form').ExcludeNeverProperties<import('../form').ExtractFormStringifyRawFromObject<PO, SO>> & SQ, ListLayoutInnerInjectInfo<PO, F>>, import('./types').TableMainRequiredKey> & Partial<Pick<import('../table').TableMainProps<T, import('../form').ExcludeNeverProperties<import('../form').ExtractFormStringifyRawFromObject<PO, SO>> & SQ, ListLayoutInnerInjectInfo<PO, F>>, import('./types').TableMainOptionsKey>> & {
20
+ tableMainProps?: Partial<Omit<import('../table').TableMainProps<T, import('../form').ExcludeNeverProperties<import('../form').ExtractFormStringifyRawFromObject<PO, SO>> & SQ, ListLayoutInnerInjectInfo<PO, F>>, import('./types').TableMainOptionsKey | import('./types').TableMainRewriteKey>> | undefined;
21
21
  } & {
22
22
  list?: FormItemConfigList<PO, SO> | undefined;
23
23
  api: (params: import('../table').TableApiParams<import('../form').ExcludeNeverProperties<import('../form').ExtractFormStringifyRawFromObject<PO, SO>> & SQ>) => Promise<import('../table').TableApiResult<T>>;
@@ -33,7 +33,7 @@ declare const _default: <T extends Record<string, any>, PO extends Record<string
33
33
  headerObserveResize?: boolean;
34
34
  operationObserveResize?: boolean;
35
35
  }) & Partial<{}>> & import('vue').PublicProps;
36
- expose(exposed: import('vue').ShallowUnwrapRef<ListPageInstance<PO, Record<string, any>>>): void;
36
+ expose(exposed: import('vue').ShallowUnwrapRef<ListLayoutInstance<PO, Record<string, any>>>): void;
37
37
  attrs: any;
38
38
  slots: Readonly<{
39
39
  /** 头部插槽(无 scope) */
@@ -42,7 +42,7 @@ declare const _default: <T extends Record<string, any>, PO extends Record<string
42
42
  operation?: () => VNode[];
43
43
  /** 自定义视图项插槽 */
44
44
  "custom-view-item"?: (scope: DataListViewItemScope<T>) => VNode[];
45
- } & { [K in `form-${Extract<keyof PO, string>}`]?: ((scope: FormScope<PO, SO, Extract<keyof PO, string>, any, any>) => VNode[]) | undefined; } & { [K_1 in `table-${Uppercase<string>}` | `table-${Exclude<Extract<keyof T, string>, "item" | "custom-view-item"> & {}}`]?: ((scope: TableColumnDefaultScope<T, ListPageInnerInjectInfo<PO, F>>) => VNode[]) | undefined; } & { [K_2 in `table-header-${Uppercase<string>}` | `table-header-${Exclude<Extract<keyof T, string>, "item" | "custom-view-item"> & {}}`]?: ((scope: TableColumnHeaderScope<T, ListPageInnerInjectInfo<PO, F>> & {
45
+ } & { [K in `form-${Extract<keyof PO, string>}`]?: ((scope: FormScope<PO, SO, Extract<keyof PO, string>, any, any>) => VNode[]) | undefined; } & { [K_1 in `table-${Uppercase<string>}` | `table-${Exclude<Extract<keyof T, string>, "item" | "custom-view-item"> & {}}`]?: ((scope: TableColumnDefaultScope<T, ListLayoutInnerInjectInfo<PO, F>>) => VNode[]) | undefined; } & { [K_2 in `table-header-${Uppercase<string>}` | `table-header-${Exclude<Extract<keyof T, string>, "item" | "custom-view-item"> & {}}`]?: ((scope: TableColumnHeaderScope<T, ListLayoutInnerInjectInfo<PO, F>> & {
46
46
  searchFormData: PO;
47
47
  triggerSearch: (() => void) | undefined;
48
48
  }) => VNode[]) | undefined; }> & {
@@ -52,7 +52,7 @@ declare const _default: <T extends Record<string, any>, PO extends Record<string
52
52
  operation?: () => VNode[];
53
53
  /** 自定义视图项插槽 */
54
54
  "custom-view-item"?: (scope: DataListViewItemScope<T>) => VNode[];
55
- } & { [K in `form-${Extract<keyof PO, string>}`]?: ((scope: FormScope<PO, SO, Extract<keyof PO, string>, any, any>) => VNode[]) | undefined; } & { [K_1 in `table-${Uppercase<string>}` | `table-${Exclude<Extract<keyof T, string>, "item" | "custom-view-item"> & {}}`]?: ((scope: TableColumnDefaultScope<T, ListPageInnerInjectInfo<PO, F>>) => VNode[]) | undefined; } & { [K_2 in `table-header-${Uppercase<string>}` | `table-header-${Exclude<Extract<keyof T, string>, "item" | "custom-view-item"> & {}}`]?: ((scope: TableColumnHeaderScope<T, ListPageInnerInjectInfo<PO, F>> & {
55
+ } & { [K in `form-${Extract<keyof PO, string>}`]?: ((scope: FormScope<PO, SO, Extract<keyof PO, string>, any, any>) => VNode[]) | undefined; } & { [K_1 in `table-${Uppercase<string>}` | `table-${Exclude<Extract<keyof T, string>, "item" | "custom-view-item"> & {}}`]?: ((scope: TableColumnDefaultScope<T, ListLayoutInnerInjectInfo<PO, F>>) => VNode[]) | undefined; } & { [K_2 in `table-header-${Uppercase<string>}` | `table-header-${Exclude<Extract<keyof T, string>, "item" | "custom-view-item"> & {}}`]?: ((scope: TableColumnHeaderScope<T, ListLayoutInnerInjectInfo<PO, F>> & {
56
56
  searchFormData: PO;
57
57
  triggerSearch: (() => void) | undefined;
58
58
  }) => VNode[]) | undefined; };
@@ -0,0 +1,5 @@
1
+ import { default as ListLayout } from './ListLayout.vue';
2
+ export * from './types';
3
+ export { ListLayout };
4
+ /** @deprecated 改用 `ListLayout`(list-page → list-layout 换名) */
5
+ export { ListLayout as ListPage };
@@ -6,10 +6,10 @@ export type FormSearchRewriteKey = "list";
6
6
  export type TableMainOptionsKey = "refine" | "refineReduceHeight" | "viewportHeight" | "parentChannel" | "toolbar" | "showSwitchView";
7
7
  export type TableMainRequiredKey = "columns" | "rowKey";
8
8
  export type TableMainRewriteKey = "api" | "query" | "injectInfo";
9
- export type ListPageInnerInjectInfo<PO extends Record<string, any>,
9
+ export type ListLayoutInnerInjectInfo<PO extends Record<string, any>,
10
10
  /** 期望注入到表格列插槽上的额外内容 */
11
- F extends Record<string, any>> = Pick<ListPageInstance<PO>, "triggerReset" | "triggerSearch" | "update"> & F;
12
- export type ListPageProps<
11
+ F extends Record<string, any>> = Pick<ListLayoutInstance<PO>, "triggerReset" | "triggerSearch" | "update"> & F;
12
+ export type ListLayoutProps<
13
13
  /** 行数据结构 */
14
14
  T extends Record<string, any>,
15
15
  /** 表单标准结构模型 */
@@ -21,8 +21,8 @@ SQ extends Record<string, any>,
21
21
  /** 期望注入到表格列插槽上的额外内容 */
22
22
  F extends Record<string, any>> = Partial<Pick<FormSearchProps<PO, SO, {}>, FormSearchOptionsKey>> & {
23
23
  formSearchProps?: Partial<Omit<FormSearchProps<PO, SO, {}>, FormSearchOptionsKey | FormSearchRewriteKey | "compact">>;
24
- } & Pick<TableMainProps<T, ExtractFormStringifyFromObject<PO, SO> & SQ, ListPageInnerInjectInfo<PO, F>>, TableMainRequiredKey> & Partial<Pick<TableMainProps<T, ExtractFormStringifyFromObject<PO, SO> & SQ, ListPageInnerInjectInfo<PO, F>>, TableMainOptionsKey>> & {
25
- tableMainProps?: Partial<Omit<TableMainProps<T, ExtractFormStringifyFromObject<PO, SO> & SQ, ListPageInnerInjectInfo<PO, F>>, TableMainOptionsKey | TableMainOptionsKey | TableMainRewriteKey>>;
24
+ } & Pick<TableMainProps<T, ExtractFormStringifyFromObject<PO, SO> & SQ, ListLayoutInnerInjectInfo<PO, F>>, TableMainRequiredKey> & Partial<Pick<TableMainProps<T, ExtractFormStringifyFromObject<PO, SO> & SQ, ListLayoutInnerInjectInfo<PO, F>>, TableMainOptionsKey>> & {
25
+ tableMainProps?: Partial<Omit<TableMainProps<T, ExtractFormStringifyFromObject<PO, SO> & SQ, ListLayoutInnerInjectInfo<PO, F>>, TableMainOptionsKey | TableMainOptionsKey | TableMainRewriteKey>>;
26
26
  } & {
27
27
  list?: FormItemConfigList<PO, SO>;
28
28
  /** api */
@@ -42,7 +42,7 @@ F extends Record<string, any>> = Partial<Pick<FormSearchProps<PO, SO, {}>, FormS
42
42
  separateSearch?: boolean;
43
43
  /**
44
44
  * 分离侧栏布局配置(透传 SlotLayoutFlowAside 的 type/gap/asideWidth)。
45
- * asideMaxHeight 不在此列——由 ListPage 内部按 viewport 高度消化后自动提供。
45
+ * asideMaxHeight 不在此列——由 ListLayout 内部按 viewport 高度消化后自动提供。
46
46
  */
47
47
  separateSearchConfig?: Pick<SlotLayoutFlowAsideProps, "type" | "gap" | "asideWidth">;
48
48
  /**
@@ -73,8 +73,14 @@ F extends Record<string, any>> = Partial<Pick<FormSearchProps<PO, SO, {}>, FormS
73
73
  /** operation 插槽量高是否启用 ResizeObserver(语义同 headerObserveResize,默认 false)。 */
74
74
  operationObserveResize?: boolean;
75
75
  };
76
- export interface ListPageInstance<PO extends Record<string, any> = Record<string, any>, SO extends Record<string, any> = Record<string, any>> extends FormSearchInstance<PO, SO>, TableMainInstance {
76
+ export interface ListLayoutInstance<PO extends Record<string, any> = Record<string, any>, SO extends Record<string, any> = Record<string, any>> extends FormSearchInstance<PO, SO>, TableMainInstance {
77
77
  /** 更新表单数据 */
78
78
  update: (key: Extract<keyof PO, string>, value: any) => void;
79
79
  }
80
80
  export type ListApiParams<L, SQ extends Record<string, any>> = TableApiParams<ExtractFormStringifyFromList<L> & SQ>;
81
+ /** @deprecated 改用 {@link ListLayoutProps}(list-page → list-layout 换名);老名保留兼容 */
82
+ export type ListPageProps<T extends Record<string, any>, PO extends Record<string, any>, SO extends Record<string, any>, SQ extends Record<string, any>, F extends Record<string, any>> = ListLayoutProps<T, PO, SO, SQ, F>;
83
+ /** @deprecated 改用 {@link ListLayoutInstance}(list-page → list-layout 换名);老名保留兼容 */
84
+ export type ListPageInstance<PO extends Record<string, any> = Record<string, any>, SO extends Record<string, any> = Record<string, any>> = ListLayoutInstance<PO, SO>;
85
+ /** @deprecated 改用 {@link ListLayoutInnerInjectInfo}(list-page → list-layout 换名);老名保留兼容 */
86
+ export type ListPageInnerInjectInfo<PO extends Record<string, any>, F extends Record<string, any>> = ListLayoutInnerInjectInfo<PO, F>;
@@ -1,9 +1,9 @@
1
1
  import { ComponentPublicInstance, ComputedRef, ShallowRef } from 'vue';
2
2
  /**
3
- * useListPageSticky 入参——吸附功能对主体 setup 的全部接线点(getter 保留响应式)。
3
+ * useListLayoutSticky 入参——吸附功能对主体 setup 的全部接线点(getter 保留响应式)。
4
4
  * 只读不写:吸附是主体状态的纯下游,删除功能不影响任何主体逻辑。
5
5
  */
6
- export interface UseListPageStickyOptions {
6
+ export interface UseListLayoutStickyOptions {
7
7
  /** searchSticky prop:搜索区粘顶开关 */
8
8
  searchSticky: () => boolean;
9
9
  /** toolbarSticky prop:表格 toolbar 悬浮开关 */
@@ -17,15 +17,15 @@ export interface UseListPageStickyOptions {
17
17
  /** 搜索区显隐(主体状态) */
18
18
  showSearch: () => boolean;
19
19
  }
20
- /** useListPageSticky 返回——模板类绑定 + scoped 样式 v-bind 的全部吸附输出 */
21
- export interface UseListPageStickyReturn {
22
- /** ListPage 根(SlotLayoutFlowAside 根 div)模板 ref——粘性滚动语境的探测锚点 */
20
+ /** useListLayoutSticky 返回——模板类绑定 + scoped 样式 v-bind 的全部吸附输出 */
21
+ export interface UseListLayoutStickyReturn {
22
+ /** ListLayout 根(SlotLayoutFlowAside 根 div)模板 ref——粘性滚动语境的探测锚点 */
23
23
  layoutRoot: ShallowRef<ComponentPublicInstance | undefined>;
24
- /** 搜索区粘顶生效态(根条件类 list-page_search-sticky) */
24
+ /** 搜索区粘顶生效态(根条件类 list-layout_search-sticky) */
25
25
  searchStickyActive: ComputedRef<boolean>;
26
- /** toolbar 悬浮生效态(根条件类 list-page_toolbar-sticky) */
26
+ /** toolbar 悬浮生效态(根条件类 list-layout_toolbar-sticky) */
27
27
  toolbarStickyActive: ComputedRef<boolean>;
28
- /** 分页器底吸生效态(根条件类 list-page_pager-sticky) */
28
+ /** 分页器底吸生效态(根条件类 list-layout_pager-sticky) */
29
29
  pagerStickyActive: ComputedRef<boolean>;
30
30
  /** 搜索区粘住顶距(喂 scoped 样式 v-bind) */
31
31
  searchStickyTop: ComputedRef<string>;
@@ -35,8 +35,8 @@ export interface UseListPageStickyReturn {
35
35
  pagerStickyBottom: ComputedRef<string>;
36
36
  }
37
37
  /**
38
- * ListPage 吸附三件套(searchSticky 粘顶 / toolbarSticky 悬浮 / pagerSticky 底吸)
38
+ * ListLayout 吸附三件套(searchSticky 粘顶 / toolbarSticky 悬浮 / pagerSticky 底吸)
39
39
  * 专属 composable——服务吸附的探测 / computed / 生命周期全收于此,主体 setup 只留
40
40
  * 一行委托;后续删除该功能 = 删本文件 + 组件内委托行 + 模板类绑定与对应样式块,分界明确。
41
41
  */
42
- export declare function useListPageSticky(options: UseListPageStickyOptions): UseListPageStickyReturn;
42
+ export declare function useListLayoutSticky(options: UseListLayoutStickyOptions): UseListLayoutStickyReturn;
@@ -227,7 +227,7 @@ F extends Record<string, any>> {
227
227
  dataViewMaxHeightMinValue?: number;
228
228
  /**
229
229
  * 冷启(首次无数据)加载时展示骨架屏,默认 true。
230
- * 热刷(已有数据再加载)不出骨架——由外层遮罩(如 ListPage v-loading)盖旧数据负责。
230
+ * 热刷(已有数据再加载)不出骨架——由外层遮罩(如 ListLayout v-loading)盖旧数据负责。
231
231
  */
232
232
  skeleton?: boolean;
233
233
  /** 骨架行数(table)/ 卡片数(grid),缺省按可用高度自适应(3~8) */
@@ -0,0 +1,19 @@
1
+ import { VNode } from 'vue';
2
+ import { ViewLayoutProps, ViewLayoutScope } from './types';
3
+ declare const _default: <P extends Record<string, any> = Record<string, any>, R = 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<{
4
+ props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, never> & ViewLayoutProps<P, R> & Partial<{}>> & import('vue').PublicProps;
5
+ expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
6
+ attrs: any;
7
+ slots: Readonly<{
8
+ default: (scope: ViewLayoutScope<R>) => VNode[];
9
+ }> & {
10
+ default: (scope: ViewLayoutScope<R>) => VNode[];
11
+ };
12
+ emit: {};
13
+ }>) => import('vue').VNode & {
14
+ __ctx?: Awaited<typeof __VLS_setup>;
15
+ };
16
+ export default _default;
17
+ type __VLS_PrettifyLocal<T> = {
18
+ [K in keyof T]: T[K];
19
+ } & {};
@@ -0,0 +1,2 @@
1
+ export { default as ViewLayout } from './ViewLayout.vue';
2
+ export * from './types';
@@ -0,0 +1,36 @@
1
+ /**
2
+ * ViewLayout 默认插槽 scope(注入给插槽内容的数据与操作句柄)
3
+ */
4
+ export interface ViewLayoutScope<R = any> {
5
+ /** 当前拉取的数据(首次拉取完成前为 undefined) */
6
+ data: R | undefined;
7
+ /** 是否拉取进行中 */
8
+ loading: boolean;
9
+ /** 手动刷新(等价于右上角 AutoRefreshGroup 的刷新按钮,触发一次 api 拉取) */
10
+ refresh: () => Promise<void>;
11
+ /** 内容区可用高度(refine 时 = 视口高 − toolbar reserve,超高内滚的 max-height 预算);自然流 undefined */
12
+ viewportHeight: number | undefined;
13
+ }
14
+ /**
15
+ * ViewLayout 展示布局 props
16
+ */
17
+ export interface ViewLayoutProps<P = Record<string, any>, R = any> {
18
+ /** 数据拉取函数:params 来自 props.params(未传则收 undefined),每次拉取(激活 / 手动刷新 / 自动刷新)传入 */
19
+ api: (params?: P) => Promise<R>;
20
+ /** 拉取参数;响应式变化不自动重拉(需要时调 scope.refresh()) */
21
+ params?: P;
22
+ /** 精细流:默认 true——包 HeightProvider 精确扣 toolbar reserve,内容区可用高(slot scope viewportHeight + 容器 max-height);false=自然流(无高度预算,内容按自身尺寸) */
23
+ refine?: boolean;
24
+ /** 显式视口高,优先级最高;未传降级 inject SCOPE_VIEWPORT_MAX_HEIGHT scope 链 */
25
+ viewportHeight?: number;
26
+ /** 作为父时的 scope 标识(进 SCOPE_VIEWPORT_MAX_HEIGHT 对象链)。⚠️ 与 parentChannel 均 [MUST NOT] 响应式变更(setup 期快照);且仅 refine=true 路径生效 */
27
+ channel?: string;
28
+ /** 作为子时定向消费的祖先 scope 标识(沿对象链 parent 找匹配) */
29
+ parentChannel?: string;
30
+ /** 内容区可用高兜底下限(px) */
31
+ minHeight?: number;
32
+ /** 是否显示自动刷新开关(默认 true) */
33
+ showAutoRefresh?: boolean;
34
+ /** 是否显示手动刷新按钮(默认 true) */
35
+ showRefresh?: boolean;
36
+ }
@@ -1,6 +1,6 @@
1
1
  import { TableApiParams, TableApiResult } from '../components/table/types';
2
2
  export interface FetchListAllOptions {
3
- /** 单页大小,默认 200,范围 [1, 1000] */
3
+ /** 单页大小,默认 100,范围 [1, 1000] */
4
4
  pageSize?: number;
5
5
  /** 累计抓取上限,默认 10000;totalRecord > limit 则 throw */
6
6
  limit?: number;
package/types/index.d.ts CHANGED
@@ -4,10 +4,11 @@ export * from './components/display';
4
4
  export * from './components/misc';
5
5
  export * from './components/modal';
6
6
  export * from './components/table';
7
- export * from './components/list-page';
7
+ export * from './components/list-layout';
8
8
  export * from './components/panel';
9
9
  export * from './components/app-layout';
10
10
  export * from './components/slot-layout';
11
+ export * from './components/view-layout';
11
12
  export * from './router';
12
13
  export * from './utils';
13
14
  export * from './hooks';
@@ -7,7 +7,7 @@ import { NestFormExposeMap } from '../components/form';
7
7
  * body 视口高度
8
8
  * ---
9
9
  * AppBody(留 app)通过 provide 写入;
10
- * TableMain / ListPage / Page1(核内或核外消费方)通过 inject 读取;
10
+ * TableMain / ListLayout / Page1(核内或核外消费方)通过 inject 读取;
11
11
  * ---
12
12
  * **只读契约**:值类型 `Readonly<Ref<number>>`——几何真相只许 owner(AppBody 量测 /
13
13
  * AppPage 扣槽重 provide)写,后代只读(provide 侧 `readonly()`/`computed` 包装,写 = dev warn +
@@ -107,7 +107,7 @@ export declare const BODY_CONTENT_VIEWPORT_INSET: InjectionKey<ComputedRef<{
107
107
  * ---
108
108
  * 注:**有界容器"可用高度"不走此 key**——AppPage 把可用高扣四槽后重 provide
109
109
  * `SCOPE_VIEWPORT_MAX_HEIGHT`(+ 老 key 并列,见 AppPage),故 `useChannelViewportHeight`
110
- * 的所有消费方(ListPage / TableMain / TabsRefineFlow / TabsTile refine)在 AppPage 内
110
+ * 的所有消费方(ListLayout / TableMain / TabsRefineFlow / TabsTile refine)在 AppPage 内
111
111
  * **自动**拿到扣槽后的高,无需逐个改。
112
112
  * ---
113
113
  * Symbol.for 全局注册表保证跨包/跨 chunk/跨 ESM 实例唯一(同 BODY_CONTENT_VIEWPORT_HEIGHT,规则 8)。
@@ -1,6 +1,6 @@
1
1
  declare const _default: {
2
2
  "name": "@done-coding/admin-core",
3
- "version": "0.19.0",
3
+ "version": "0.20.0",
4
4
  "description": "内部前端库"
5
5
  };
6
6
 
@@ -1,7 +0,0 @@
1
- import _sfc_main from "./ListPage.vue2.mjs";
2
- /* empty css */
3
- import _export_sfc from "../../_virtual/_plugin-vue_export-helper.mjs";
4
- const ListPage = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-1ae6f01e"]]);
5
- export {
6
- ListPage as default
7
- };
@@ -1,16 +0,0 @@
1
- # list-page 列表族
2
-
3
- 单组件族:`ListPage` =「FormSearch + TableMain」组合页,一个组件承接搜索、列表、分页、工具栏、粘性吸附全链路;双子 props 扁平化 + 常用项提升直属。
4
-
5
- ## 组件文档(docs/)
6
-
7
- - [ListPage](./docs/README-ListPage.md) — 列表页(表单侧 / 表格侧双子配置 + injectInfo 注入 + 三件套粘性)
8
-
9
- ## 关键类型
10
-
11
- - `ListPageProps` / `ListPageInstance`(= FormSearchInstance + TableMainInstance + update)/ `ListPageInnerInjectInfo`(列插槽注入:triggerSearch / triggerReset / update)
12
- - 内部不导出:`use-sticky`
13
-
14
- ## 范式页(apps/reference)
15
-
16
- - `/list-page/guide`(最佳实践:搜索 + 弹窗 CRUD + 分离侧栏)/ `/list-page/sticky`(三件套粘性)/ `/list-page/module-demo`(keepAlive 模块组合)
@@ -1,3 +0,0 @@
1
- import { default as ListPage } from './ListPage.vue';
2
- export * from './types';
3
- export { ListPage };