zzz-pc-view 0.0.39 → 0.0.41

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 (37) hide show
  1. package/package.json +3 -1
  2. package/src/api/own +4 -4
  3. package/src/decorators/CurdKey/CurdApi.d.ts +2 -2
  4. package/src/decorators/CurdKey/index.d.ts +65 -25
  5. package/src/decorators/DeclareType.d.ts +1 -1
  6. package/src/decorators/FilterKey/index.d.ts +8 -8
  7. package/src/index.d.ts +4 -0
  8. package/src/index.es.js +1518 -150
  9. package/src/index.umd.js +2 -2
  10. package/src/pcViews/components/curd/CreateBtnView.vue.d.ts +16 -0
  11. package/src/pcViews/components/curd/CurdFormOperatorView.vue.d.ts +20 -0
  12. package/src/pcViews/components/curd/CurdFormView.vue.d.ts +16 -0
  13. package/src/pcViews/components/curd/CurdTableOperatorView.vue.d.ts +21 -0
  14. package/src/pcViews/components/curd/CurdView.vue.d.ts +3 -1
  15. package/src/pcViews/components/curd/CurdViewHandler.d.ts +171 -6
  16. package/src/pcViews/components/curd/CurdViewType.d.ts +4 -0
  17. package/src/pcViews/components/curd/DialogEditorView.vue.d.ts +21 -0
  18. package/src/pcViews/components/curd/DrawerEditorView.vue.d.ts +16 -0
  19. package/src/pcViews/components/curd/SearchBtnView.vue.d.ts +9 -0
  20. package/src/pcViews/components/curd/index.d.ts +6 -0
  21. package/src/pcViews/components/forms/MyInputView.vue.d.ts +21 -0
  22. package/src/pcViews/components/forms/index.d.ts +1 -0
  23. package/src/pcViews/components/layout/DataWrapperView.vue.d.ts +4 -0
  24. package/src/pcViews/components/layout/LayoutHeaderView.vue.d.ts +3 -0
  25. package/src/pcViews/components/layout/LayoutMainView.vue.d.ts +14 -1
  26. package/src/pcViews/components/layout/LayoutNavView.vue.d.ts +10 -0
  27. package/src/pcViews/components/layout/LayoutProfileView.vue.d.ts +15 -0
  28. package/src/pcViews/components/layout/LayoutViewDeclare.d.ts +53 -0
  29. package/src/pcViews/components/layout/index.d.ts +1 -0
  30. package/src/pcViews/components/utils.d.ts +10 -6
  31. package/src/webUtils/icons/index.d.ts +1 -0
  32. package/src/webUtils/index.d.ts +2 -0
  33. package/src/webUtils/useNavStore.d.ts +137 -32
  34. package/src/webUtils/useSkeletonRow.d.ts +4 -0
  35. package/src/webUtils/utils.d.ts +39 -0
  36. package/src/zzz-frame.css +1 -1
  37. /package/src/pcViews/components/layout/{LayoutHeader.vue.d.ts → LayoutTabView.vue.d.ts} +0 -0
