@juzhenfe/page-model 3.21.14 → 3.22.2

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 (135) hide show
  1. package/dist/index.es.js +9723 -14542
  2. package/dist/index.min.css +2 -1
  3. package/dist/index.umd.js +2 -7
  4. package/dist/{components → src/components}/buttons-renderer/utils/index.d.ts +2 -2
  5. package/dist/{components → src/components}/editable-table/index.d.ts +15 -14
  6. package/dist/{components → src/components}/form/components/column-tools/use-setting.d.ts +14 -14
  7. package/dist/src/components/form/components/section-config/merge.d.ts +3 -0
  8. package/dist/src/components/form/components/section-config/use.d.ts +14 -0
  9. package/dist/{components → src/components}/form/constructor.d.ts +83 -82
  10. package/dist/{components → src/components}/form/index.d.ts +5 -4
  11. package/dist/{components → src/components}/form/utils/save-columns.d.ts +30 -30
  12. package/dist/{components → src/components}/form/utils/use-form-els.d.ts +4 -4
  13. package/dist/{components → src/components}/form-dialog/use-move.d.ts +19 -19
  14. package/dist/{components → src/components}/page-model/components/top-tabs/constructor.d.ts +12 -11
  15. package/dist/{components → src/components}/page-model/constructor.d.ts +163 -162
  16. package/dist/{components → src/components}/page-model/index.d.ts +6 -5
  17. package/dist/{components → src/components}/page-model/patches/patch-config-urls.d.ts +2 -2
  18. package/dist/{components → src/components}/page-model/patches/patch-default-config.d.ts +2 -2
  19. package/dist/{components → src/components}/page-model/patches/patch-selectable.d.ts +2 -2
  20. package/dist/{components → src/components}/page-model/patches/patch-size.d.ts +2 -2
  21. package/dist/{components → src/components}/page-model/patches/patch-table-dragable.d.ts +2 -2
  22. package/dist/{components → src/components}/page-model/patches/patch-user-config.d.ts +2 -2
  23. package/dist/{components → src/components}/page-model/utils/default-config.d.ts +1 -1
  24. package/dist/{components → src/components}/page-model/utils/default-excel-export-config.d.ts +1 -1
  25. package/dist/{components → src/components}/page-model/utils/default-style-config.d.ts +1 -1
  26. package/dist/{components → src/components}/page-model/utils/default-text-config.d.ts +1 -1
  27. package/dist/{components → src/components}/page-model/utils/default-user-setting.d.ts +1 -1
  28. package/dist/{components → src/components}/page-model/utils/error-handler.d.ts +1 -1
  29. package/dist/{components → src/components}/page-model/utils/manager-controller.d.ts +49 -51
  30. package/dist/{components → src/components}/page-model/utils/patch-config.d.ts +3 -2
  31. package/dist/{components → src/components}/page-model/utils/use-auth-buttons.d.ts +9 -8
  32. package/dist/{components → src/components}/page-model/utils/use-keyboard-event.d.ts +9 -9
  33. package/dist/{components → src/components}/search-form/constructor.d.ts +24 -23
  34. package/dist/{components → src/components}/search-form/use-detect-item-width.d.ts +7 -6
  35. package/dist/{components → src/components}/table/components/column-tools/use-setting.d.ts +14 -14
  36. package/dist/{components → src/components}/table/components/column-tools/use-user-config.d.ts +14 -14
  37. package/dist/{components → src/components}/table/components/column-tools/use-user-show-row-config.d.ts +35 -35
  38. package/dist/{components → src/components}/table/components/export-form/use.d.ts +18 -17
  39. package/dist/{components → src/components}/table/components/selections-table/use.d.ts +15 -15
  40. package/dist/{components → src/components}/table/components/table-column/components/filter-zone/utils/index.d.ts +69 -69
  41. package/dist/{components → src/components}/table/constructor.d.ts +347 -339
  42. package/dist/{components → src/components}/table/utils/save-column-filter.d.ts +2 -2
  43. package/dist/{components → src/components}/table/utils/save-column-sort.d.ts +2 -2
  44. package/dist/{components → src/components}/table/utils/save-columns.d.ts +38 -38
  45. package/dist/{components → src/components}/table/utils/save-config.d.ts +6 -6
  46. package/dist/{components → src/components}/table/utils/use-column-drag.d.ts +8 -8
  47. package/dist/{components → src/components}/table/utils/use-listen-scroll.d.ts +7 -9
  48. package/dist/{components → src/components}/table/utils/use-static-summary.d.ts +13 -15
  49. package/dist/{components → src/components}/table/utils/use-table-config-change.d.ts +7 -9
  50. package/dist/{components → src/components}/table/utils/use-table-els.d.ts +6 -8
  51. package/dist/{main.d.ts → src/main.d.ts} +22 -21
  52. package/dist/{utils → src/utils}/config-saver.d.ts +51 -51
  53. package/dist/{utils → src/utils}/define-config.d.ts +3 -2
  54. package/dist/{utils → src/utils}/event-chain.d.ts +9 -9
  55. package/dist/{utils → src/utils}/event-emitter.d.ts +7 -7
  56. package/dist/{utils → src/utils}/index.d.ts +103 -102
  57. package/dist/src/utils/infinite-table.d.ts +49 -0
  58. package/dist/{utils → src/utils}/manager.d.ts +17 -16
  59. package/dist/{utils → src/utils}/provide-keys.d.ts +20 -20
  60. package/dist/{utils → src/utils}/reflect/index.d.ts +17 -16
  61. package/dist/{utils → src/utils}/reflect/reflect-collector.d.ts +25 -25
  62. package/dist/{utils → src/utils}/resize.d.ts +4 -3
  63. package/package.json +5 -6
  64. package/dist/components/buttons-renderer/components/button-item-render/index.vue.d.ts +0 -35
  65. package/dist/components/buttons-renderer/index.vue.d.ts +0 -85
  66. package/dist/components/column-filter-tools/index.vue.d.ts +0 -148
  67. package/dist/components/column-sort-tools/index.vue.d.ts +0 -170
  68. package/dist/components/draggable-list/index.vue.d.ts +0 -39
  69. package/dist/components/editable-table/components/table-cell/index.vue.d.ts +0 -12
  70. package/dist/components/form/components/col-container/components/module-container/index.vue.d.ts +0 -156
  71. package/dist/components/form/components/col-container/components/section-title-els/index.vue.d.ts +0 -45
  72. package/dist/components/form/components/col-container/components/tabs-mode-container/index.vue.d.ts +0 -100
  73. package/dist/components/form/components/col-container/index.vue.d.ts +0 -236
  74. package/dist/components/form/components/container-component/index.vue.d.ts +0 -281
  75. package/dist/components/form/type.d.ts +0 -167
  76. package/dist/components/form-container/components/dialog-mode/index.vue.d.ts +0 -116
  77. package/dist/components/form-container/components/drawer-mode/index.vue.d.ts +0 -123
  78. package/dist/components/form-container/components/full-page/index.vue.d.ts +0 -39
  79. package/dist/components/form-container/index.vue.d.ts +0 -35
  80. package/dist/components/form-dialog/index.vue.d.ts +0 -79
  81. package/dist/components/form-drawer/index.vue.d.ts +0 -83
  82. package/dist/components/form-item-renderer/index.vue.d.ts +0 -74
  83. package/dist/components/line-clamp-tools/index.vue.d.ts +0 -103
  84. package/dist/components/normal-tab/index.vue.d.ts +0 -35
  85. package/dist/components/normal-tab/type.d.ts +0 -18
  86. package/dist/components/page-model/components/selectable-operate/index.vue.d.ts +0 -120
  87. package/dist/components/page-model/components/top-tabs/index.vue.d.ts +0 -42
  88. package/dist/components/page-model/components/top-tabs/type.d.ts +0 -11
  89. package/dist/components/page-model/index.vue.d.ts +0 -2
  90. package/dist/components/page-model/type.d.ts +0 -344
  91. package/dist/components/scenes-tab/index.vue.d.ts +0 -4
  92. package/dist/components/scenes-tab/type.d.ts +0 -14
  93. package/dist/components/search-form/components/search-form-full/index.vue.d.ts +0 -174
  94. package/dist/components/search-form/type.d.ts +0 -42
  95. package/dist/components/simple-popover/index.vue.d.ts +0 -68
  96. package/dist/components/table/components/context-column-summary/index.vue.d.ts +0 -102
  97. package/dist/components/table/components/context-menu/index.vue.d.ts +0 -184
  98. package/dist/components/table/components/empty-data/index.vue.d.ts +0 -12
  99. package/dist/components/table/components/selections-table/index.vue.d.ts +0 -2
  100. package/dist/components/table/components/table-column/components/filter-zone/index.vue.d.ts +0 -109
  101. package/dist/components/table/components/table-column/index.vue.d.ts +0 -338
  102. package/dist/components/table/components/table-wrap/index.vue.d.ts +0 -16
  103. package/dist/components/table/index.vue.d.ts +0 -2
  104. package/dist/components/table/type.d.ts +0 -360
  105. package/dist/components/table-cell-renderer/index.vue.d.ts +0 -57
  106. package/dist/components/table-toolsbox/index.vue.d.ts +0 -101
  107. package/dist/types/common.d.ts +0 -484
  108. package/dist/types/form-item-types/cascader.d.ts +0 -38
  109. package/dist/types/form-item-types/checkbox-group.d.ts +0 -19
  110. package/dist/types/form-item-types/color-picker.d.ts +0 -21
  111. package/dist/types/form-item-types/date-picker.d.ts +0 -46
  112. package/dist/types/form-item-types/input-number.d.ts +0 -15
  113. package/dist/types/form-item-types/input.d.ts +0 -16
  114. package/dist/types/form-item-types/jz-a-map.d.ts +0 -14
  115. package/dist/types/form-item-types/jz-cascader.d.ts +0 -20
  116. package/dist/types/form-item-types/jz-city-picker.d.ts +0 -27
  117. package/dist/types/form-item-types/jz-ck-editor.d.ts +0 -27
  118. package/dist/types/form-item-types/jz-editor.d.ts +0 -20
  119. package/dist/types/form-item-types/jz-file-upload.d.ts +0 -20
  120. package/dist/types/form-item-types/jz-img-upload.d.ts +0 -23
  121. package/dist/types/form-item-types/jz-long-input.d.ts +0 -10
  122. package/dist/types/form-item-types/jz-td-map.d.ts +0 -13
  123. package/dist/types/form-item-types/no-e-type.d.ts +0 -12
  124. package/dist/types/form-item-types/radio-group.d.ts +0 -17
  125. package/dist/types/form-item-types/rate.d.ts +0 -30
  126. package/dist/types/form-item-types/select-v2.d.ts +0 -47
  127. package/dist/types/form-item-types/select.d.ts +0 -43
  128. package/dist/types/form-item-types/slider.d.ts +0 -31
  129. package/dist/types/form-item-types/switch.d.ts +0 -14
  130. package/dist/types/form-item-types/time-picker.d.ts +0 -41
  131. package/dist/types/form-item-types/time-select.d.ts +0 -30
  132. package/dist/types/renderer.d.ts +0 -9
  133. package/dist/types/shims-vue-property.d.ts +0 -7
  134. package/dist/types/shims-vue.d.ts +0 -7
  135. package/dist/types/window.d.ts +0 -10
