@yidun/antd-super-table 0.1.1 → 0.1.3

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,347 @@
1
+ import { DownOutlined } from '@ant-design/icons-vue';
2
+ import { SuperTableColumnTypeEnum } from '../config';
3
+ import type { PropType } from 'vue';
4
+ import type { SuperTableDataItem, SuperTableColumnType } from '../interface';
5
+ /**
6
+ * 展示出来的节点列表
7
+ * @returns {Record<string, any>[]} 可见的节点列表
8
+ */
9
+ declare const visibleList: import("vue").ComputedRef<Record<string, any>[]>;
10
+ /**
11
+ * 剩余的节点列表
12
+ * @returns {Record<string, any>[]} 被省略的节点列表
13
+ */
14
+ declare const ellipsisList: import("vue").ComputedRef<Record<string, any>[]>;
15
+ /**
16
+ * 更多菜单选项列表
17
+ * @returns {Array<{key: number, label: string, disabled: boolean, onClick: Function}>} 菜单选项配置
18
+ */
19
+ declare const ellipsisMenuItems: import("vue").ComputedRef<{
20
+ key: any;
21
+ label: any;
22
+ disabled: any;
23
+ onClick: () => any;
24
+ }[]>;
25
+ /**
26
+ * 元素项的样式计算
27
+ * @returns {Record<string, any>} 样式对象
28
+ */
29
+ declare const elementItemStyle: import("vue").ComputedRef<Record<string, any>>;
30
+ declare const __VLS_ctx: {
31
+ $style: Record<string, string> & __VLS_PrettifyGlobal<{} & {
32
+ "ellipsisElement": string;
33
+ } & {
34
+ "elementItem": string;
35
+ } & {
36
+ "ellipsisElementHasGap": string;
37
+ } & {
38
+ "flexWrap": string;
39
+ } & {
40
+ "ellipsisTag": string;
41
+ } & {
42
+ "imageEllipsisTag": string;
43
+ } & {
44
+ "ellipsisList": string;
45
+ }>;
46
+ $: import("vue").ComponentInternalInstance;
47
+ $data: {};
48
+ $props: Partial<{
49
+ type: SuperTableColumnType;
50
+ cellWidth: number;
51
+ list: Record<string, any>[];
52
+ maxCount: number;
53
+ displayType: string;
54
+ trigger: string | unknown[];
55
+ }> & Omit<{
56
+ readonly type: SuperTableColumnType;
57
+ readonly record: SuperTableDataItem;
58
+ readonly cellWidth: number;
59
+ readonly list: Record<string, any>[];
60
+ readonly maxCount: number;
61
+ readonly displayType: string;
62
+ readonly trigger: string | unknown[];
63
+ } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "type" | "cellWidth" | "list" | "maxCount" | "displayType" | "trigger">;
64
+ $attrs: {
65
+ [x: string]: unknown;
66
+ };
67
+ $refs: {
68
+ [x: string]: unknown;
69
+ };
70
+ $slots: Readonly<{
71
+ [name: string]: import("vue").Slot<any> | undefined;
72
+ }>;
73
+ $root: import("vue").ComponentPublicInstance | null;
74
+ $parent: import("vue").ComponentPublicInstance | null;
75
+ $host: Element | null;
76
+ $emit: (event: string, ...args: any[]) => void;
77
+ $el: any;
78
+ $options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
79
+ /**
80
+ * 当前行数据
81
+ * @type {SuperTableDataItem}
82
+ */
83
+ record: {
84
+ type: PropType<SuperTableDataItem>;
85
+ required: true;
86
+ };
87
+ /**
88
+ * 内容类型
89
+ * @type {SuperTableColumnType}
90
+ * @default SuperTableColumnTypeEnum.text
91
+ */
92
+ type: {
93
+ type: PropType<SuperTableColumnType>;
94
+ default: SuperTableColumnType;
95
+ };
96
+ /**
97
+ * 单元格宽度
98
+ * @type {number}
99
+ * @default 100
100
+ */
101
+ cellWidth: {
102
+ type: NumberConstructor;
103
+ default: number;
104
+ };
105
+ /**
106
+ * 列表数据
107
+ * @type {Record<string, any>[]}
108
+ * @default []
109
+ */
110
+ list: {
111
+ type: PropType<Record<string, any>[]>;
112
+ default: () => never[];
113
+ };
114
+ /**
115
+ * 最多显示数量
116
+ * @type {number}
117
+ * @default 2
118
+ */
119
+ maxCount: {
120
+ type: NumberConstructor;
121
+ default: number;
122
+ };
123
+ /**
124
+ * 更多节点展示类型
125
+ * @type {string}
126
+ * @default 'popover'
127
+ */
128
+ displayType: {
129
+ type: StringConstructor;
130
+ default: string;
131
+ };
132
+ /**
133
+ * 触发显示方式
134
+ * @type {string | string[]}
135
+ * @default 'hover'
136
+ */
137
+ trigger: {
138
+ type: (StringConstructor | ArrayConstructor)[];
139
+ default: string;
140
+ };
141
+ }>> & Readonly<{}>, {
142
+ DownOutlined: typeof DownOutlined;
143
+ SuperTableColumnTypeEnum: typeof SuperTableColumnTypeEnum;
144
+ visibleList: typeof visibleList;
145
+ ellipsisList: typeof ellipsisList;
146
+ ellipsisMenuItems: typeof ellipsisMenuItems;
147
+ elementItemStyle: typeof elementItemStyle;
148
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
149
+ type: SuperTableColumnType;
150
+ cellWidth: number;
151
+ list: Record<string, any>[];
152
+ maxCount: number;
153
+ displayType: string;
154
+ trigger: string | unknown[];
155
+ }, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & {
156
+ beforeCreate?: (() => void) | (() => void)[];
157
+ created?: (() => void) | (() => void)[];
158
+ beforeMount?: (() => void) | (() => void)[];
159
+ mounted?: (() => void) | (() => void)[];
160
+ beforeUpdate?: (() => void) | (() => void)[];
161
+ updated?: (() => void) | (() => void)[];
162
+ activated?: (() => void) | (() => void)[];
163
+ deactivated?: (() => void) | (() => void)[];
164
+ beforeDestroy?: (() => void) | (() => void)[];
165
+ beforeUnmount?: (() => void) | (() => void)[];
166
+ destroyed?: (() => void) | (() => void)[];
167
+ unmounted?: (() => void) | (() => void)[];
168
+ renderTracked?: ((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[];
169
+ renderTriggered?: ((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[];
170
+ errorCaptured?: ((err: unknown, instance: import("vue").ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import("vue").ComponentPublicInstance | null, info: string) => boolean | void)[];
171
+ };
172
+ $forceUpdate: () => void;
173
+ $nextTick: typeof import("vue").nextTick;
174
+ $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import("@vue/reactivity").OnCleanup]) => any : (...args: [any, any, import("@vue/reactivity").OnCleanup]) => any, options?: import("vue").WatchOptions): import("vue").WatchStopHandle;
175
+ type: SuperTableColumnType;
176
+ cellWidth: number;
177
+ list: Record<string, any>[];
178
+ maxCount: number;
179
+ displayType: string;
180
+ trigger: string | unknown[];
181
+ record: SuperTableDataItem;
182
+ DownOutlined: typeof DownOutlined;
183
+ SuperTableColumnTypeEnum: typeof SuperTableColumnTypeEnum;
184
+ visibleList: Record<string, any>[];
185
+ ellipsisList: Record<string, any>[];
186
+ ellipsisMenuItems: {
187
+ key: any;
188
+ label: any;
189
+ disabled: any;
190
+ onClick: () => any;
191
+ }[];
192
+ elementItemStyle: Record<string, any>;
193
+ };
194
+ declare var __VLS_1: {
195
+ item: Record<string, any>;
196
+ index: number;
197
+ }, __VLS_11: {
198
+ item: Record<string, any>;
199
+ index: number;
200
+ inPopover: boolean;
201
+ };
202
+ type __VLS_Slots = __VLS_PrettifyGlobal<__VLS_OmitStringIndex<typeof __VLS_ctx.$slots> & {
203
+ default?: (props: typeof __VLS_1) => any;
204
+ } & {
205
+ default?: (props: typeof __VLS_11) => any;
206
+ }>;
207
+ declare const __VLS_component: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
208
+ /**
209
+ * 当前行数据
210
+ * @type {SuperTableDataItem}
211
+ */
212
+ record: {
213
+ type: PropType<SuperTableDataItem>;
214
+ required: true;
215
+ };
216
+ /**
217
+ * 内容类型
218
+ * @type {SuperTableColumnType}
219
+ * @default SuperTableColumnTypeEnum.text
220
+ */
221
+ type: {
222
+ type: PropType<SuperTableColumnType>;
223
+ default: SuperTableColumnType;
224
+ };
225
+ /**
226
+ * 单元格宽度
227
+ * @type {number}
228
+ * @default 100
229
+ */
230
+ cellWidth: {
231
+ type: NumberConstructor;
232
+ default: number;
233
+ };
234
+ /**
235
+ * 列表数据
236
+ * @type {Record<string, any>[]}
237
+ * @default []
238
+ */
239
+ list: {
240
+ type: PropType<Record<string, any>[]>;
241
+ default: () => never[];
242
+ };
243
+ /**
244
+ * 最多显示数量
245
+ * @type {number}
246
+ * @default 2
247
+ */
248
+ maxCount: {
249
+ type: NumberConstructor;
250
+ default: number;
251
+ };
252
+ /**
253
+ * 更多节点展示类型
254
+ * @type {string}
255
+ * @default 'popover'
256
+ */
257
+ displayType: {
258
+ type: StringConstructor;
259
+ default: string;
260
+ };
261
+ /**
262
+ * 触发显示方式
263
+ * @type {string | string[]}
264
+ * @default 'hover'
265
+ */
266
+ trigger: {
267
+ type: (StringConstructor | ArrayConstructor)[];
268
+ default: string;
269
+ };
270
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
271
+ /**
272
+ * 当前行数据
273
+ * @type {SuperTableDataItem}
274
+ */
275
+ record: {
276
+ type: PropType<SuperTableDataItem>;
277
+ required: true;
278
+ };
279
+ /**
280
+ * 内容类型
281
+ * @type {SuperTableColumnType}
282
+ * @default SuperTableColumnTypeEnum.text
283
+ */
284
+ type: {
285
+ type: PropType<SuperTableColumnType>;
286
+ default: SuperTableColumnType;
287
+ };
288
+ /**
289
+ * 单元格宽度
290
+ * @type {number}
291
+ * @default 100
292
+ */
293
+ cellWidth: {
294
+ type: NumberConstructor;
295
+ default: number;
296
+ };
297
+ /**
298
+ * 列表数据
299
+ * @type {Record<string, any>[]}
300
+ * @default []
301
+ */
302
+ list: {
303
+ type: PropType<Record<string, any>[]>;
304
+ default: () => never[];
305
+ };
306
+ /**
307
+ * 最多显示数量
308
+ * @type {number}
309
+ * @default 2
310
+ */
311
+ maxCount: {
312
+ type: NumberConstructor;
313
+ default: number;
314
+ };
315
+ /**
316
+ * 更多节点展示类型
317
+ * @type {string}
318
+ * @default 'popover'
319
+ */
320
+ displayType: {
321
+ type: StringConstructor;
322
+ default: string;
323
+ };
324
+ /**
325
+ * 触发显示方式
326
+ * @type {string | string[]}
327
+ * @default 'hover'
328
+ */
329
+ trigger: {
330
+ type: (StringConstructor | ArrayConstructor)[];
331
+ default: string;
332
+ };
333
+ }>> & Readonly<{}>, {
334
+ type: SuperTableColumnType;
335
+ cellWidth: number;
336
+ list: Record<string, any>[];
337
+ maxCount: number;
338
+ displayType: string;
339
+ trigger: string | unknown[];
340
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
341
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
342
+ export default _default;
343
+ type __VLS_WithSlots<T, S> = T & {
344
+ new (): {
345
+ $slots: S;
346
+ };
347
+ };
@@ -0,0 +1,84 @@
1
+ import { PropType } from 'vue';
2
+ import type { SuperTableFormItem } from '../interface';
3
+ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
4
+ /**
5
+ * 表单项的值,支持任何类型
6
+ */
7
+ value: {
8
+ validator(): true;
9
+ };
10
+ /**
11
+ * 表单项配置
12
+ * @type {SuperTableFormItem}
13
+ * @default {}
14
+ */
15
+ formItem: {
16
+ type: PropType<SuperTableFormItem>;
17
+ require: boolean;
18
+ default: () => {};
19
+ };
20
+ /**
21
+ * 是否显示标签
22
+ * @type {boolean}
23
+ * @default false
24
+ */
25
+ showLabel: {
26
+ type: BooleanConstructor;
27
+ default: boolean;
28
+ };
29
+ /**
30
+ * 是否是在弹窗内显示
31
+ * @type {boolean}
32
+ * @default false
33
+ */
34
+ inModal: {
35
+ type: BooleanConstructor;
36
+ default: boolean;
37
+ };
38
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
39
+ change: (...args: any[]) => void;
40
+ "update:value": (...args: any[]) => void;
41
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
42
+ /**
43
+ * 表单项的值,支持任何类型
44
+ */
45
+ value: {
46
+ validator(): true;
47
+ };
48
+ /**
49
+ * 表单项配置
50
+ * @type {SuperTableFormItem}
51
+ * @default {}
52
+ */
53
+ formItem: {
54
+ type: PropType<SuperTableFormItem>;
55
+ require: boolean;
56
+ default: () => {};
57
+ };
58
+ /**
59
+ * 是否显示标签
60
+ * @type {boolean}
61
+ * @default false
62
+ */
63
+ showLabel: {
64
+ type: BooleanConstructor;
65
+ default: boolean;
66
+ };
67
+ /**
68
+ * 是否是在弹窗内显示
69
+ * @type {boolean}
70
+ * @default false
71
+ */
72
+ inModal: {
73
+ type: BooleanConstructor;
74
+ default: boolean;
75
+ };
76
+ }>> & Readonly<{
77
+ onChange?: ((...args: any[]) => any) | undefined;
78
+ "onUpdate:value"?: ((...args: any[]) => any) | undefined;
79
+ }>, {
80
+ showLabel: boolean;
81
+ formItem: SuperTableFormItem;
82
+ inModal: boolean;
83
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
84
+ export default _default;
@@ -0,0 +1,101 @@
1
+ import type { PropType } from 'vue';
2
+ import type { SuperTableFormItem } from '../interface';
3
+ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
4
+ /**
5
+ * 查询条件配置映射表
6
+ * @type {Record<string, SuperTableFormItem>}
7
+ * @default {}
8
+ */
9
+ formConfigMap: {
10
+ type: PropType<Record<string, SuperTableFormItem>>;
11
+ required: true;
12
+ default: () => {};
13
+ };
14
+ /** 查询条件列数 */
15
+ formItemColSpan: {
16
+ type: NumberConstructor;
17
+ default: number;
18
+ };
19
+ /** 是否启用场景,不启用场景时显示查询按钮 */
20
+ enableScene: {
21
+ type: BooleanConstructor;
22
+ default: boolean;
23
+ };
24
+ /** 表格加载状态 */
25
+ loading: {
26
+ type: BooleanConstructor;
27
+ default: boolean;
28
+ };
29
+ /** 是否显示展开/收起按钮 */
30
+ showExpandButton: {
31
+ type: BooleanConstructor;
32
+ default: boolean;
33
+ };
34
+ /** 是否显示重置按钮 */
35
+ showResetButton: {
36
+ type: BooleanConstructor;
37
+ default: boolean;
38
+ };
39
+ /** 表格唯一标识,用于区分不同表格的展开状态 */
40
+ superTableID: {
41
+ type: StringConstructor;
42
+ required: true;
43
+ };
44
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
45
+ search: (...args: any[]) => void;
46
+ reset: (...args: any[]) => void;
47
+ "form-item-change": (...args: any[]) => void;
48
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
49
+ /**
50
+ * 查询条件配置映射表
51
+ * @type {Record<string, SuperTableFormItem>}
52
+ * @default {}
53
+ */
54
+ formConfigMap: {
55
+ type: PropType<Record<string, SuperTableFormItem>>;
56
+ required: true;
57
+ default: () => {};
58
+ };
59
+ /** 查询条件列数 */
60
+ formItemColSpan: {
61
+ type: NumberConstructor;
62
+ default: number;
63
+ };
64
+ /** 是否启用场景,不启用场景时显示查询按钮 */
65
+ enableScene: {
66
+ type: BooleanConstructor;
67
+ default: boolean;
68
+ };
69
+ /** 表格加载状态 */
70
+ loading: {
71
+ type: BooleanConstructor;
72
+ default: boolean;
73
+ };
74
+ /** 是否显示展开/收起按钮 */
75
+ showExpandButton: {
76
+ type: BooleanConstructor;
77
+ default: boolean;
78
+ };
79
+ /** 是否显示重置按钮 */
80
+ showResetButton: {
81
+ type: BooleanConstructor;
82
+ default: boolean;
83
+ };
84
+ /** 表格唯一标识,用于区分不同表格的展开状态 */
85
+ superTableID: {
86
+ type: StringConstructor;
87
+ required: true;
88
+ };
89
+ }>> & Readonly<{
90
+ onSearch?: ((...args: any[]) => any) | undefined;
91
+ onReset?: ((...args: any[]) => any) | undefined;
92
+ "onForm-item-change"?: ((...args: any[]) => any) | undefined;
93
+ }>, {
94
+ loading: boolean;
95
+ formConfigMap: Record<string, SuperTableFormItem>;
96
+ formItemColSpan: number;
97
+ enableScene: boolean;
98
+ showExpandButton: boolean;
99
+ showResetButton: boolean;
100
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
101
+ export default _default;
@@ -0,0 +1,62 @@
1
+ import type { PropType } from 'vue';
2
+ import type { SuperTableFormItem } from '../interface';
3
+ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
4
+ /**
5
+ * 输入框的值
6
+ * @type {object}
7
+ */
8
+ value: {
9
+ type: PropType<Record<"select" | "value", any>>;
10
+ };
11
+ /**
12
+ * 表单项配置
13
+ * @type {SuperTableFormItem}
14
+ */
15
+ formItem: {
16
+ type: PropType<SuperTableFormItem>;
17
+ required: true;
18
+ };
19
+ /**
20
+ * 是否是在弹窗内显示
21
+ * @type {boolean}
22
+ * @default false
23
+ */
24
+ inModal: {
25
+ type: BooleanConstructor;
26
+ default: boolean;
27
+ };
28
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
29
+ change: (...args: any[]) => void;
30
+ "update:value": (...args: any[]) => void;
31
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
32
+ /**
33
+ * 输入框的值
34
+ * @type {object}
35
+ */
36
+ value: {
37
+ type: PropType<Record<"select" | "value", any>>;
38
+ };
39
+ /**
40
+ * 表单项配置
41
+ * @type {SuperTableFormItem}
42
+ */
43
+ formItem: {
44
+ type: PropType<SuperTableFormItem>;
45
+ required: true;
46
+ };
47
+ /**
48
+ * 是否是在弹窗内显示
49
+ * @type {boolean}
50
+ * @default false
51
+ */
52
+ inModal: {
53
+ type: BooleanConstructor;
54
+ default: boolean;
55
+ };
56
+ }>> & Readonly<{
57
+ onChange?: ((...args: any[]) => any) | undefined;
58
+ "onUpdate:value"?: ((...args: any[]) => any) | undefined;
59
+ }>, {
60
+ inModal: boolean;
61
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
62
+ export default _default;
@@ -0,0 +1,44 @@
1
+ import type { PropType } from 'vue';
2
+ import type { SuperTableFormItem } from '../interface';
3
+ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
4
+ /**
5
+ * 输入框的值
6
+ * @type {object}
7
+ */
8
+ value: {
9
+ type: PropType<Array<number | null>>;
10
+ default: () => never[];
11
+ };
12
+ /**
13
+ * 表单项配置
14
+ * @type {SuperTableFormItem}
15
+ */
16
+ formItem: {
17
+ type: PropType<SuperTableFormItem>;
18
+ required: true;
19
+ };
20
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
21
+ "update:value": (...args: any[]) => void;
22
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
23
+ /**
24
+ * 输入框的值
25
+ * @type {object}
26
+ */
27
+ value: {
28
+ type: PropType<Array<number | null>>;
29
+ default: () => never[];
30
+ };
31
+ /**
32
+ * 表单项配置
33
+ * @type {SuperTableFormItem}
34
+ */
35
+ formItem: {
36
+ type: PropType<SuperTableFormItem>;
37
+ required: true;
38
+ };
39
+ }>> & Readonly<{
40
+ "onUpdate:value"?: ((...args: any[]) => any) | undefined;
41
+ }>, {
42
+ value: (number | null)[];
43
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
44
+ export default _default;