@@ -0,0 +1,16 @@
1
+ import { BaseCurdViewProps } from './CurdViewType';
2
+ declare const _default: <M extends object>(__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
+ props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, never> & Partial<{}> & BaseCurdViewProps<M>> & import('vue').PublicProps;
4
+ expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
5
+ attrs: any;
6
+ slots: {};
7
+ emit: {};
8
+ }>) => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
9
+ [key: string]: any;
10
+ }> & {
11
+ __ctx?: Awaited<typeof __VLS_setup>;
12
+ };
13
+ export default _default;
14
+ type __VLS_PrettifyLocal<T> = {
15
+ [K in keyof T]: T[K];
16
+ } & {};
@@ -0,0 +1,20 @@
1
+ import { ZWebUtils } from '../../../index-decorators';
2
+ import { BaseCurdViewProps } from './CurdViewType';
3
+ export interface CurdFormOperatorViewProps<M extends object> extends BaseCurdViewProps<M> {
4
+ operatorComponents?: (string | ZWebUtils.RawRouteComponent)[];
5
+ }
6
+ declare const _default: <M extends object>(__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<{
7
+ props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, never> & Partial<{}> & CurdFormOperatorViewProps<M>> & import('vue').PublicProps;
8
+ expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
9
+ attrs: any;
10
+ slots: {};
11
+ emit: {};
12
+ }>) => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
13
+ [key: string]: any;
14
+ }> & {
15
+ __ctx?: Awaited<typeof __VLS_setup>;
16
+ };
17
+ export default _default;
18
+ type __VLS_PrettifyLocal<T> = {
19
+ [K in keyof T]: T[K];
20
+ } & {};
@@ -0,0 +1,16 @@
1
+ import { BaseCurdViewProps } from './CurdViewType';
2
+ declare const _default: <M extends object>(__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
+ props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, never> & Partial<{}> & BaseCurdViewProps<M>> & import('vue').PublicProps;
4
+ expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
5
+ attrs: any;
6
+ slots: {};
7
+ emit: {};
8
+ }>) => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
9
+ [key: string]: any;
10
+ }> & {
11
+ __ctx?: Awaited<typeof __VLS_setup>;
12
+ };
13
+ export default _default;
14
+ type __VLS_PrettifyLocal<T> = {
15
+ [K in keyof T]: T[K];
16
+ } & {};
@@ -0,0 +1,21 @@
1
+ import { ZWebUtils } from '../../../index-decorators';
2
+ import { BaseViewProps } from '../utils';
3
+ import { CurdViewHandler } from './CurdViewHandler';
4
+ export interface CurdTableOperatorViewProps<M extends object> extends BaseViewProps<M, CurdViewHandler<M>> {
5
+ operatorComponents?: (string | ZWebUtils.RawRouteComponent)[];
6
+ }
7
+ declare const _default: <M extends object>(__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<{
8
+ props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, never> & Partial<{}> & CurdTableOperatorViewProps<M>> & import('vue').PublicProps;
9
+ expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
10
+ attrs: any;
11
+ slots: {};
12
+ emit: {};
13
+ }>) => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
14
+ [key: string]: any;
15
+ }> & {
16
+ __ctx?: Awaited<typeof __VLS_setup>;
17
+ };
18
+ export default _default;
19
+ type __VLS_PrettifyLocal<T> = {
20
+ [K in keyof T]: T[K];
21
+ } & {};
@@ -1,5 +1,5 @@
1
1
  import { CurdViewHandler } from './CurdViewHandler';