@@ -1,2 +1,2 @@
1
- export declare const saveColumnFilters: any;
2
- export declare const getColumnFilters: any;
1
+ export declare const saveColumnFilters: any;
2
+ export declare const getColumnFilters: any;
@@ -1,2 +1,2 @@
1
- export declare const saveColumnSort: any;
2
- export declare const getColumnSort: any;
1
+ export declare const saveColumnSort: any;
2
+ export declare const getColumnSort: any;
@@ -1,38 +1,38 @@
1
- /**
2
- * 用户列配置
3
- * 保存到本地
4
- */
5
- export type SavedColumnItem = {
6
- /**
7
- * 原来的el位置索引
8
- */
9
- index: number;
10
- /**
11
- * 是否显示
12
- */
13
- show: number;
14
- /**
15
- * 汇总模式
16
- */
17
- sum?: number;
18
- /**
19
- * 用户label名称
20
- */
21
- ul?: string;
22
- /**
23
- * 宽度
24
- */
25
- w?: number;
26
- /**
27
- * 最小宽度
28
- */
29
- mw?: number;
30
- /**
31
- * 是否悬浮
32
- */
33
- fix?: 'left' | 'right' | boolean;
34
- };
35
- export declare const saveTableColumns: any;
36
- export declare const genSaveColumnName: any;
37
- export declare const saveColumns: any;
38
- export declare const getColumns: any;
1
+ /**
2
+ * 用户列配置
3
+ * 保存到本地
4
+ */
5
+ export declare type SavedColumnItem = {
6
+ /**
7
+ * 原来的el位置索引
8
+ */
9
+ index: number;
10
+ /**
11
+ * 是否显示
12
+ */
13
+ show: number;
14
+ /**
15
+ * 汇总模式
16
+ */
17
+ sum?: number;
18
+ /**
19
+ * 用户label名称
20
+ */
21
+ ul?: string;
22
+ /**
23
+ * 宽度
24
+ */
25
+ w?: number;
26
+ /**
27
+ * 最小宽度
28
+ */
29
+ mw?: number;
30
+ /**
31
+ * 是否悬浮
32
+ */
33
+ fix?: 'left' | 'right' | boolean;
34
+ };
35
+ export declare const saveTableColumns: any;
36
+ export declare const genSaveColumnName: any;
37
+ export declare const saveColumns: any;
38
+ export declare const getColumns: any;
@@ -1,6 +1,6 @@
1
- /**
2
- * 用户私人配置表单
3
- * 保存到本地
4
- */
5
- export declare const saveUserConfig: any;
6
- export declare const getUserConfig: any;
1
+ /**
2
+ * 用户私人配置表单
3
+ * 保存到本地
4
+ */
5
+ export declare const saveUserConfig: any;
6
+ export declare const getUserConfig: any;
@@ -1,8 +1,8 @@
1
- export declare const useColumnDrag: () => {
2
- initTableDrag: (opt: {
3
- element: HTMLDivElement;
4
- cb: (oldIndex: number, newIndex: number) => void;
5
- }) => void;
6
- clearSelectStart: () => void;
7
- destroyTableDrag(): void;
8
- };
1
+ export declare const useColumnDrag: () => {
2
+ initTableDrag: (opt: {
3
+ element: HTMLDivElement;
4
+ cb: (oldIndex: number, newIndex: number) => void;
5
+ }) => void;
6
+ clearSelectStart: () => void;
7
+ destroyTableDrag(): void;
8
+ };
@@ -1,9 +1,7 @@
1
- /**
2
- * 监听table组件的滚动
3
- */
4
- import TableManager from '../constructor';
5
- export declare function useListenScroll(tableManager: TableManager): {
6
- onMounted: () => void;
7
- onActivated: () => void;
8
- onUnmounted: () => void;
9
- };
1
+ import { default as TableManager } from '../constructor';
2
+
3
+ export declare function useListenScroll(tableManager: TableManager): {
4
+ onMounted: () => void;
5
+ onActivated: () => void;
6
+ onUnmounted: () => void;
7
+ };
@@ -1,15 +1,13 @@
1
- /**
2
- * 使用用户配置的汇总
3
- */
4
- import TableManager from '../constructor';
5
- export declare enum SummaryTypeEnum {
6
- 不展示 = 0,
7
- 求和 = 1,
8
- 总数 = 2
9
- }
10
- /**
11
- * 使用用户配置的汇总
12
- * @param tableManager
13
- * @returns
14
- */
15
- export declare function useUserSummary(tableManager: TableManager): () => boolean;
1
+ import { default as TableManager } from '../constructor';
2
+
3
+ export declare enum SummaryTypeEnum {
4
+ 不展示 = 0,
5
+ 求和 = 1,
6
+ 总数 = 2
7
+ }
8
+ /**
9
+ * 使用用户配置的汇总
10
+ * @param tableManager
11
+ * @returns
12
+ */
13
+ export declare function useUserSummary(tableManager: TableManager): () => boolean;
@@ -1,9 +1,7 @@
1
- /**
2
- * 表格配置改变
3
- */
4
- import EventEmitter from '../../../utils/event-emitter';
5
- /**
6
- * 表格配置修改事件
7
- */
8
- declare const tableUserConfigChangeEmiter: EventEmitter<"change">;
9
- export { tableUserConfigChangeEmiter };
1
+ import { default as EventEmitter } from '../../../utils/event-emitter';
2
+
3
+ /**
4
+ * 表格配置修改事件
5
+ */
6
+ declare const tableUserConfigChangeEmiter: EventEmitter<"change">;
7
+ export { tableUserConfigChangeEmiter };
@@ -1,8 +1,6 @@
1
- /**
2
- * 获取table的渲染els
3
- */
4
- import TableManager from "../constructor";
5
- export declare function useTableEls(originTableEls: any[], tableManager: TableManager): {
6
- filteredUserEls: any[];
7
- renderEls: any[];
8
- };
1
+ import { default as TableManager } from '../constructor';
2
+
3
+ export declare function useTableEls(originTableEls: any[], tableManager: TableManager): {
4
+ filteredUserEls: any[];
5
+ renderEls: any[];
6
+ };
@@ -1,25 +1,26 @@
1
1
  import { InstallOptions } from './components/page-model/type';
