@juzhenfe/page-model 3.21.13 → 3.22.1
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/dist/index.es.js +9723 -14559
- package/dist/index.min.css +2 -1
- package/dist/index.umd.js +2 -7
- package/dist/{components → src/components}/buttons-renderer/utils/index.d.ts +2 -2
- package/dist/{components → src/components}/editable-table/index.d.ts +15 -14
- package/dist/{components → src/components}/form/components/column-tools/use-setting.d.ts +14 -14
- package/dist/src/components/form/components/section-config/merge.d.ts +3 -0
- package/dist/src/components/form/components/section-config/use.d.ts +14 -0
- package/dist/{components → src/components}/form/constructor.d.ts +83 -82
- package/dist/{components → src/components}/form/index.d.ts +5 -4
- package/dist/{components → src/components}/form/utils/save-columns.d.ts +30 -30
- package/dist/{components → src/components}/form/utils/use-form-els.d.ts +4 -4
- package/dist/{components → src/components}/form-dialog/use-move.d.ts +19 -19
- package/dist/{components → src/components}/page-model/components/top-tabs/constructor.d.ts +12 -11
- package/dist/{components → src/components}/page-model/constructor.d.ts +163 -162
- package/dist/{components → src/components}/page-model/index.d.ts +6 -5
- package/dist/{components → src/components}/page-model/patches/patch-config-urls.d.ts +2 -2
- package/dist/{components → src/components}/page-model/patches/patch-default-config.d.ts +2 -2
- package/dist/{components → src/components}/page-model/patches/patch-selectable.d.ts +2 -2
- package/dist/{components → src/components}/page-model/patches/patch-size.d.ts +2 -2
- package/dist/{components → src/components}/page-model/patches/patch-table-dragable.d.ts +2 -2
- package/dist/{components → src/components}/page-model/patches/patch-user-config.d.ts +2 -2
- package/dist/{components → src/components}/page-model/utils/default-config.d.ts +1 -1
- package/dist/{components → src/components}/page-model/utils/default-excel-export-config.d.ts +1 -1
- package/dist/{components → src/components}/page-model/utils/default-style-config.d.ts +1 -1
- package/dist/{components → src/components}/page-model/utils/default-text-config.d.ts +1 -1
- package/dist/{components → src/components}/page-model/utils/default-user-setting.d.ts +1 -1
- package/dist/{components → src/components}/page-model/utils/error-handler.d.ts +1 -1
- package/dist/{components → src/components}/page-model/utils/manager-controller.d.ts +49 -51
- package/dist/{components → src/components}/page-model/utils/patch-config.d.ts +3 -2
- package/dist/{components → src/components}/page-model/utils/use-auth-buttons.d.ts +9 -8
- package/dist/{components → src/components}/page-model/utils/use-keyboard-event.d.ts +9 -9
- package/dist/{components → src/components}/search-form/constructor.d.ts +24 -23
- package/dist/{components → src/components}/search-form/use-detect-item-width.d.ts +7 -6
- package/dist/{components → src/components}/table/components/column-tools/use-setting.d.ts +14 -14
- package/dist/{components → src/components}/table/components/column-tools/use-user-config.d.ts +14 -14
- package/dist/{components → src/components}/table/components/column-tools/use-user-show-row-config.d.ts +35 -35
- package/dist/{components → src/components}/table/components/export-form/use.d.ts +18 -17
- package/dist/{components → src/components}/table/components/selections-table/use.d.ts +15 -15
- package/dist/{components → src/components}/table/components/table-column/components/filter-zone/utils/index.d.ts +69 -69
- package/dist/{components → src/components}/table/constructor.d.ts +347 -339
- package/dist/{components → src/components}/table/utils/save-column-filter.d.ts +2 -2
- package/dist/{components → src/components}/table/utils/save-column-sort.d.ts +2 -2
- package/dist/{components → src/components}/table/utils/save-columns.d.ts +38 -38
- package/dist/{components → src/components}/table/utils/save-config.d.ts +6 -6
- package/dist/{components → src/components}/table/utils/use-column-drag.d.ts +8 -8
- package/dist/{components → src/components}/table/utils/use-listen-scroll.d.ts +7 -9
- package/dist/{components → src/components}/table/utils/use-static-summary.d.ts +13 -15
- package/dist/{components → src/components}/table/utils/use-table-config-change.d.ts +7 -9
- package/dist/{components → src/components}/table/utils/use-table-els.d.ts +6 -8
- package/dist/{main.d.ts → src/main.d.ts} +22 -21
- package/dist/{utils → src/utils}/config-saver.d.ts +51 -51
- package/dist/{utils → src/utils}/define-config.d.ts +3 -2
- package/dist/{utils → src/utils}/event-chain.d.ts +9 -9
- package/dist/{utils → src/utils}/event-emitter.d.ts +7 -7
- package/dist/{utils → src/utils}/index.d.ts +103 -102
- package/dist/src/utils/infinite-table.d.ts +49 -0
- package/dist/{utils → src/utils}/manager.d.ts +17 -16
- package/dist/{utils → src/utils}/provide-keys.d.ts +20 -20
- package/dist/{utils → src/utils}/reflect/index.d.ts +17 -16
- package/dist/{utils → src/utils}/reflect/reflect-collector.d.ts +25 -25
- package/dist/{utils → src/utils}/resize.d.ts +4 -3
- package/package.json +5 -6
- package/dist/components/buttons-renderer/components/button-item-render/index.vue.d.ts +0 -35
- package/dist/components/buttons-renderer/index.vue.d.ts +0 -85
- package/dist/components/column-filter-tools/index.vue.d.ts +0 -148
- package/dist/components/column-sort-tools/index.vue.d.ts +0 -170
- package/dist/components/draggable-list/index.vue.d.ts +0 -39
- package/dist/components/editable-table/components/table-cell/index.vue.d.ts +0 -12
- package/dist/components/form/components/col-container/components/module-container/index.vue.d.ts +0 -156
- package/dist/components/form/components/col-container/components/section-title-els/index.vue.d.ts +0 -45
- package/dist/components/form/components/col-container/components/tabs-mode-container/index.vue.d.ts +0 -100
- package/dist/components/form/components/col-container/index.vue.d.ts +0 -236
- package/dist/components/form/components/container-component/index.vue.d.ts +0 -281
- package/dist/components/form/type.d.ts +0 -167
- package/dist/components/form-container/components/dialog-mode/index.vue.d.ts +0 -116
- package/dist/components/form-container/components/drawer-mode/index.vue.d.ts +0 -123
- package/dist/components/form-container/components/full-page/index.vue.d.ts +0 -39
- package/dist/components/form-container/index.vue.d.ts +0 -35
- package/dist/components/form-dialog/index.vue.d.ts +0 -79
- package/dist/components/form-drawer/index.vue.d.ts +0 -83
- package/dist/components/form-item-renderer/index.vue.d.ts +0 -74
- package/dist/components/line-clamp-tools/index.vue.d.ts +0 -103
- package/dist/components/normal-tab/index.vue.d.ts +0 -35
- package/dist/components/normal-tab/type.d.ts +0 -18
- package/dist/components/page-model/components/selectable-operate/index.vue.d.ts +0 -120
- package/dist/components/page-model/components/top-tabs/index.vue.d.ts +0 -42
- package/dist/components/page-model/components/top-tabs/type.d.ts +0 -11
- package/dist/components/page-model/index.vue.d.ts +0 -2
- package/dist/components/page-model/type.d.ts +0 -344
- package/dist/components/scenes-tab/index.vue.d.ts +0 -4
- package/dist/components/scenes-tab/type.d.ts +0 -14
- package/dist/components/search-form/components/search-form-full/index.vue.d.ts +0 -174
- package/dist/components/search-form/type.d.ts +0 -42
- package/dist/components/simple-popover/index.vue.d.ts +0 -68
- package/dist/components/table/components/context-column-summary/index.vue.d.ts +0 -102
- package/dist/components/table/components/context-menu/index.vue.d.ts +0 -184
- package/dist/components/table/components/empty-data/index.vue.d.ts +0 -12
- package/dist/components/table/components/selections-table/index.vue.d.ts +0 -2
- package/dist/components/table/components/table-column/components/filter-zone/index.vue.d.ts +0 -109
- package/dist/components/table/components/table-column/index.vue.d.ts +0 -339
- package/dist/components/table/components/table-wrap/index.vue.d.ts +0 -16
- package/dist/components/table/index.vue.d.ts +0 -2
- package/dist/components/table/type.d.ts +0 -360
- package/dist/components/table-cell-renderer/index.vue.d.ts +0 -57
- package/dist/components/table-toolsbox/index.vue.d.ts +0 -101
- package/dist/types/common.d.ts +0 -484
- package/dist/types/form-item-types/cascader.d.ts +0 -38
- package/dist/types/form-item-types/checkbox-group.d.ts +0 -19
- package/dist/types/form-item-types/color-picker.d.ts +0 -21
- package/dist/types/form-item-types/date-picker.d.ts +0 -46
- package/dist/types/form-item-types/input-number.d.ts +0 -15
- package/dist/types/form-item-types/input.d.ts +0 -16
- package/dist/types/form-item-types/jz-a-map.d.ts +0 -14
- package/dist/types/form-item-types/jz-cascader.d.ts +0 -20
- package/dist/types/form-item-types/jz-city-picker.d.ts +0 -27
- package/dist/types/form-item-types/jz-ck-editor.d.ts +0 -27
- package/dist/types/form-item-types/jz-editor.d.ts +0 -20
- package/dist/types/form-item-types/jz-file-upload.d.ts +0 -20
- package/dist/types/form-item-types/jz-img-upload.d.ts +0 -23
- package/dist/types/form-item-types/jz-long-input.d.ts +0 -10
- package/dist/types/form-item-types/jz-td-map.d.ts +0 -13
- package/dist/types/form-item-types/no-e-type.d.ts +0 -12
- package/dist/types/form-item-types/radio-group.d.ts +0 -17
- package/dist/types/form-item-types/rate.d.ts +0 -30
- package/dist/types/form-item-types/select-v2.d.ts +0 -47
- package/dist/types/form-item-types/select.d.ts +0 -43
- package/dist/types/form-item-types/slider.d.ts +0 -31
- package/dist/types/form-item-types/switch.d.ts +0 -14
- package/dist/types/form-item-types/time-picker.d.ts +0 -41
- package/dist/types/form-item-types/time-select.d.ts +0 -30
- package/dist/types/renderer.d.ts +0 -9
- package/dist/types/shims-vue-property.d.ts +0 -7
- package/dist/types/shims-vue.d.ts +0 -7
- 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
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
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
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
*
|
|
12
|
-
|
|
13
|
-
|
|
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
|
-
|
|
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
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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
|
|
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
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
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
|
-
|
|
3
|
-
|
|
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
|
-
*
|
|
5
|
-
* @
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
*
|
|
34
|
-
* @param
|
|
35
|
-
* @param
|
|
36
|
-
* @
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
*
|
|
42
|
-
* @param
|
|
43
|
-
* @param
|
|
44
|
-
* @
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
*
|
|
50
|
-
* @param
|
|
51
|
-
* @param
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
*
|
|
61
|
-
* @param {Array}
|
|
62
|
-
* @param {
|
|
63
|
-
* @
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
*
|
|
73
|
-
* @
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
export declare const
|
|
77
|
-
export declare const
|
|
78
|
-
export declare const
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
*
|
|
82
|
-
* @param
|
|
83
|
-
* @
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
*
|
|
89
|
-
* @param
|
|
90
|
-
* @
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
*
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
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 {};
|