@juzhenfe/page-model 3.16.7 → 3.17.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/components/column-filter-tools/index.vue.d.ts +2 -0
- package/dist/components/column-sort-tools/index.vue.d.ts +2 -0
- package/dist/components/line-clamp-tools/index.vue.d.ts +2 -0
- package/dist/components/page-model/constructor.d.ts +7 -2
- package/dist/components/page-model/type.d.ts +12 -1
- package/dist/components/simple-popover/index.vue.d.ts +2 -0
- package/dist/components/table/components/context-column-summary/index.vue.d.ts +102 -0
- package/dist/components/table/components/context-menu/index.vue.d.ts +14 -6
- package/dist/components/table/components/table-column/index.vue.d.ts +2 -0
- package/dist/components/table/type.d.ts +26 -6
- package/dist/components/table/utils/use-static-summary.d.ts +17 -1
- package/dist/components/table/utils/use-table-config-change.d.ts +2 -2
- package/dist/index.es.js +533 -321
- package/dist/index.min.css +1 -1
- package/dist/index.umd.js +3 -3
- package/package.json +1 -1
|
@@ -59,6 +59,8 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
59
59
|
props: any;
|
|
60
60
|
emit: (event: "closed", ...args: any[]) => void;
|
|
61
61
|
visible: import("vue").Ref<boolean>;
|
|
62
|
+
isShow: import("vue").Ref<boolean>;
|
|
63
|
+
_debounceUpdateShow: (...rest: any[]) => void;
|
|
62
64
|
currentTriggerElement: HTMLElement;
|
|
63
65
|
popoverRectInfo: import("vue").Ref<any>;
|
|
64
66
|
getPopoverTriggerElementRectInfo: (element: HTMLElement) => void;
|
|
@@ -58,6 +58,8 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
58
58
|
props: any;
|
|
59
59
|
emit: (event: "closed", ...args: any[]) => void;
|
|
60
60
|
visible: import("vue").Ref<boolean>;
|
|
61
|
+
isShow: import("vue").Ref<boolean>;
|
|
62
|
+
_debounceUpdateShow: (...rest: any[]) => void;
|
|
61
63
|
currentTriggerElement: HTMLElement;
|
|
62
64
|
popoverRectInfo: import("vue").Ref<any>;
|
|
63
65
|
getPopoverTriggerElementRectInfo: (element: HTMLElement) => void;
|
|
@@ -38,6 +38,8 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
38
38
|
props: any;
|
|
39
39
|
emit: (event: "closed", ...args: any[]) => void;
|
|
40
40
|
visible: import("vue").Ref<boolean>;
|
|
41
|
+
isShow: import("vue").Ref<boolean>;
|
|
42
|
+
_debounceUpdateShow: (...rest: any[]) => void;
|
|
41
43
|
currentTriggerElement: HTMLElement;
|
|
42
44
|
popoverRectInfo: import("vue").Ref<any>;
|
|
43
45
|
getPopoverTriggerElementRectInfo: (element: HTMLElement) => void;
|
|
@@ -66,10 +66,15 @@ export default class PageModelManager extends Reflections {
|
|
|
66
66
|
registerChildManager(managerName: any, manager: TableManager | SearchFormManager | TopTabsManager | FormManager): void;
|
|
67
67
|
handleSubmit(): Promise<boolean>;
|
|
68
68
|
doGetDataRequest(): Promise<boolean>;
|
|
69
|
-
|
|
69
|
+
/**
|
|
70
|
+
* 处理表格数据
|
|
71
|
+
* @param reqResult
|
|
72
|
+
* @returns
|
|
73
|
+
*/
|
|
74
|
+
proceessResult(reqResult: any): Promise<{
|
|
70
75
|
total: number;
|
|
71
76
|
list: any[];
|
|
72
|
-
}
|
|
77
|
+
}>;
|
|
73
78
|
treeResult(list: any[]): any[];
|
|
74
79
|
getListReqData(): AnyObject;
|
|
75
80
|
/**
|
|
@@ -28,6 +28,11 @@ declare global {
|
|
|
28
28
|
list: any[];
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
+
/**
|
|
32
|
+
* 可能返回promise的函数
|
|
33
|
+
*/
|
|
34
|
+
type MayBeAPromiseFn<T extends (...args: any[]) => any> = T | ((...args: Parameters<T>) => Promise<ReturnType<T>>)
|
|
35
|
+
|
|
31
36
|
type PatchConfigFn = {
|
|
32
37
|
(this: PageModelManager, config: PageModel.Config | PageModel.UConfig): PageModel.Config | PageModel.UConfig
|
|
33
38
|
}
|
|
@@ -100,10 +105,16 @@ declare global {
|
|
|
100
105
|
* 获取的其他参数
|
|
101
106
|
*/
|
|
102
107
|
otherParams?: AnyObject;
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* 列表接口请求前回调
|
|
111
|
+
*/
|
|
112
|
+
beforeGetRequest?: (this: PageModelManager, reqParams: AnyObject) => void;
|
|
113
|
+
|
|
103
114
|
/**
|
|
104
115
|
* 获取的数据拿取方式(处理不同请求返回数据列表的方法)
|
|
105
116
|
*/
|
|
106
|
-
getReqResultProcessFn?: GetReqResultProcessFn<PageModelManager
|
|
117
|
+
getReqResultProcessFn?: MayBeAPromiseFn<GetReqResultProcessFn<PageModelManager>>
|
|
107
118
|
|
|
108
119
|
/**
|
|
109
120
|
* 请求参数回调处理
|
|
@@ -18,6 +18,8 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
18
18
|
props: any;
|
|
19
19
|
emit: (event: "closed", ...args: any[]) => void;
|
|
20
20
|
visible: import("vue").Ref<boolean>;
|
|
21
|
+
isShow: import("vue").Ref<boolean>;
|
|
22
|
+
_debounceUpdateShow: (...rest: any[]) => void;
|
|
21
23
|
currentTriggerElement: HTMLElement;
|
|
22
24
|
popoverRectInfo: import("vue").Ref<any>;
|
|
23
25
|
getPopoverTriggerElementRectInfo: (element: HTMLElement) => void;
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { SummaryTypeEnum } from "../../utils/use-static-summary";
|
|
2
|
+
declare const _sfc_main: import("vue").DefineComponent<{
|
|
3
|
+
els: {
|
|
4
|
+
type: ArrayConstructor;
|
|
5
|
+
required: true;
|
|
6
|
+
};
|
|
7
|
+
}, {
|
|
8
|
+
props: any;
|
|
9
|
+
emit: (event: "save-columns", ...args: any[]) => void;
|
|
10
|
+
simplePopoverRef: import("vue").Ref<any>;
|
|
11
|
+
currentColumnProp: import("vue").Ref<string>;
|
|
12
|
+
currentColumnConfig: import("vue").Ref<any>;
|
|
13
|
+
options: {
|
|
14
|
+
label: string;
|
|
15
|
+
value: SummaryTypeEnum;
|
|
16
|
+
}[];
|
|
17
|
+
show: (event: MouseEvent, columnProp: string) => void;
|
|
18
|
+
hide: () => void;
|
|
19
|
+
handleItemClick: (summaryType: SummaryTypeEnum) => void;
|
|
20
|
+
SimplePopover: import("vue").DefineComponent<{
|
|
21
|
+
width: {
|
|
22
|
+
type: NumberConstructor;
|
|
23
|
+
required: false;
|
|
24
|
+
default: number;
|
|
25
|
+
};
|
|
26
|
+
placement: {
|
|
27
|
+
type: StringConstructor;
|
|
28
|
+
/**
|
|
29
|
+
* 组件实例
|
|
30
|
+
*/
|
|
31
|
+
required: false;
|
|
32
|
+
default: string;
|
|
33
|
+
};
|
|
34
|
+
zIndex: {
|
|
35
|
+
type: NumberConstructor;
|
|
36
|
+
required: false;
|
|
37
|
+
};
|
|
38
|
+
}, {
|
|
39
|
+
BEMSpace: string;
|
|
40
|
+
props: any;
|
|
41
|
+
emit: (event: "closed", ...args: any[]) => void;
|
|
42
|
+
visible: import("vue").Ref<boolean>;
|
|
43
|
+
isShow: import("vue").Ref<boolean>;
|
|
44
|
+
_debounceUpdateShow: (...rest: any[]) => void;
|
|
45
|
+
currentTriggerElement: HTMLElement;
|
|
46
|
+
popoverRectInfo: import("vue").Ref<any>;
|
|
47
|
+
getPopoverTriggerElementRectInfo: (element: HTMLElement) => void;
|
|
48
|
+
popoverRef: import("vue").Ref<HTMLElement>;
|
|
49
|
+
popoverElementRect: import("vue").Ref<DOMRect>;
|
|
50
|
+
getPopoverElementRect: () => void;
|
|
51
|
+
popoverStyle: import("vue").ComputedRef<{
|
|
52
|
+
top?: undefined;
|
|
53
|
+
left?: undefined;
|
|
54
|
+
width?: undefined;
|
|
55
|
+
} | {
|
|
56
|
+
top: string;
|
|
57
|
+
left: string;
|
|
58
|
+
width: string;
|
|
59
|
+
}>;
|
|
60
|
+
isChildElement: (rootElement: HTMLElement, childElement: HTMLElement) => boolean;
|
|
61
|
+
isPopperChildElement: (element: HTMLElement) => boolean;
|
|
62
|
+
handleClickElement: (e: Event) => void;
|
|
63
|
+
handleResize: (...rest: any[]) => void;
|
|
64
|
+
bindEvent: () => void;
|
|
65
|
+
unbindEvent: () => void;
|
|
66
|
+
hide: () => void;
|
|
67
|
+
getZIndex: () => any;
|
|
68
|
+
show: (element: HTMLElement | DOMRect) => void;
|
|
69
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "closed"[], "closed", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
70
|
+
width: {
|
|
71
|
+
type: NumberConstructor;
|
|
72
|
+
required: false;
|
|
73
|
+
default: number;
|
|
74
|
+
};
|
|
75
|
+
placement: {
|
|
76
|
+
type: StringConstructor;
|
|
77
|
+
/**
|
|
78
|
+
* 组件实例
|
|
79
|
+
*/
|
|
80
|
+
required: false;
|
|
81
|
+
default: string;
|
|
82
|
+
};
|
|
83
|
+
zIndex: {
|
|
84
|
+
type: NumberConstructor;
|
|
85
|
+
required: false;
|
|
86
|
+
};
|
|
87
|
+
}>> & {
|
|
88
|
+
onClosed?: (...args: any[]) => any;
|
|
89
|
+
}, {
|
|
90
|
+
width: number;
|
|
91
|
+
placement: string;
|
|
92
|
+
}, {}>;
|
|
93
|
+
readonly Select: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>;
|
|
94
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "save-columns"[], "save-columns", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
95
|
+
els: {
|
|
96
|
+
type: ArrayConstructor;
|
|
97
|
+
required: true;
|
|
98
|
+
};
|
|
99
|
+
}>> & {
|
|
100
|
+
"onSave-columns"?: (...args: any[]) => any;
|
|
101
|
+
}, {}, {}>;
|
|
102
|
+
export default _sfc_main;
|
|
@@ -14,18 +14,21 @@ declare const _sfc_main: import("vue").DefineComponent<{}, {
|
|
|
14
14
|
handleItemClick: (item: any, index: number) => void;
|
|
15
15
|
SimplePopover: import("vue").DefineComponent<{
|
|
16
16
|
width: {
|
|
17
|
+
/**
|
|
18
|
+
* 当前渲染的按钮
|
|
19
|
+
*/
|
|
17
20
|
type: NumberConstructor;
|
|
18
21
|
required: false;
|
|
19
22
|
default: number;
|
|
20
23
|
};
|
|
21
24
|
placement: {
|
|
22
|
-
/**
|
|
23
|
-
* 按钮数量
|
|
24
|
-
*/
|
|
25
25
|
type: StringConstructor;
|
|
26
26
|
required: false;
|
|
27
27
|
default: string;
|
|
28
28
|
};
|
|
29
|
+
/**
|
|
30
|
+
* 按钮数量变化
|
|
31
|
+
*/
|
|
29
32
|
zIndex: {
|
|
30
33
|
type: NumberConstructor;
|
|
31
34
|
required: false;
|
|
@@ -35,6 +38,8 @@ declare const _sfc_main: import("vue").DefineComponent<{}, {
|
|
|
35
38
|
props: any;
|
|
36
39
|
emit: (event: "closed", ...args: any[]) => void;
|
|
37
40
|
visible: import("vue").Ref<boolean>;
|
|
41
|
+
isShow: import("vue").Ref<boolean>;
|
|
42
|
+
_debounceUpdateShow: (...rest: any[]) => void;
|
|
38
43
|
currentTriggerElement: HTMLElement;
|
|
39
44
|
popoverRectInfo: import("vue").Ref<any>;
|
|
40
45
|
getPopoverTriggerElementRectInfo: (element: HTMLElement) => void;
|
|
@@ -61,18 +66,21 @@ declare const _sfc_main: import("vue").DefineComponent<{}, {
|
|
|
61
66
|
show: (element: HTMLElement | DOMRect) => void;
|
|
62
67
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "closed"[], "closed", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
63
68
|
width: {
|
|
69
|
+
/**
|
|
70
|
+
* 当前渲染的按钮
|
|
71
|
+
*/
|
|
64
72
|
type: NumberConstructor;
|
|
65
73
|
required: false;
|
|
66
74
|
default: number;
|
|
67
75
|
};
|
|
68
76
|
placement: {
|
|
69
|
-
/**
|
|
70
|
-
* 按钮数量
|
|
71
|
-
*/
|
|
72
77
|
type: StringConstructor;
|
|
73
78
|
required: false;
|
|
74
79
|
default: string;
|
|
75
80
|
};
|
|
81
|
+
/**
|
|
82
|
+
* 按钮数量变化
|
|
83
|
+
*/
|
|
76
84
|
zIndex: {
|
|
77
85
|
type: NumberConstructor;
|
|
78
86
|
required: false;
|
|
@@ -173,6 +173,8 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
173
173
|
props: any;
|
|
174
174
|
emit: (event: "closed", ...args: any[]) => void;
|
|
175
175
|
visible: import("vue").Ref<boolean>;
|
|
176
|
+
isShow: import("vue").Ref<boolean>;
|
|
177
|
+
_debounceUpdateShow: (...rest: any[]) => void;
|
|
176
178
|
currentTriggerElement: HTMLElement;
|
|
177
179
|
popoverRectInfo: import("vue").Ref<any>;
|
|
178
180
|
getPopoverTriggerElementRectInfo: (element: HTMLElement) => void;
|
|
@@ -8,6 +8,7 @@ import {
|
|
|
8
8
|
type FilterItemTypeEnum,
|
|
9
9
|
type FilterMatchModeEnum,
|
|
10
10
|
} from './components/table-column/components/filter-zone/utils'
|
|
11
|
+
import { SummaryTypeEnum } from './utils/use-static-summary'
|
|
11
12
|
|
|
12
13
|
declare global {
|
|
13
14
|
namespace PageModel {
|
|
@@ -208,14 +209,23 @@ declare global {
|
|
|
208
209
|
showRadio?: boolean
|
|
209
210
|
// 是否可编辑
|
|
210
211
|
editable?: boolean
|
|
211
|
-
|
|
212
|
-
|
|
212
|
+
|
|
213
|
+
/**
|
|
214
|
+
* 是否开启服务端汇总
|
|
215
|
+
*/
|
|
216
|
+
useServerSummary?: boolean
|
|
217
|
+
|
|
218
|
+
/**
|
|
219
|
+
* 服务端汇总请求方法
|
|
220
|
+
*/
|
|
221
|
+
serverSummaryFn?: (this: TableManager, summaryColumns: { prop: string, showSummary: SummaryTypeEnum }[], reqParams: AnyObject, columns: any[]) => Promise<any[]>
|
|
222
|
+
|
|
213
223
|
/**
|
|
214
|
-
*
|
|
224
|
+
* 汇总过程处理,对每项进行处理
|
|
215
225
|
* @param this
|
|
216
226
|
* @param data 数据列表
|
|
217
227
|
* @param prop 当前列表的prop
|
|
218
|
-
* @param summaryType 合计类型 1累加 2
|
|
228
|
+
* @param summaryType 合计类型 1累加 2总数
|
|
219
229
|
* @returns
|
|
220
230
|
*/
|
|
221
231
|
summaryItemFn?: (
|
|
@@ -224,9 +234,19 @@ declare global {
|
|
|
224
234
|
prop: string,
|
|
225
235
|
summaryType: number
|
|
226
236
|
) => any
|
|
227
|
-
|
|
237
|
+
|
|
238
|
+
/**
|
|
239
|
+
* @param rest 汇总结果处理
|
|
240
|
+
* @returns
|
|
241
|
+
*/
|
|
242
|
+
summaryProcessFn?: (this: any, summaryValue: any) => any
|
|
243
|
+
/**
|
|
244
|
+
* 本地筛选工具
|
|
245
|
+
*/
|
|
228
246
|
showStaticFilter?: boolean
|
|
229
|
-
|
|
247
|
+
/**
|
|
248
|
+
* 保存筛选到本地
|
|
249
|
+
*/
|
|
230
250
|
saveStaticFilter?: boolean
|
|
231
251
|
|
|
232
252
|
/**
|
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* 使用用户配置的汇总
|
|
3
3
|
*/
|
|
4
|
-
import TableManager from
|
|
4
|
+
import TableManager from '../constructor';
|
|
5
|
+
import EventEmitter from '../../../utils/event-emitter';
|
|
6
|
+
/**
|
|
7
|
+
* 用户汇总配置修改事件
|
|
8
|
+
*/
|
|
9
|
+
declare const userSummaryConfigEmiter: EventEmitter<"change">;
|
|
10
|
+
export { userSummaryConfigEmiter };
|
|
11
|
+
export declare enum SummaryTypeEnum {
|
|
12
|
+
不展示 = 0,
|
|
13
|
+
求和 = 1,
|
|
14
|
+
总数 = 2
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* 使用用户配置的汇总
|
|
18
|
+
* @param tableManager
|
|
19
|
+
* @returns
|
|
20
|
+
*/
|
|
5
21
|
export declare function useUserSummary(tableManager: TableManager): boolean;
|
|
@@ -5,5 +5,5 @@ import EventEmitter from '../../../utils/event-emitter';
|
|
|
5
5
|
/**
|
|
6
6
|
* 表格配置修改事件
|
|
7
7
|
*/
|
|
8
|
-
declare const
|
|
9
|
-
export {
|
|
8
|
+
declare const tableUserConfigChangeEmiter: EventEmitter<"change">;
|
|
9
|
+
export { tableUserConfigChangeEmiter };
|