2
- import defineConfig from './utils/define-config';
2
+ import { default as defineConfig } from './utils/define-config';
3
3
  import { App } from 'vue';
4
- import Sortable from "sortablejs/Sortable.min.js";
5
- import ButtonsRenderer from './components/buttons-renderer/index.vue';
6
- import FormDialog from './components/form-dialog/index.vue';
7
- import FormDrawer from './components/form-drawer/index.vue';
8
- import TableCellRenderer from './components/table-cell-renderer/index.vue';
9
- import TableColumnSetting from './components/table/components/column-tools/setting.vue';
4
+ import { default as Sortable } from 'sortablejs/Sortable.min.js';
5
+ import { default as ButtonsRenderer } from './components/buttons-renderer/index.vue';
6
+ import { default as FormDialog } from './components/form-dialog/index.vue';
7
+ import { default as FormDrawer } from './components/form-drawer/index.vue';
8
+ import { default as TableCellRenderer } from './components/table-cell-renderer/index.vue';
9
+ import { default as TableColumnSetting } from './components/table/components/column-tools/setting.vue';
10
10
  import { EditableTable, defineEditableTable } from './components/editable-table';
11
- import DraggableList from './components/draggable-list/index.vue';
12
- import SimplePopover from './components/simple-popover/index.vue';
13
- export * from './components/form';
11
+ import { default as DraggableList } from './components/draggable-list/index.vue';
12
+ import { default as SimplePopover } from './components/simple-popover/index.vue';
14
13
  import { FilterItemTypeEnum, FilterMatchModeEnum, updateCompareOptions, updateCompareNoValueOptions } from './components/table/components/table-column/components/filter-zone/utils';
