@juzhenfe/page-model 3.14.4 → 3.14.5
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-sort-tools/index.vue.d.ts +138 -0
- package/dist/components/table/constructor.d.ts +24 -3
- package/dist/components/table/type.d.ts +27 -5
- package/dist/components/table/utils/save-column-sort.d.ts +2 -0
- package/dist/components/table-toolsbox/index.vue.d.ts +7 -0
- package/dist/index.es.js +742 -333
- package/dist/index.min.css +1 -1
- package/dist/index.umd.js +3 -3
- package/package.json +1 -1
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
declare const _sfc_main: import("vue").DefineComponent<{
|
|
2
|
+
manager: {
|
|
3
|
+
type: any;
|
|
4
|
+
required: false;
|
|
5
|
+
};
|
|
6
|
+
}, {
|
|
7
|
+
props: any;
|
|
8
|
+
emit: (event: "screen", ...args: any[]) => void;
|
|
9
|
+
BEMSpace: string;
|
|
10
|
+
createBEMName: (name: string) => string;
|
|
11
|
+
columnFieldList: import("vue").Ref<{
|
|
12
|
+
prop: string;
|
|
13
|
+
label: string;
|
|
14
|
+
}[]>;
|
|
15
|
+
filterList: import("vue").Ref<{
|
|
16
|
+
prop: string;
|
|
17
|
+
order?: PageModel.SortOption;
|
|
18
|
+
label?: string;
|
|
19
|
+
}[]>;
|
|
20
|
+
usedFieldList: import("vue").ComputedRef<string[]>;
|
|
21
|
+
filterKeywords: import("vue").Ref<string>;
|
|
22
|
+
filterColumnList: import("vue").ComputedRef<{
|
|
23
|
+
prop: string;
|
|
24
|
+
label: string;
|
|
25
|
+
}[]>;
|
|
26
|
+
simplePopoverRef: import("vue").Ref<any>;
|
|
27
|
+
showPopover: (element: HTMLElement) => void;
|
|
28
|
+
hidePopover: () => void;
|
|
29
|
+
getAddFilterItem: (field: string) => PageModel.TableColumnSortParamsItem;
|
|
30
|
+
handleFieldChange: (index: number, prop: string) => void;
|
|
31
|
+
handleSelectSortItem: (item: PageModel.TableColumnSortParamsItem, sortValue: PageModel.SortOption) => void;
|
|
32
|
+
handleClickSelect: (addProp: string) => void;
|
|
33
|
+
handleRemoveItem: (index: number) => void;
|
|
34
|
+
handleClear: () => void;
|
|
35
|
+
handleScreen: () => void;
|
|
36
|
+
SimplePopover: import("vue").DefineComponent<{
|
|
37
|
+
width: {
|
|
38
|
+
type: NumberConstructor;
|
|
39
|
+
required: false;
|
|
40
|
+
default: number;
|
|
41
|
+
};
|
|
42
|
+
placement: {
|
|
43
|
+
type: StringConstructor;
|
|
44
|
+
required: false;
|
|
45
|
+
default: string;
|
|
46
|
+
};
|
|
47
|
+
}, {
|
|
48
|
+
BEMSpace: string;
|
|
49
|
+
props: any;
|
|
50
|
+
nextZIndex: () => number;
|
|
51
|
+
visible: import("vue").Ref<boolean>;
|
|
52
|
+
isRender: import("vue").Ref<boolean>;
|
|
53
|
+
currentTriggerElement: HTMLElement;
|
|
54
|
+
popoverRectInfo: import("vue").Ref<any>;
|
|
55
|
+
getPopoverTriggerElementRectInfo: (element: HTMLElement) => void;
|
|
56
|
+
popoverRef: import("vue").Ref<HTMLElement>;
|
|
57
|
+
popoverStyle: import("vue").ComputedRef<{
|
|
58
|
+
top?: undefined;
|
|
59
|
+
left?: undefined;
|
|
60
|
+
width?: undefined;
|
|
61
|
+
} | {
|
|
62
|
+
top: string;
|
|
63
|
+
left: string;
|
|
64
|
+
width: string;
|
|
65
|
+
}>;
|
|
66
|
+
isChildElement: (rootElement: HTMLElement, childElement: HTMLElement) => boolean;
|
|
67
|
+
isPopperChildElement: (element: HTMLElement) => boolean;
|
|
68
|
+
handleHide: (e: Event) => void;
|
|
69
|
+
handleResize: (...rest: any[]) => void;
|
|
70
|
+
hide: () => void;
|
|
71
|
+
zIndex: import("vue").Ref<number>;
|
|
72
|
+
show: (element: HTMLElement) => void;
|
|
73
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
74
|
+
width: {
|
|
75
|
+
type: NumberConstructor;
|
|
76
|
+
required: false;
|
|
77
|
+
default: number;
|
|
78
|
+
};
|
|
79
|
+
placement: {
|
|
80
|
+
type: StringConstructor;
|
|
81
|
+
required: false;
|
|
82
|
+
default: string;
|
|
83
|
+
};
|
|
84
|
+
}>>, {
|
|
85
|
+
width: number;
|
|
86
|
+
placement: string;
|
|
87
|
+
}, {}>;
|
|
88
|
+
readonly Plus: 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<{}>>, {}, {}>;
|
|
89
|
+
readonly Remove: 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<{}>>, {}, {}>;
|
|
90
|
+
DraggableList: import("vue").DefineComponent<{
|
|
91
|
+
modelValue: {
|
|
92
|
+
type: ArrayConstructor;
|
|
93
|
+
required: true;
|
|
94
|
+
};
|
|
95
|
+
itemKey: {
|
|
96
|
+
type: StringConstructor;
|
|
97
|
+
required: false;
|
|
98
|
+
};
|
|
99
|
+
itemClassName: {
|
|
100
|
+
type: StringConstructor;
|
|
101
|
+
required: false;
|
|
102
|
+
};
|
|
103
|
+
}, {
|
|
104
|
+
props: any;
|
|
105
|
+
reRerender: import("vue").Ref<boolean>;
|
|
106
|
+
isNeedForceUpdate: import("vue").ComputedRef<boolean>;
|
|
107
|
+
emit: (event: "update:modelValue", ...args: any[]) => void;
|
|
108
|
+
listWrapRef: import("vue").Ref<any>;
|
|
109
|
+
sortable: any;
|
|
110
|
+
initSort: () => void;
|
|
111
|
+
destroy: () => void;
|
|
112
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
113
|
+
modelValue: {
|
|
114
|
+
type: ArrayConstructor;
|
|
115
|
+
required: true;
|
|
116
|
+
};
|
|
117
|
+
itemKey: {
|
|
118
|
+
type: StringConstructor;
|
|
119
|
+
required: false;
|
|
120
|
+
};
|
|
121
|
+
itemClassName: {
|
|
122
|
+
type: StringConstructor;
|
|
123
|
+
required: false;
|
|
124
|
+
};
|
|
125
|
+
}>> & {
|
|
126
|
+
"onUpdate:modelValue"?: (...args: any[]) => any;
|
|
127
|
+
}, {}, {}>;
|
|
128
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "screen"[], "screen", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
129
|
+
manager: {
|
|
130
|
+
type: any;
|
|
131
|
+
required: false;
|
|
132
|
+
};
|
|
133
|
+
}>> & {
|
|
134
|
+
onScreen?: (...args: any[]) => any;
|
|
135
|
+
}, {
|
|
136
|
+
manager: any;
|
|
137
|
+
}, {}>;
|
|
138
|
+
export default _sfc_main;
|
|
@@ -30,13 +30,21 @@ export default class TableManager extends IManager {
|
|
|
30
30
|
sortParams: AnyObject;
|
|
31
31
|
constructor(config?: PageModel.Table);
|
|
32
32
|
/**
|
|
33
|
-
*
|
|
33
|
+
* 是否已经初始化列筛选参数
|
|
34
34
|
*/
|
|
35
35
|
private isInitColumnParams;
|
|
36
36
|
/**
|
|
37
|
-
*
|
|
37
|
+
* 获取本地的表格的列筛选参数
|
|
38
38
|
*/
|
|
39
39
|
initColumnParams(): boolean;
|
|
40
|
+
/**
|
|
41
|
+
* 是否已经初始化列筛选参数
|
|
42
|
+
*/
|
|
43
|
+
private isInitColumnSortParams;
|
|
44
|
+
/**
|
|
45
|
+
* 获取本地的表格的列筛选参数
|
|
46
|
+
*/
|
|
47
|
+
initColumnSortParams(): boolean;
|
|
40
48
|
get table(): PageModel.Table<AnyObject, TableManager>;
|
|
41
49
|
/**
|
|
42
50
|
* config配置的rowKey
|
|
@@ -61,10 +69,11 @@ export default class TableManager extends IManager {
|
|
|
61
69
|
*/
|
|
62
70
|
getReqParams(): any;
|
|
63
71
|
/**
|
|
64
|
-
*
|
|
72
|
+
* 列筛选参数
|
|
65
73
|
*/
|
|
66
74
|
columnParamsList: PageModel.TableColumnParamsItem[];
|
|
67
75
|
/**
|
|
76
|
+
* 返回对象,每列是否配置了筛选
|
|
68
77
|
* key是否配置参数
|
|
69
78
|
*/
|
|
70
79
|
get columnParamsKey(): {};
|
|
@@ -76,6 +85,18 @@ export default class TableManager extends IManager {
|
|
|
76
85
|
* 获取每列的参数
|
|
77
86
|
*/
|
|
78
87
|
getColumnParams(): any;
|
|
88
|
+
/**
|
|
89
|
+
* 列排序参数
|
|
90
|
+
*/
|
|
91
|
+
columnSortParamsList: PageModel.TableColumnSortParamsItem[];
|
|
92
|
+
/**
|
|
93
|
+
* 是否开启排序功能
|
|
94
|
+
*/
|
|
95
|
+
get isColumnSort(): boolean;
|
|
96
|
+
/**
|
|
97
|
+
* 获取每列的排序参数
|
|
98
|
+
*/
|
|
99
|
+
getColumnSortParams(): any;
|
|
79
100
|
refreshPage(): void;
|
|
80
101
|
onConfigUpdated(): void;
|
|
81
102
|
updateByConfig(): void;
|
|
@@ -50,6 +50,17 @@ declare global {
|
|
|
50
50
|
value?: any;
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
+
type SortOption = 'ascending' | 'descending' | null
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* 列排序参数
|
|
57
|
+
*/
|
|
58
|
+
type TableColumnSortParamsItem = {
|
|
59
|
+
prop: string;
|
|
60
|
+
order?: SortOption;
|
|
61
|
+
label?: string;
|
|
62
|
+
}
|
|
63
|
+
|
|
53
64
|
type TableProps = {
|
|
54
65
|
size?: Size;
|
|
55
66
|
border?: boolean;
|
|
@@ -91,8 +102,6 @@ declare global {
|
|
|
91
102
|
_customSummary?: boolean;
|
|
92
103
|
}
|
|
93
104
|
|
|
94
|
-
type SortOption = 'ascending' | 'descending' | null
|
|
95
|
-
|
|
96
105
|
type TableEvents<MODEL = any> = {
|
|
97
106
|
select?: (selection: any[], row: MODEL) => void;
|
|
98
107
|
selectAll?: (selection: any[]) => void;
|
|
@@ -125,14 +134,23 @@ declare global {
|
|
|
125
134
|
dragable?: boolean;
|
|
126
135
|
|
|
127
136
|
/**
|
|
128
|
-
*
|
|
137
|
+
* 是否保存列筛选
|
|
129
138
|
*/
|
|
130
139
|
saveFilter?: boolean;
|
|
131
140
|
|
|
141
|
+
/**
|
|
142
|
+
* 是否保存列排序
|
|
143
|
+
*/
|
|
144
|
+
saveSort?: boolean;
|
|
145
|
+
|
|
132
146
|
/**
|
|
133
147
|
* 显示工具列
|
|
134
148
|
*/
|
|
135
149
|
showTools?: boolean;
|
|
150
|
+
/**
|
|
151
|
+
* 是否显示汇总
|
|
152
|
+
*/
|
|
153
|
+
showSummary?: boolean;
|
|
136
154
|
/**
|
|
137
155
|
* 显示索引列
|
|
138
156
|
*/
|
|
@@ -200,7 +218,7 @@ declare global {
|
|
|
200
218
|
/**
|
|
201
219
|
* 工具箱
|
|
202
220
|
*/
|
|
203
|
-
toolbox?: ('export' | 'fullscreen' | 'colunm-tool' | 'filter')[]
|
|
221
|
+
toolbox?: ('export' | 'fullscreen' | 'colunm-tool' | 'filter' | 'sort')[]
|
|
204
222
|
|
|
205
223
|
/**
|
|
206
224
|
* 工具栏显示模式
|
|
@@ -218,11 +236,15 @@ declare global {
|
|
|
218
236
|
/**
|
|
219
237
|
* 列筛选参数处理函数
|
|
220
238
|
*/
|
|
221
|
-
columnParamsProcessFn?: (this: TableManager, paramsList: PageModel.TableColumnParamsItem[]) =>
|
|
239
|
+
columnParamsProcessFn?: (this: TableManager, paramsList: PageModel.TableColumnParamsItem[]) => unknown
|
|
222
240
|
/**
|
|
223
241
|
* 列筛选参数查询立即执行
|
|
224
242
|
*/
|
|
225
243
|
columnParamsQueryImmediate?: boolean;
|
|
244
|
+
/**
|
|
245
|
+
* 列排序参数处理函数
|
|
246
|
+
*/
|
|
247
|
+
columnSortParamsProcessFn?: (this: TableManager, sortParamsList: PageModel.TableColumnSortParamsItem[]) => unknown
|
|
226
248
|
}
|
|
227
249
|
}
|
|
228
250
|
}
|
|
@@ -48,6 +48,13 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
48
48
|
desc: string;
|
|
49
49
|
bg: boolean;
|
|
50
50
|
};
|
|
51
|
+
sort: {
|
|
52
|
+
icon: 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<{}>>, {}, {}>;
|
|
53
|
+
text: string;
|
|
54
|
+
event: string;
|
|
55
|
+
desc: string;
|
|
56
|
+
bg: boolean;
|
|
57
|
+
};
|
|
51
58
|
};
|
|
52
59
|
showToolbox: import("vue").ComputedRef<any>;
|
|
53
60
|
handleClickTool: (index: number, e: Event) => void;
|