2
- declare const _default: <T extends object = object>(__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<{
2
+ declare const _default: <T extends object>(__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<{} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, never> & Partial<{}> & {
4
4
  viewHandler: CurdViewHandler<T>;
5
5
  }> & import('vue').PublicProps;
@@ -9,6 +9,8 @@ declare const _default: <T extends object = object>(__VLS_props: NonNullable<Awa
9
9
  "header-before"?(_: {}): any;
10
10
  "header-after"?(_: {}): any;
11
11
  content?(_: {}): any;
12
+ editor?(_: {}): any;
13
+ extra?(_: {}): any;
12
14
  };
13
15
  emit: {};
14
16
  }>) => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
@@ -1,6 +1,15 @@
1
1
  import { ZDecorators } from '../../../index-decorators';
2
2
  import { FormValidationResult, MessageBoxData } from 'element-plus';
3
+ /**
4
+ * CurdViewHandler 类继承自 ZDecorators.CurdKey.CurdHandler,用于处理 CURD(创建、读取、更新、删除)视图的相关操作。
5
+ *
6
+ * @template T - 泛型类型,表示处理的数据对象类型,默认是 object 类型。
7
+ */
3
8
  export declare class CurdViewHandler<T extends object = object> extends ZDecorators.CurdKey.CurdHandler<T> {
9
+ /**
10
+ * 用于存储表格组件实例的浅响应式引用。
11
+ * 该引用指向一个 `ElTable` 组件实例,可用于访问和操作表格的属性和方法。
12
+ */
4
13
  readonly tableElRef: import('vue').ShallowRef<import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('vue').ExtractPropTypes<{
5
14
  data: {
6
15
  type: import('vue').PropType<import('element-plus/es/components/table/src/table/defaults.mjs').DefaultRow[]>;
@@ -185,7 +194,7 @@ export declare class CurdViewHandler<T extends object = object> extends ZDecorat
185
194
  scrollTo: (options: ScrollToOptions | number, yCoord?: number) => void;
186
195
  setScrollLeft: (left?: number) => void;
187
196
  setScrollTop: (top?: number) => void;
188
- }, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, ("select" | "scroll" | "select-all" | "expand-change" | "current-change" | "selection-change" | "cell-mouse-enter" | "cell-mouse-leave" | "cell-contextmenu" | "cell-click" | "cell-dblclick" | "row-click" | "row-contextmenu" | "row-dblclick" | "header-click" | "header-contextmenu" | "sort-change" | "filter-change" | "header-dragend")[], import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, {
197
+ }, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, ("scroll" | "select" | "select-all" | "expand-change" | "current-change" | "selection-change" | "cell-mouse-enter" | "cell-mouse-leave" | "cell-contextmenu" | "cell-click" | "cell-dblclick" | "row-click" | "row-contextmenu" | "row-dblclick" | "header-click" | "header-contextmenu" | "sort-change" | "filter-change" | "header-dragend")[], import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, {
189
198
  data: any[];
190
199
  style: import('vue').CSSProperties;
191
200
  tableLayout: "fixed" | "auto";
@@ -598,7 +607,7 @@ export declare class CurdViewHandler<T extends object = object> extends ZDecorat
598
607
  scrollTo: (options: ScrollToOptions | number, yCoord?: number) => void;
599
608
  setScrollLeft: (left?: number) => void;
600
609
  setScrollTop: (top?: number) => void;
601
- }, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, ("select" | "scroll" | "select-all" | "expand-change" | "current-change" | "selection-change" | "cell-mouse-enter" | "cell-mouse-leave" | "cell-contextmenu" | "cell-click" | "cell-dblclick" | "row-click" | "row-contextmenu" | "row-dblclick" | "header-click" | "header-contextmenu" | "sort-change" | "filter-change" | "header-dragend")[], import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, {
610
+ }, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, ("scroll" | "select" | "select-all" | "expand-change" | "current-change" | "selection-change" | "cell-mouse-enter" | "cell-mouse-leave" | "cell-contextmenu" | "cell-click" | "cell-dblclick" | "row-click" | "row-contextmenu" | "row-dblclick" | "header-click" | "header-contextmenu" | "sort-change" | "filter-change" | "header-dragend")[], import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, {
602
611
  data: any[];
603
612
  style: import('vue').CSSProperties;
604
613
  tableLayout: "fixed" | "auto";
@@ -828,14 +837,132 @@ export declare class CurdViewHandler<T extends object = object> extends ZDecorat
828
837
  flexible: boolean;
829
838
  scrollbarTabindex: string | number;
830
839
  }> | undefined>;
840
+ /**
841
+ * 搜索按钮点击事件处理函数。
842
+ * 当搜索按钮被点击时,调用 `search` 方法执行搜索操作。
843
+ */
831
844
  readonly onSearchBtnClick: () => void;
845
+ /**
846
+ * 编辑器按钮点击事件处理函数。
847
+ * 当编辑器按钮被点击时,调用 `openEditor` 方法打开编辑器。
848
+ * 该方法接收与 `ZDecorators.CurdKey.CurdHandler` 类中 `openEditor` 方法相同的参数,
849
+ * 并将这些参数传递给 `openEditor` 方法。
850
+ *
851
+ * @param {...Parameters<ZDecorators.CurdKey.CurdHandler<T>['openEditor']>} args - 传递给 `openEditor` 方法的参数。
852
+ */
853
+ readonly onEditorBtnClick: (editTypeId: ZDecorators.CurdKey.EditTypeEnum, data: T) => void;
854
+ /**
855
+ * 表格行点击事件处理函数。
856
+ * 当表格的某一行被点击时,根据当前用户的权限决定打开编辑模式还是详情查看模式。
857
+ *
858
+ * @param {T} model - 当前点击行的数据对象。
859
+ */
860
+ readonly onTableRowClick: (model: T) => void;
861
+ /**
862
+ * 删除按钮点击事件处理函数。
863
+ * 当删除按钮被点击时,调用 `delete` 方法执行删除操作。
864
+ * 该方法接收与 `ZDecorators.CurdKey.CurdHandler` 类中 `delete` 方法相同的参数,
865
+ * 并将这些参数传递给 `delete` 方法。
866
+ *
867
+ * @param {...Parameters<ZDecorators.CurdKey.CurdHandler<T>['delete']>} args - 传递给 `delete` 方法的参数。
868
+ */
869
+ readonly onDeleteBtnClick: (data: T) => void;
870
+ /**
871
+ * 导出按钮点击事件处理函数。
872
+ * 当导出按钮被点击时,调用 `export` 方法执行导出操作。
873
+ */
832
874
  readonly onExportBtnClick: () => void;
833
- constructor(...args: ConstructorParameters<typeof ZDecorators.CurdKey.CurdHandler<T>>);
875
+ /**
876
+ * 创建按钮点击事件处理函数。
877
+ * 当创建按钮被点击时,调用 `openEditor` 方法打开编辑器,进入创建数据的模式。
878
+ * 此方法会传递编辑类型为创建,并使用 `CurdTarget` 类创建一个新的创建类型实例。
879
+ */
880
+ readonly onCreateBtnClick: () => void;
881
+ /**
882
+ * 自动聚焦输入框的方法。
883
+ * 该方法会在编辑器打开时自动聚焦到带有 'auto-focus' 类的输入框。
884
+ * 仅在有编辑的模式下生效,且需要确保编辑器表单元素和自动聚焦元素存在。
885
+ */
886
+ focusInput(): void;
887
+ /**
888
+ * 标记编辑器是否打开的布尔值。
889
+ * 用于跟踪编辑器的打开状态,true 表示编辑器已打开,false 表示编辑器已关闭。
890
+ */
891
+ protected editorOpened: boolean;
892
+ /**
893
+ * 编辑器打开时的回调方法。
894
+ * 该方法会在编辑器打开时执行,主要完成以下操作:
895
+ * 1. 将 editorOpened 状态设置为 true
896
+ * 2. 调用 focusInput 方法自动聚焦到输入框
897
+ */
898
+ readonly onEditorOpened: () => void;
899
+ /**
900
+ * 编辑器关闭时的回调方法。
901
+ * 该方法会在编辑器关闭时执行,将 editorOpened 状态设置为 false,
902
+ * 用于跟踪编辑器的关闭状态。
903
+ */
904
+ readonly onEditorClosed: () => void;
905
+ /**
906
+ * 保存按钮点击事件处理函数。
907
+ * 当保存按钮被点击时,调用 `editorDataSaveAndClose` 方法保存编辑器数据并关闭编辑器。
908
+ */
909
+ readonly onSaveBtnClick: () => void;
910
+ /**
911
+ * 保存并继续按钮点击事件处理函数。
912
+ * 当保存并继续按钮被点击时,调用 `editorDataSaveAndContinue` 方法保存编辑器数据并保持编辑器打开状态,以便继续编辑。
913
+ */
914
+ readonly onSaveContinueBtnClick: () => void;
915
+ /**
916
+ * 关闭编辑器按钮点击事件处理函数。
917
+ * 当关闭编辑器按钮被点击时,调用 `closeEditor` 方法关闭编辑器。
918
+ */
919
+ readonly onCloseEditorBtnClick: () => void;
920
+ /**
921
+ * 计算属性,用于确定表单是否禁用。
922
+ * 当编辑器数据加载状态或保存编辑器数据加载状态为真时,表单将被禁用。
923
+ * 该属性是一个只读的计算属性,它会根据 `editorDataLoadStatus` 和 `saveEditorDataLoadStatus` 的值动态更新。
924
+ */
925
+ readonly formDisabledComputed: import('vue').ComputedRef<boolean>;
926
+ /**
927
+ * 获取表单是否禁用的状态。
928
+ * 该 getter 方法返回 `formDisabledComputed` 计算属性的值,用于确定表单是否应该被禁用。
929
+ *
930
+ * @returns {boolean} 表单是否禁用的布尔值。
931
+ */
932
+ get formDisabled(): boolean;
933
+ /**
934
+ * 表单输入框按下回车键时的处理函数。
935
+ * 根据当前表单步骤索引和编辑类型,决定是保存并关闭编辑器,还是切换到下一个表单步骤。
936
+ */
937
+ readonly onFormKeyEnter: () => void;
938
+ /**
939
+ * 当查询验证失败时的处理方法。
940
+ * 该方法会在查询验证失败时被调用,使用 `ElNotification` 组件显示一个错误通知。
941
+ * 通知的标题为 '错误',内容为错误对象的消息,位置在右下角。
942
+ *
943
+ * @param {Error} error - 验证失败时抛出的错误对象。
944
+ */
834
945
  protected onValidateQueryFail(error: Error): void;
946
+ /**
947
+ * 确认删除操作的提示框方法。
948
+ * 该方法会弹出一个确认对话框,提示用户是否要永久删除指定的数据记录。
949
+ * 对话框中会显示要删除的数据的名称(如果有),并提供确认和取消按钮。
950
+ *
951
+ * @param {T} data - 要删除的数据对象。
952
+ * @returns {Promise<MessageBoxData>} - 返回一个 Promise,该 Promise 会在用户点击确认或取消按钮后解析,包含用户的选择信息。
953
+ */
835
954
  protected confirmDelete(data: T): Promise<MessageBoxData>;
955
+ /**
956
+ * 删除操作成功后的回调方法。
957
+ * 当删除操作成功完成时,该方法会被调用,使用 `ElNotification` 组件显示一个成功通知。
958
+ * 通知的标题为 '成功',内容为 '删除成功',位置在右下角。
959
+ */
836
960
  protected onDeleteSuccess(): void;
837
- protected afterCloseEditor(): void;
838
- protected afterEditorDataReady(): void;
961
+ /**
962
+ * 用于存储表单组件实例的浅响应式引用。
963
+ * 该引用指向一个 `ElForm` 组件实例,可用于访问和操作表单的属性和方法,
964
+ * 例如表单验证、重置表单等操作。
965
+ */
839
966
  readonly editorFormElRef: import('vue').ShallowRef<({
840
967
  $: import('vue').ComponentInternalInstance;
841
968
  $data: {};
@@ -1203,8 +1330,46 @@ export declare class CurdViewHandler<T extends object = object> extends ZDecorat
1203
1330
  default?(_: {}): any;
1204
1331
  };
1205
1332
  }) | undefined>;
1206
- protected validEditorData(): FormValidationResult;
1333
+ /**
1334
+ * 编辑器关闭后的回调方法。
1335
+ * 该方法会在编辑器关闭操作完成后被调用,目前为空方法,可根据具体需求在该方法中添加后续处理逻辑,
1336
+ * 例如清理临时数据、重置状态等操作。
1337
+ */
1338
+ protected afterCloseEditor(): void;
1339
+ /**
1340
+ * 编辑器数据准备好之后的回调方法。
1341
+ * 该方法会在编辑器数据准备好之后被调用,在一个宏任务中执行以下操作:
1342
+ * 1. 清除表单的验证状态
1343
+ * 2. 如果编辑器处于打开状态,则自动聚焦到输入框
1344
+ * 使用 setTimeout 确保这些操作在下一个事件循环中执行,避免与当前渲染周期冲突。
1345
+ */
1346
+ protected afterEditorDataReady(): void;
1347
+ /**
1348
+ * 验证编辑器表单数据的方法。
1349
+ * 该方法调用 `editorFormElRef` 引用的表单实例的 `validate` 方法,对表单数据进行验证。
1350
+ * 并返回验证结果,验证结果的类型为 `FormValidationResult`。
1351
+ *
1352
+ * @returns {FormValidationResult} 表单数据的验证结果。
1353
+ */
1354
+ validEditorData(): FormValidationResult;
1355
+ /**
1356
+ * 保存编辑器数据成功后的回调方法。
1357
+ * 当保存编辑器数据操作成功完成时,该方法会被调用,目前只是简单地将保存成功后的数据打印到控制台。
1358
+ * 可根据具体需求在该方法中添加后续处理逻辑,例如显示成功提示、更新表格数据等操作。
1359
+ *
1360
+ * @param {T} data - 保存成功后的数据对象。
1361
+ */
1207
1362
  protected onSaveEditorDataSuccess(data: T): void;
1363
+ /**
1364
+ * 初始化 CURD 配置后的回调方法。
1365
+ * 该方法会在 CURD 配置初始化完成后被调用,目前为空方法,可根据具体需求在该方法中添加后续处理逻辑,
1366
+ * 例如根据配置初始化一些数据、设置默认值等操作。
1367
+ */
1208
1368
  protected afterInitCurdConfigs(): void;
1369
+ /**
1370
+ * 组件卸载前的钩子函数。
1371
+ * 该方法会在组件实例被卸载之前调用,目前为空方法,可根据具体需求在该方法中添加后续处理逻辑,
1372
+ * 例如清理定时器、取消订阅、释放资源等操作,以避免内存泄漏。
1373
+ */
1209
1374
  protected onBeforeUnmount(): void;
1210
1375
  }
@@ -0,0 +1,4 @@
1
+ import { CurdViewHandler } from './CurdViewHandler';
2
+ export interface BaseCurdViewProps<M extends object = object> {
3
+ viewHandler: CurdViewHandler<M>;
4
+ }
@@ -0,0 +1,21 @@
1
+ import { BaseCurdViewProps } from './CurdViewType';
2
+ export interface DialogEditorViewProps<M extends object> extends BaseCurdViewProps<M> {
3
+ formHeight: string;
4
+ }
5
+ declare const _default: <M extends object>(__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<{
6
+ props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, never> & Partial<{}> & DialogEditorViewProps<M>> & import('vue').PublicProps;
7
+ expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
8
+ attrs: any;
9
+ slots: {
10
+ header?(_: {}): any;
11
+ };
12
+ emit: {};
13
+ }>) => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
14
+ [key: string]: any;
15
+ }> & {
16
+ __ctx?: Awaited<typeof __VLS_setup>;
17
+ };
18
+ export default _default;
19
+ type __VLS_PrettifyLocal<T> = {
20
+ [K in keyof T]: T[K];
21
+ } & {};
@@ -0,0 +1,16 @@
1
+ import { BaseCurdViewProps } from './CurdViewType';
2
+ declare const _default: <M extends object>(__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
+ props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, never> & Partial<{}> & BaseCurdViewProps<M>> & import('vue').PublicProps;
4
+ expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
5
+ attrs: any;
6
+ slots: {};
7
+ emit: {};
8
+ }>) => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
9
+ [key: string]: any;
10
+ }> & {
11
+ __ctx?: Awaited<typeof __VLS_setup>;
12
+ };
13
+ export default _default;
14
+ type __VLS_PrettifyLocal<T> = {
15
+ [K in keyof T]: T[K];
16
+ } & {};
@@ -0,0 +1,9 @@
1
+ type __VLS_Props = {
2
+ viewHandler: {
3
+ queryLoadStatus?: boolean;
4
+ listLoadStatus?: boolean;
5
+ onSearchBtnClick(): void;
6
+ };
7
+ };
8
+ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
9
+ export default _default;
@@ -1,2 +1,8 @@
1
1
  export * from './CurdViewHandler';