15
- declare const columnTools: {
16
- saveTableColumns: any;
17
- genSaveColumnName: any;
18
- };
19
- export { defineConfig, ButtonsRenderer, TableCellRenderer, FormDialog, FormDrawer, EditableTable, defineEditableTable, columnTools, TableColumnSetting, DraggableList, SimplePopover, FilterItemTypeEnum, updateCompareOptions, updateCompareNoValueOptions, FilterMatchModeEnum, Sortable };
20
- declare const ModelComponent: {
21
- install: (app: App, options: InstallOptions) => App<any>;
22
- version: string;
23
- updateTableColumns(content: any): void;
24
- };
25
- export default ModelComponent;
14
+
15
+ export * from './components/form';
16
+ declare const columnTools: {
17
+ saveTableColumns: any;
18
+ genSaveColumnName: any;
19
+ };
20
+ export { defineConfig, ButtonsRenderer, TableCellRenderer, FormDialog, FormDrawer, EditableTable, defineEditableTable, columnTools, TableColumnSetting, DraggableList, SimplePopover, FilterItemTypeEnum, updateCompareOptions, updateCompareNoValueOptions, FilterMatchModeEnum, Sortable };
21
+ declare const ModelComponent: {
22
+ install: (app: App, options: InstallOptions) => App<any>;
23
+ version: string;
24
+ updateTableColumns(content: any): void;
25
+ };
26
+ export default ModelComponent;
@@ -1,51 +1,51 @@
1
- /**
2
- * 保存和config相关的配置到本地
3
- */
4
- declare class ConfigSaver<T = any> {
5
- /**
6
- * 保存的控件名称
7
- */
8
- scope: string;
9
- /**
10
- * 保存的空间名称
11
- * @param scope 空间名称
12
- */
13
- constructor(scope: string);
14
- /**
15
- * 获取当前空间的内容
16
- * @returns 空间的内容
17
- */
18
- getContents(): {
19
- [key: string]: T;
20
- } | null;
21
- /**
22
- * 保存内容到空间
23
- * @param val 保存到空间的内容
24
- */
25
- setContents(val: any): void;
26
- /**
27
- * 获取字符串的code标识
28
- * @param str
29
- * @returns number
30
- */
31
- getCharCode(str: string): number;
32
- /**
33
- * 生成空间中config的标识
34
- * @param els
35
- * @returns
36
- */
37
- genScopeItemKey(els: PageModel.TableBaseItem<AnyObject>[]): string;
38
- /**
39
- * 保存config
40
- */
41
- saveContentItem(els: PageModel.TableBaseItem<AnyObject>[], val: T): string;
42
- /**
43
- * 获取config
44
- * @param els
45
- */
46
- getContentItem(els: PageModel.TableBaseItem<AnyObject>[], withKey?: boolean): T | {
47
- scope: string;
48
- content: T;
49
- };
50
- }
51
- export default ConfigSaver;
1
+ /**
2
+ * 保存和config相关的配置到本地
3
+ */
4
+ declare class ConfigSaver<T = any> {
5
+ /**
6
+ * 保存的控件名称
7
+ */
8
+ scope: string;
9
+ /**
10
+ * 保存的空间名称
11
+ * @param scope 空间名称
12
+ */
13
+ constructor(scope: string);
14
+ /**
15
+ * 获取当前空间的内容
16
+ * @returns 空间的内容
17
+ */
18
+ getContents(): {
19
+ [key: string]: T;
20
+ } | null;
21
+ /**
22
+ * 保存内容到空间
23
+ * @param val 保存到空间的内容
24
+ */
25
+ setContents(val: any): void;
26
+ /**
27
+ * 获取字符串的code标识
28
+ * @param str
29
+ * @returns number
30
+ */
31
+ getCharCode(str: string): number;
32
+ /**
33
+ * 生成空间中config的标识
34
+ * @param els
35
+ * @returns
36
+ */
37
+ genScopeItemKey(els: PageModel.TableBaseItem<AnyObject>[]): string;
38
+ /**
39
+ * 保存config
40
+ */
41
+ saveContentItem(els: PageModel.TableBaseItem<AnyObject>[], val: T): string;
42
+ /**
43
+ * 获取config
44
+ * @param els
45
+ */
46
+ getContentItem(els: PageModel.TableBaseItem<AnyObject>[], withKey?: boolean): T | {
47
+ scope: string;
48
+ content: T;
49
+ };
50
+ }
51
+ export default ConfigSaver;
@@ -1,3 +1,4 @@
1
1
  import { Config } from '../components/page-model/type';
