@lx-frontend/wrap-element-ui 1.0.0-beta.5 → 1.0.0-beta.6

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.
@@ -0,0 +1,31 @@
1
+ declare const _default: import('vue').DefineComponent<{
2
+ /** 成员数据 */
3
+ technicianOptions: ArrayConstructor;
4
+ /** 获取数据加载中 */
5
+ fetchTechniciansLoading: BooleanConstructor;
6
+ /** 弹窗标题 */
7
+ title: {
8
+ type: StringConstructor;
9
+ default: string;
10
+ };
11
+ }, {}, {
12
+ techniciansSearchQuery: string;
13
+ }, {}, {
14
+ handleCloseTechniciansSelectPopup(show: any): void;
15
+ handleInputTechniciansSearch(query: any): void;
16
+ handleAddTechnician(id: any, item: any): void;
17
+ }, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, Readonly<import('vue').ExtractPropTypes<{
18
+ /** 成员数据 */
19
+ technicianOptions: ArrayConstructor;
20
+ /** 获取数据加载中 */
21
+ fetchTechniciansLoading: BooleanConstructor;
22
+ /** 弹窗标题 */
23
+ title: {
24
+ type: StringConstructor;
25
+ default: string;
26
+ };
27
+ }>>, {
28
+ fetchTechniciansLoading: boolean;
29
+ title: string;
30
+ }>;
31
+ export default _default;
@@ -0,0 +1,46 @@
1
+ declare const _default: import('vue').DefineComponent<{
2
+ candidates: {
3
+ type: ArrayConstructor;
4
+ };
5
+ value: {
6
+ type: ArrayConstructor;
7
+ default(): never[];
8
+ };
9
+ maxSelect: {
10
+ type: NumberConstructor;
11
+ default: number;
12
+ };
13
+ stepNum: {
14
+ type: NumberConstructor;
15
+ default: number;
16
+ };
17
+ }, {}, {}, {
18
+ isAdd(): boolean;
19
+ }, {
20
+ syncSteps(modification: any): void;
21
+ handleEditCandidate(val: any, index: any): void;
22
+ handleDeleteStep(i: any): void;
23
+ handleAddStep(): void;
24
+ isValidateSteps(): boolean;
25
+ }, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, Readonly<import('vue').ExtractPropTypes<{
26
+ candidates: {
27
+ type: ArrayConstructor;
28
+ };
29
+ value: {
30
+ type: ArrayConstructor;
31
+ default(): never[];
32
+ };
33
+ maxSelect: {
34
+ type: NumberConstructor;
35
+ default: number;
36
+ };
37
+ stepNum: {
38
+ type: NumberConstructor;
39
+ default: number;
40
+ };
41
+ }>>, {
42
+ value: unknown[];
43
+ maxSelect: number;
44
+ stepNum: number;
45
+ }>;
46
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: import('vue').DefineComponent<{}, any, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, Readonly<import('vue').ExtractPropTypes<{}>>, {}>;
2
+ export default _default;
@@ -0,0 +1,291 @@
1
+ import { ITableDataItem, IColumnConfig, IDefaultOperationType, IColorList } from './types';
2
+
3
+ interface IProps {
4
+ /** 表格数据 */
5
+ dataList: ITableDataItem[];
6
+ /** 列配置 */
7
+ columnConfig: IColumnConfig[];
8
+ /** 是否展示展开行 */
9
+ hasExpandRow?: boolean;
10
+ /** 是否展示序号 */
11
+ hasIndexColumn?: boolean;
12
+ /** 是否展示选择列 */
13
+ hasSelectionColumn?: boolean;
14
+ /** 是否支持行拖拽 */
15
+ rowDragAble?: boolean;
16
+ /** 表格总条数 */
17
+ total: number;
18
+ /** 自定义列操作,当前支持行编辑(edit),删除(delete),置顶(top) */
19
+ defaultOperations?: IDefaultOperationType[];
20
+ /** 行背景色列表 */
21
+ colorList?: IColorList;
22
+ /** 左侧固定列数 */
23
+ leftFixedCount?: number;
24
+ /** 性能优化参数,调整拖拽的范围 */
25
+ dragSemiRange?: number;
26
+ /** 是否显示加载 */
27
+ loading?: boolean;
28
+ /** 是否隐藏显示设置按钮 */
29
+ hideViewSettingBtn?: boolean;
30
+ /** 设置的缓存的key */
31
+ settingStorgeKey?: string;
32
+ /** 前端排序,默认关闭 */
33
+ localSort?: boolean;
34
+ /** 前端过滤,默认关闭 */
35
+ localFilter?: boolean;
36
+ /** 页码 */
37
+ currentPage: number;
38
+ }
39
+ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<IProps>, {
40
+ dataList: () => never[];
41
+ columnConfig: () => never[];
42
+ hasExpandRow: boolean;
43
+ hasIndexColumn: boolean;
44
+ hasSelectionColumn: boolean;
45
+ rowDragAble: boolean;
46
+ total: number;
47
+ defaultOperations: () => never[];
48
+ colorList: () => never[];
49
+ leftFixedCount: number;
50
+ dragSemiRange: number;
51
+ loading: boolean;
52
+ hideViewSettingBtn: boolean;
53
+ settingStorgeKey: string;
54
+ localSort: boolean;
55
+ localFilter: boolean;
56
+ currentPage: number;
57
+ }>, {
58
+ closeAllExpandedRows: () => void;
59
+ openViewSetting: () => void;
60
+ elTableRef: any;
61
+ setSort: (params: {
62
+ order: "descending" | "ascending";
63
+ prop: string;
64
+ }) => void;
65
+ clearSort: () => void;
66
+ setSearchParams: (params: Record<string, any>) => void;
67
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
68
+ "selection-change": (selection: any) => void;
69
+ "row-bg-change": (param: {
70
+ colorId: number;
71
+ row: ITableDataItem;
72
+ rowIndex: number;
73
+ }) => void;
74
+ "row-drag-drop": (param: {
75
+ row: any;
76
+ fromIndex: number;
77
+ toIndex: number;
78
+ page: number;
79
+ size: number;
80
+ }) => void;
81
+ "row-delete": (param: {
82
+ row: any;
83
+ index: number;
84
+ page: number;
85
+ size: number;
86
+ }) => void;
87
+ "row-edit": (param: {
88
+ row: any;
89
+ index: number;
90
+ page: number;
91
+ size: number;
92
+ }) => void;
93
+ "row-pin-to-top": (param: {
94
+ row: any;
95
+ rawIndex: number;
96
+ page: number;
97
+ size: number;
98
+ }) => void;
99
+ "row-edit-save": (param: {
100
+ page: number;
101
+ size: number;
102
+ row: any;
103
+ changedData: Record<string, any>;
104
+ }) => void;
105
+ "row-edit-cancel": (param: {
106
+ row: any;
107
+ page: number;
108
+ size: number;
109
+ }) => void;
110
+ "page-change": (param: {
111
+ page: number;
112
+ size: number;
113
+ }) => void;
114
+ search: (param: Record<string, any>) => void;
115
+ "sort-change": (param: {
116
+ order: "descending" | "ascending" | null;
117
+ prop: string;
118
+ }) => void;
119
+ }, string, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<IProps>, {
120
+ dataList: () => never[];
121
+ columnConfig: () => never[];
122
+ hasExpandRow: boolean;
123
+ hasIndexColumn: boolean;
124
+ hasSelectionColumn: boolean;
125
+ rowDragAble: boolean;
126
+ total: number;
127
+ defaultOperations: () => never[];
128
+ colorList: () => never[];
129
+ leftFixedCount: number;
130
+ dragSemiRange: number;
131
+ loading: boolean;
132
+ hideViewSettingBtn: boolean;
133
+ settingStorgeKey: string;
134
+ localSort: boolean;
135
+ localFilter: boolean;
136
+ currentPage: number;
137
+ }>>>, {
138
+ colorList: IColorList;
139
+ hasExpandRow: boolean;
140
+ dataList: ITableDataItem[];
141
+ columnConfig: IColumnConfig[];
142
+ hasIndexColumn: boolean;
143
+ hasSelectionColumn: boolean;
144
+ rowDragAble: boolean;
145
+ total: number;
146
+ defaultOperations: IDefaultOperationType[];
147
+ leftFixedCount: number;
148
+ dragSemiRange: number;
149
+ loading: boolean;
150
+ hideViewSettingBtn: boolean;
151
+ settingStorgeKey: string;
152
+ localSort: boolean;
153
+ localFilter: boolean;
154
+ currentPage: number;
155
+ }>, Partial<Record<string, (_: {
156
+ [x: string]: any;
157
+ value: string | number;
158
+ text: string;
159
+ }) => any>> & Partial<Record<string, (_: {
160
+ [x: string]: any;
161
+ value: string | number;
162
+ text: string;
163
+ }) => any>> & Partial<Record<string, (_: {
164
+ [x: string]: any;
165
+ prop: string;
166
+ label: string;
167
+ editType?: import('./types').IEditType | undefined;
168
+ sortable?: boolean | undefined;
169
+ slotName?: string | undefined;
170
+ isAlwaysShow?: boolean | undefined;
171
+ defaultHide?: boolean | undefined;
172
+ search?: boolean | {
173
+ /** 行背景色列表 */
174
+ prop: string;
175
+ label: string;
176
+ validator?: ((value: string) => boolean) | undefined;
177
+ }[] | undefined;
178
+ summary?: boolean | undefined;
179
+ summaryMethod?: ((values: any[]) => string | number) | undefined;
180
+ filters?: {
181
+ type?: "checkbox" | "radio" | undefined;
182
+ options: {
183
+ [key: string]: any;
184
+ value: string | number;
185
+ text: string;
186
+ }[];
187
+ /** 是否展示展开行 */
188
+ default?: string | number | string[] | number[] | undefined;
189
+ } | {
190
+ [key: string]: any;
191
+ value: string | number;
192
+ text: string;
193
+ }[] | undefined;
194
+ } | {
195
+ [x: string]: any;
196
+ prop: string;
197
+ label: string;
198
+ editType?: import('./types').IEditType | undefined;
199
+ sortable?: boolean | undefined;
200
+ slotName?: string | undefined;
201
+ isAlwaysShow?: boolean | undefined;
202
+ defaultHide?: boolean | undefined;
203
+ search?: boolean | {
204
+ /** 行背景色列表 */
205
+ prop: string;
206
+ label: string;
207
+ validator?: ((value: string) => boolean) | undefined;
208
+ }[] | undefined;
209
+ summary?: boolean | undefined;
210
+ summaryMethod?: ((values: any[]) => string | number) | undefined;
211
+ filters?: {
212
+ type?: "checkbox" | "radio" | undefined;
213
+ options: {
214
+ [key: string]: any;
215
+ value: string | number;
216
+ text: string;
217
+ }[];
218
+ /** 是否展示展开行 */
219
+ default?: string | number | string[] | number[] | undefined;
220
+ } | {
221
+ [key: string]: any;
222
+ value: string | number;
223
+ text: string;
224
+ }[] | undefined;
225
+ inputType: string | number;
226
+ } | {
227
+ [x: string]: any;
228
+ prop: string;
229
+ label: string;
230
+ editType?: import('./types').IEditType | undefined;
231
+ sortable?: boolean | undefined;
232
+ slotName?: string | undefined;
233
+ isAlwaysShow?: boolean | undefined;
234
+ defaultHide?: boolean | undefined;
235
+ search?: boolean | {
236
+ /** 行背景色列表 */
237
+ prop: string;
238
+ label: string;
239
+ validator?: ((value: string) => boolean) | undefined;
240
+ }[] | undefined;
241
+ summary?: boolean | undefined;
242
+ summaryMethod?: ((values: any[]) => string | number) | undefined;
243
+ filters?: {
244
+ type?: "checkbox" | "radio" | undefined;
245
+ options: {
246
+ [key: string]: any;
247
+ value: string | number;
248
+ text: string;
249
+ }[];
250
+ /** 是否展示展开行 */
251
+ default?: string | number | string[] | number[] | undefined;
252
+ } | {
253
+ [key: string]: any;
254
+ value: string | number;
255
+ text: string;
256
+ }[] | undefined;
257
+ options: {
258
+ [key: string]: any;
259
+ key: string;
260
+ value: string | number;
261
+ }[];
262
+ }) => any>> & Partial<Record<string, (_: any) => any>> & Partial<Record<any, (_: {
263
+ scope: any;
264
+ column: IColumnConfig;
265
+ }) => any>> & Partial<Record<string, (_: any) => any>> & Partial<Record<any, (_: any) => any>> & Partial<Record<any, (_: any) => any>> & Partial<Record<string, (_: any) => any>> & {
266
+ expand?(_: any): any;
267
+ "custom-operation"?(_: any): any;
268
+ }>;
269
+ export default _default;
270
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
271
+ type __VLS_TypePropsToRuntimeProps<T> = {
272
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
273
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
274
+ } : {
275
+ type: import('vue').PropType<T[K]>;
276
+ required: true;
277
+ };
278
+ };
279
+ type __VLS_WithDefaults<P, D> = {
280
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
281
+ default: D[K];
282
+ }> : P[K];
283
+ };
284
+ type __VLS_Prettify<T> = {
285
+ [K in keyof T]: T[K];
286
+ } & {};
287
+ type __VLS_WithTemplateSlots<T, S> = T & {
288
+ new (): {
289
+ $scopedSlots: S;
290
+ };
291
+ };
@@ -0,0 +1,151 @@
1
+ export declare enum IEditType {
2
+ INPUT = "input",
3
+ SELECT = "select",
4
+ DATE_ONLY = "date"
5
+ }
6
+ export interface IColumnConfigRequired {
7
+ prop: string;
8
+ label: string;
9
+ editType?: IEditType;
10
+ sortable?: boolean;
11
+ slotName?: string;
12
+ isAlwaysShow?: boolean;
13
+ /** 默认隐藏,显示设置中,该列默认隐藏 */
14
+ defaultHide?: boolean;
15
+ /** 列是否允许搜索,true则表头弹窗会多一个搜索框,一列中有多个搜索字段时传数组进行配置 */
16
+ search?: boolean | ISearchOptions;
17
+ summary?: boolean;
18
+ summaryMethod?: (values: any[]) => string | number;
19
+ /** 过滤,传数组时默认复选框 */
20
+ filters?: {
21
+ type?: 'checkbox' | 'radio';
22
+ options: FiltersOption[];
23
+ default?: string | number | string[] | number[];
24
+ } | FiltersOption[];
25
+ [key: string]: any;
26
+ }
27
+ type FiltersOption = {
28
+ value: string | number;
29
+ text: string;
30
+ [key: string]: any;
31
+ };
32
+ type ISearchOptions = {
33
+ prop: string;
34
+ label: string;
35
+ validator?: (value: string) => boolean;
36
+ }[];
37
+ type IInputColumn = IColumnConfigRequired & {
38
+ inputType: string | number;
39
+ };
40
+ type ISelectColumn = IColumnConfigRequired & {
41
+ options: {
42
+ key: string;
43
+ value: string | number;
44
+ [key: string]: any;
45
+ }[];
46
+ };
47
+ type IDateOnlyColumn = IColumnConfigRequired;
48
+ type IDateTimeColumn = IColumnConfigRequired;
49
+ export type IColumnConfig = IInputColumn | ISelectColumn | IDateOnlyColumn | IDateTimeColumn;
50
+ export type IColorList = {
51
+ name: string;
52
+ textColor: string;
53
+ sampleColor: string;
54
+ bgColor: string;
55
+ id: number;
56
+ default?: boolean;
57
+ }[];
58
+ type IPointLoc = {
59
+ x: number;
60
+ y: number;
61
+ };
62
+ export type IDraggingData = {
63
+ isDragging?: boolean;
64
+ startPosition?: IPointLoc;
65
+ draggingRow?: HTMLElement | HTMLElement[];
66
+ draggingIndex?: number;
67
+ dropIndex?: number;
68
+ rowDoms?: Record<number, HTMLElement[]>;
69
+ rowHeight?: number;
70
+ rowsRange?: ([number, number] | undefined)[];
71
+ hiddenTds?: HTMLElement[];
72
+ fullScreenDiv?: HTMLElement;
73
+ };
74
+ export type IDefaultOperationType = 'edit' | 'delete' | 'top';
75
+ export type ITableDataItem = {
76
+ colorId?: number;
77
+ isPinned?: boolean;
78
+ [k: string]: any;
79
+ };
80
+ export interface IProps {
81
+ dataList: ITableDataItem[];
82
+ columnConfig: IColumnConfig[];
83
+ hasExpandRow?: boolean;
84
+ hasIndexColumn?: boolean;
85
+ hasSelectionColumn?: boolean;
86
+ rowDragAble?: boolean;
87
+ total: number;
88
+ defaultOperations?: IDefaultOperationType[];
89
+ colorList?: IColorList;
90
+ leftFixedCount?: number;
91
+ dragSemiRange?: number;
92
+ loading?: boolean;
93
+ settingStorgeKey?: string;
94
+ localSort?: boolean;
95
+ localFilter?: boolean;
96
+ currentPage: number;
97
+ }
98
+ export interface IEmits {
99
+ (e: 'selection-change', selection: any): void;
100
+ (e: 'row-bg-change', param: {
101
+ colorId: number;
102
+ row: ITableDataItem;
103
+ rowIndex: number;
104
+ }): void;
105
+ (e: 'row-drag-drop', param: {
106
+ row: any;
107
+ fromIndex: number;
108
+ toIndex: number;
109
+ page: number;
110
+ size: number;
111
+ }): void;
112
+ (e: 'row-delete', param: {
113
+ row: any;
114
+ index: number;
115
+ page: number;
116
+ size: number;
117
+ }): void;
118
+ (e: 'row-edit', param: {
119
+ row: any;
120
+ index: number;
121
+ page: number;
122
+ size: number;
123
+ }): void;
124
+ (e: 'row-pin-to-top', param: {
125
+ row: any;
126
+ rawIndex: number;
127
+ page: number;
128
+ size: number;
129
+ }): void;
130
+ (e: 'row-edit-save', param: {
131
+ page: number;
132
+ size: number;
133
+ row: any;
134
+ changedData: Record<string, any>;
135
+ }): void;
136
+ (e: 'row-edit-cancel', param: {
137
+ row: any;
138
+ page: number;
139
+ size: number;
140
+ }): void;
141
+ (e: 'page-change', param: {
142
+ page: number;
143
+ size: number;
144
+ }): void;
145
+ (e: 'search', param: Record<string, any>): void;
146
+ (e: 'sort-change', param: {
147
+ order: 'descending' | 'ascending' | null;
148
+ prop: string;
149
+ }): void;
150
+ }
151
+ export {};
@@ -0,0 +1,11 @@
1
+ export default function useCellHover(tableDomRef: any): {
2
+ hoveringCellInfo: import('vue').Ref<{
3
+ rowIndex: number;
4
+ columnProperty: string;
5
+ }>;
6
+ setCellClassName: ({ column, rowIndex }: {
7
+ column: any;
8
+ rowIndex: any;
9
+ }) => string;
10
+ debouncedHoverHandler: import('lodash').DebouncedFunc<(row: any, column: any, cell: any, event: any) => void>;
11
+ };