2
2
  export { default as CurdView } from './CurdView.vue';
3
+ export { default as TableOperatorView } from './CurdTableOperatorView.vue';
4
+ export { default as FormOperatorView } from './CurdFormOperatorView.vue';
5
+ export { default as DialogEditorView } from './DialogEditorView.vue';
6
+ export { default as DrawerEditorView } from './DrawerEditorView.vue';
7
+ export { default as CreateBtnView } from './CreateBtnView.vue';
8
+ export { default as SearchBtnView } from './SearchBtnView.vue';
@@ -0,0 +1,21 @@
1
+ import { ZUtils } from '../../../index-decorators';
2
+ import { BaseInputViewProps } from '../utils';
3
+ interface MyInputSlot<T extends object = object> {
4
+ modelValue: ZUtils.KeyValType;
5
+ props: {
6
+ options: T[];
7
+ primaryKey: ZUtils.KeyMatch<T, ZUtils.KeyValType>;
8
+ nameKey: ZUtils.KeyMatch<T, ZUtils.KeyValType>;
9
+ [key: string]: any;
10
+ };
11
+ }
12
+ interface MyInputViewProps extends BaseInputViewProps<ZUtils.KeyValType> {
13
+ prepend?: string | MyInputSlot;
14
+ append?: string | MyInputSlot;
15
+ }
16
+ declare const _default: import('vue').DefineComponent<MyInputViewProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
17
+ "update:modelValue": (value: any) => any;
18
+ }, string, import('vue').PublicProps, Readonly<MyInputViewProps> & Readonly<{
19
+ "onUpdate:modelValue"?: ((value: any) => any) | undefined;
20
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
21
+ export default _default;
@@ -1,4 +1,5 @@
1
1
  export { default as VModelView } from './VModelView.vue';
2
+ export { default as MyInputView } from './MyInputView.vue';
2
3
  export { default as RadioButtonGroupView } from './RadioButtonGroupView.vue';
3
4
  export { default as RadioGroupView } from './RadioGroupView.vue';
4
5
  export { default as CheckboxGroupView } from './CheckboxGroupView.vue';
@@ -1,3 +1,7 @@
1
+ /**
2
+ * 定义组件的 props
3
+ * @property {string} [bodyViewClass] - 可选的主体视图类名,用于自定义主体部分的样式
4
+ */
1
5
  type __VLS_Props = {
2
6
  bodyViewClass?: string;
3
7
  };
@@ -0,0 +1,3 @@
1
+ import { LayoutHeaderViewProps } from './LayoutViewDeclare';
2
+ declare const _default: import('vue').DefineComponent<LayoutHeaderViewProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<LayoutHeaderViewProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
3
+ export default _default;
@@ -1,2 +1,15 @@
1
- declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
1
+ import { LayoutHeaderViewProps } from './LayoutViewDeclare';
2
+ /**
3
+ * 定义组件的 props。
4
+ * @typedef {Object} Props
5
+ * @property {LayoutHeaderViewProps} headerProps - 传递给 LayoutHeaderView 组件的属性。
6
+ * @property {boolean} [showTabs] - 可选参数,是否显示标签页,默认为 false。
7
+ * @property {boolean} [keepAliveView] - 可选参数,是否使用 keep-alive 缓存组件,默认为 false。
8
+ */
9
+ type __VLS_Props = {
10
+ headerProps: LayoutHeaderViewProps;
11
+ showTabs?: boolean;
12
+ keepAliveView?: boolean;
13
+ };
14
+ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
2
15
  export default _default;
@@ -0,0 +1,10 @@
1
+ import { ZWebUtils } from '../../../index-decorators';
2
+ /**
3
+ * 定义组件的 props
4
+ * @property {ZWebUtils.ZNavWithoutButton[]} navs - 导航项数组,每个导航项不包含按钮类型
5
+ */
6
+ type __VLS_Props = {
7
+ navs: ZWebUtils.ZNavWithoutButton[];
8
+ };
9
+ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
10
+ export default _default;
@@ -0,0 +1,15 @@
1
+ import { LayoutProfileViewProps } from './LayoutViewDeclare';
2
+ /**
3
+ * 定义组件的 props。
4
+ *
5
+ * @property {LayoutProfileViewProps} profile - 包含布局配置文件视图所需的属性的对象。
6
+ * @property {boolean} [showArrow] - 一个可选的布尔值,用于控制是否显示箭头。
7
+ * @property {boolean} [arrowRotate] - 一个可选的布尔值,用于控制箭头是否旋转。
8
+ */
9
+ type __VLS_Props = {
10
+ profile: LayoutProfileViewProps;
11
+ showArrow?: boolean;
12
+ arrowRotate?: boolean;
13
+ };
14
+ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
15
+ export default _default;
@@ -0,0 +1,53 @@
1
+ import { ZWebUtils } from '../../../index-decorators';
2
+ /**
3
+ * 定义图标组件类型,图标组件可以是字符串或者 ZWebUtils 中的原始路由组件
4
+ */
5
+ export type IconComponent = string | ZWebUtils.RawRouteComponent;
6
+ /**
7
+ * 定义布局头部视图的系统信息接口
8
+ * @property {IconComponent} [icon] - 可选的图标组件
9
+ * @property {string} [title] - 可选的标题
10
+ */
11
+ export interface LayoutHeaderViewSystemInfo {
12
+ icon?: IconComponent;
13
+ title?: string;
14
+ }
15
+ /**
16
+ * 定义布局个人资料视图的菜单项接口
17
+ * @property {string} [label] - 可选的菜单项标签
18
+ * @property {IconComponent} [icon] - 可选的菜单项图标组件
19
+ * @property {() => void} handler - 菜单项点击处理函数
20
+ */
21
+ export interface LayoutProfileViewMenu {
22
+ label?: string;
23
+ icon?: IconComponent;
24
+ handler: () => void;
25
+ }
26
+ /**
27
+ * 定义布局个人资料视图的属性接口
28
+ * @property {IconComponent} [avatar] - 可选的头像图标组件
29
+ * @property {string} [nickname] - 可选的昵称
30
+ */
31
+ export interface LayoutProfileViewProps {
32
+ avatar?: IconComponent;
33
+ nickname?: string;
34
+ }
35
+ /**
36
+ * 定义带有菜单的布局个人资料视图的属性接口,继承自 LayoutProfileViewProps
37
+ * @property {LayoutProfileViewMenu[]} [menus] - 可选的菜单项数组
38
+ */
39
+ export interface LayoutProfileViewWithMenu extends LayoutProfileViewProps {
40
+ menus?: LayoutProfileViewMenu[];
41
+ }
42
+ /**
43
+ * 定义布局头部视图的属性接口
44
+ * @property {LayoutHeaderViewSystemInfo} [systemInfo] - 可选的系统信息
45
+ * @property {ZWebUtils.RawRouteComponent} [toolbarComponent] - 可选的工具栏组件
46
+ * @property {LayoutProfileViewWithMenu} [profile] - 可选的个人资料视图及菜单信息
47
+ */
48
+ export interface LayoutHeaderViewProps {
49
+ systemInfo?: LayoutHeaderViewSystemInfo;
50
+ toolbarComponent?: ZWebUtils.RawRouteComponent;
51
+ profile?: LayoutProfileViewWithMenu;
52
+ }
53
+ export {};
@@ -1,2 +1,3 @@
1
+ export * as LayoutViewDeclare from './LayoutViewDeclare';
1
2
  export { default as Main } from './LayoutMainView.vue';
2
3
  export { default as DataWrapper } from './DataWrapperView.vue';
@@ -1,4 +1,4 @@
1
- import { ZDecorators } from '../../index-decorators';
1
+ import { ZDecorators, ZUtils } from '../../index-decorators';
2
2
  export interface BaseViewProps<M extends object = object, ViewHandler extends ZDecorators.FilterKey.FilterHandler<M> = ZDecorators.FilterKey.FilterHandler<M>> {
3
3
  viewHandler: ViewHandler;
4
4
  model: M;
@@ -9,8 +9,8 @@ export interface BaseInputViewProps<V = any> {
9
9
  }
10
10
  export interface BaseOptionViewProps<V = any, T extends object = object> extends BaseInputViewProps<V> {
11
11
  options: T[];
12
- primaryKeyConfig: ZDecorators.PrimaryKey.Config<T>;
13
- nameKeyConfig: ZDecorators.NameKey.Config<T>;
12
+ primaryKey: ZUtils.KeyMatch<T, ZUtils.KeyValType>;
13
+ nameKey: ZUtils.KeyMatch<T, ZUtils.KeyValType>;
14
14
  }
15
15
  export interface ModelValueEmit<V = any> {
16
16
  (e: 'update:modelValue' | 'change', value: V): void;
@@ -22,12 +22,16 @@ export declare const useMappingOption: <M extends object = object, ViewHandler e
22
22
  readonly text: any;
23
23
  props: {
24
24
  readonly options: never[];
25
- primaryKeyConfig: ZDecorators.PrimaryKey.Config<never>;
26
- nameKeyConfig: ZDecorators.NameKey.Config<never>;
25
+ primaryKey: never;
26
+ nameKey: never;
27
27
  };
28
28
  } | {
29
29
  is: any;
30
30
  text: M[keyof M];
31
31
  props: {};
32
32
  }>;
33
- export declare const useModelValueBridgeComputed: <V = any>(props: BaseInputViewProps<V>, emit: ModelValueEmit<V>) => import('vue').WritableComputedRef<V, V>;
33
+ export declare const useModelValueBridgeComputed: <V>(props: BaseInputViewProps<V>, emit: ModelValueEmit<V>) => import('vue').WritableComputedRef<V, V>;
34
+ export interface ModelValueWithoutChangeEmit<V = any> {
35
+ (e: 'update:modelValue', value: V): void;
36
+ }
37
+ export declare const useModelValueBridgeWithoutChangeComputed: <V>(props: BaseInputViewProps<V>, emit: ModelValueWithoutChangeEmit<V>) => import('vue').WritableComputedRef<V, V>;
@@ -0,0 +1 @@
1
+ export declare const webUtilsIconMap: import('..').ComponentViewMap;
@@ -1,2 +1,4 @@
1
1
  export * from './WebSocketManager';
2
2
  export * from './useNavStore';
3
+ export * from './utils';
4
+ export * from './useSkeletonRow';