2
- declare function defineConfig<MODEL = AnyObject, EXTENDS = any>(config: Config<MODEL, EXTENDS>): Config<MODEL, EXTENDS>;
3
- export default defineConfig;
2
+
3
+ declare function defineConfig<MODEL = AnyObject, EXTENDS = any>(config: Config<MODEL, EXTENDS>): Config<MODEL, EXTENDS>;
4
+ export default defineConfig;
@@ -1,9 +1,9 @@
1
- type EventChainItem = {
2
- (...rest: any[]): any;
3
- };
4
- export default class EventChain {
5
- chains: EventChainItem[];
6
- setChain(chainItem: EventChainItem): this;
7
- passRequest(...rest: any[]): any;
8
- }
9
- export {};
1
+ declare type EventChainItem = {
2
+ (...rest: any[]): any;
3
+ };
4
+ export default class EventChain {
5
+ chains: EventChainItem[];
6
+ setChain(chainItem: EventChainItem): this;
7
+ passRequest(...rest: any[]): any;
8
+ }
9
+ export {};
@@ -1,7 +1,7 @@
1
- export default class EventEmitter<T = string> {
2
- events: Map<T, Function[]>;
3
- on(eventName: T, cb: Function): void;
4
- emit(eventName: T, ...rest: any[]): void;
5
- has(eventName: T): boolean;
6
- remove(eventName: T, cb: Function): void;
7
- }
1
+ export default class EventEmitter<T = string> {
2
+ events: Map<T, Function[]>;
3
+ on(eventName: T, cb: Function): void;
4
+ emit(eventName: T, ...rest: any[]): void;
5
+ has(eventName: T): boolean;
6
+ remove(eventName: T, cb: Function): void;
7
+ }
@@ -1,102 +1,103 @@
1
- import IManager from './manager';
2
- /**
3
- * 创建命名空间
4
- * @param space
5
- * @returns
6
- */
7
- export declare const createBEMSpace: (space: string) => {
8
- BEMSpace: string;
9
- createBEMName: (name: string) => string;
10
- };
11
- /**
12
- * 深层拷贝
13
- * 需要可以拷贝的类型
14
- * 1、对象
15
- * 2、数组
16
- * 3、基本类型
17
- * 4、函数
18
- */
19
- type ShowItem = AnyObject & {
20
- isShow?: Function;
21
- children?: ShowItem[];
22
- };
23
- type DisabledItem = AnyObject & {
24
- isDisabled?: Function;
25
- children?: DisabledItem[];
26
- };
27
- type AuthButtonItem = AnyObject & {
28
- authValue?: string;
29
- children?: ShowItem[];
30
- };
31
- /**
32
- * 过滤不显示的表单元素
33
- * @param this
34
- * @param item
35
- * @param restParams
36
- * @returns
37
- */
38
- export declare const filterShowItem: (this: IManager, item: ShowItem, ...restParams: any[]) => any;
39
- /**
40
- * 过滤无权限的按钮
41
- * @param this
42
- * @param item
43
- * @param restParams
44
- * @returns
45
- */
46
- export declare const filterAuthedItem: (this: any, item: AuthButtonItem, authButtons: string[]) => boolean;
47
- /**
48
- * 设置禁用的表单元素
49
- * @param this
50
- * @param item
51
- * @param restParams
52
- */
53
- export declare const setItemDisabled: (this: IManager, item: DisabledItem, ...restParams: any[]) => void;
54
- /**
55
- * 为props和events中的函数绑定上下文
56
- */
57
- export declare const attributesBinding: <T = any>(props: any, binding: any) => T;
58
- /**
59
- * 比对新老数据列表,得出新增、更新、删除数据
60
- * @param {Array} oldList
61
- * @param {Array} newList
62
- * @param {string} compareKey
63
- * @returns
64
- */
65
- export declare const compareTwoList: <T = AnyObject>(oldList: T[], newList: T[], compareKey: keyof T) => {
66
- adds: T[];
67
- upds: T[];
68
- dels: T[];
69
- };
70
- /**
71
- * 返回数值的类型
72
- * @param val
73
- * @returns string
74
- */
75
- export declare const getType: (val: any) => string;
76
- export declare const groupArray: (list: any[], gropupKey: string) => AnyObject;
77
- export declare const jsonClone: <T = any>(data: T) => T;
78
- export declare const tree: <T = any>(data: T[], supKey: keyof T, subKey: keyof T, childrenKey: string) => any[];
79
- /**
80
- * debounce
81
- * @param fn
82
- * @param interval
83
- * @returns
84
- */
85
- export declare const debounce: (fn: Function, interval?: number, immediate?: boolean) => (...rest: any[]) => void;
86
- /**
87
- * 节流函数
88
- * @param fn
89
- * @param interval 节流间隔
90
- * @returns
91
- */
92
- export declare const throttle: (fn: Function, interval?: number) => (...rest: any[]) => void;
93
- /**
94
- * 生产随机字符串
95
- * @param len 字符串位数
96
- */
97
- export declare const randomStr: (len?: number) => string;
98
- /**
99
- * 重新尝试方法
100
- */
101
- export declare function retryFunc(fn: Function, isCanExecute: Function, retryTimes?: number, interval?: number): () => void;
102
- export {};
1
+ import { default as IManager } from './manager';
2
+
3
+ /**
4
+ * 创建命名空间
5
+ * @param space
6
+ * @returns
7
+ */
8
+ export declare const createBEMSpace: (space: string) => {
9
+ BEMSpace: string;
10
+ createBEMName: (name: string) => string;
11
+ };
12
+ /**
13
+ * 深层拷贝
14
+ * 需要可以拷贝的类型
15
+ * 1、对象
16
+ * 2、数组
17
+ * 3、基本类型
18
+ * 4、函数
19
+ */
20
+ declare type ShowItem = AnyObject & {
21
+ isShow?: Function;
22
+ children?: ShowItem[];
23
+ };
24
+ declare type DisabledItem = AnyObject & {
25
+ isDisabled?: Function;
26
+ children?: DisabledItem[];
27
+ };
28
+ declare type AuthButtonItem = AnyObject & {
29
+ authValue?: string;
30
+ children?: ShowItem[];
31
+ };
32
+ /**
33
+ * 过滤不显示的表单元素
34
+ * @param this
35
+ * @param item
36
+ * @param restParams
37
+ * @returns
38
+ */
39
+ export declare const filterShowItem: (this: IManager, item: ShowItem, ...restParams: any[]) => any;
40
+ /**
41
+ * 过滤无权限的按钮
42
+ * @param this
43
+ * @param item
44
+ * @param restParams
45
+ * @returns
46
+ */
47
+ export declare const filterAuthedItem: (this: any, item: AuthButtonItem, authButtons: string[]) => boolean;
48
+ /**
49
+ * 设置禁用的表单元素
50
+ * @param this
51
+ * @param item
52
+ * @param restParams
53
+ */
54
+ export declare const setItemDisabled: (this: IManager, item: DisabledItem, ...restParams: any[]) => void;
55
+ /**
56
+ * 为props和events中的函数绑定上下文
57
+ */
58
+ export declare const attributesBinding: <T = any>(props: any, binding: any) => T;
59
+ /**
60
+ * 比对新老数据列表,得出新增、更新、删除数据
61
+ * @param {Array} oldList
62
+ * @param {Array} newList
63
+ * @param {string} compareKey
64
+ * @returns
65
+ */
66
+ export declare const compareTwoList: <T = AnyObject>(oldList: T[], newList: T[], compareKey: keyof T) => {
67
+ adds: T[];
68
+ upds: T[];
69
+ dels: T[];
70
+ };
71
+ /**
72
+ * 返回数值的类型
73
+ * @param val
74
+ * @returns string
75
+ */
76
+ export declare const getType: (val: any) => string;
77
+ export declare const groupArray: (list: any[], gropupKey: string) => AnyObject;
78
+ export declare const jsonClone: <T = any>(data: T) => T;
79
+ export declare const tree: <T = any>(data: T[], supKey: keyof T, subKey: keyof T, childrenKey: string) => any[];
80
+ /**
81
+ * debounce
82
+ * @param fn
83
+ * @param interval
84
+ * @returns
85
+ */
86
+ export declare const debounce: (fn: Function, interval?: number, immediate?: boolean) => (...rest: any[]) => void;
87
+ /**
88
+ * 节流函数
89
+ * @param fn
90
+ * @param interval 节流间隔
91
+ * @returns
92
+ */
93
+ export declare const throttle: (fn: Function, interval?: number) => (...rest: any[]) => void;
94
+ /**
95
+ * 生产随机字符串
96
+ * @param len 字符串位数
97
+ */
98
+ export declare const randomStr: (len?: number) => string;
99
+ /**
100
+ * 重新尝试方法
101
+ */
102
+ export declare function retryFunc(fn: Function, isCanExecute: Function, retryTimes?: number, interval?: number): () => void;
103
+ export {};
@@ -0,0 +1,49 @@
1
+ /**
2
+ * 无限滚动表格
3
+ */
4
+ declare type InfiniteTableProps = {
5
+ /**
6
+ * 表格容器元素,通常不包含表头
7
+ */
8
+ getContainElement: () => HTMLElement;
9
+ /**
10
+ * 滚动列表元素
11
+ */
12
+ getScrollListElement: () => HTMLElement;
13
+ /**
14
+ * 单元格高度 px
15
+ */
16
+ itemHeight: number;
17
+ /**
18
+ * 预加载数量
19
+ */
20
+ topPrefetchCount: number;
21
+ /**
22
+ * 底部预加载数量
23
+ */
24
+ bottomPrefetchCount: number;
25
+ /**
26
+ * 滚动数量
27
+ */
28
+ dataCount: number;
29
+ /**
30
+ * 显示数据索引更新
31
+ */
32
+ onDataIndexRangeUpdate?: (dataIndexRange: [number, number]) => void;
33
+ };
34
+ export declare const useInfiniteTable: (options: InfiniteTableProps) => {
35
+ currentScrollTop: import('vue').Ref<number, number>;
36
+ viewportRange: import('vue').Ref<[number, number], [number, number]>;
37
+ dataIndexRange: import('vue').Ref<[number, number], [number, number]>;
38
+ offsetTop: import('vue').Ref<number, number>;
39
+ scrollbarScrollPercent: import('vue').Ref<number, number>;
40
+ viewportHeight: import('vue').Ref<number, number>;
41
+ totalHeight: import('vue').Ref<number, number>;
42
+ scrollableDistance: import('vue').Ref<number, number>;
43
+ init: () => boolean;
44
+ dispose: () => void;
45
+ handleScroll: (wheelDeltaY: number) => void;
46
+ setScrollTop: (scrollTop: number) => void;
47
+ updateScrollbarScrollPercent: (percent: number) => void;
48
+ };
49
+ export {};