cosey 0.4.48 → 0.4.50
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/components/table/table-query/table-query.vue.js +13 -10
- package/components/table-action/index.d.ts +285 -3
- package/components/table-action/style/index.js +8 -3
- package/components/table-action/table-action.d.ts +1 -1
- package/components/table-action/table-action.vue.d.ts +95 -1
- package/components/table-action/table-action.vue.js +17 -7
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, ref, reactive, onBeforeMount, createBlock, openBlock, resolveDynamicComponent,
|
|
1
|
+
import { defineComponent, ref, reactive, computed, onBeforeMount, unref, createBlock, openBlock, resolveDynamicComponent, withModifiers } from 'vue';
|
|
2
2
|
import { tableQueryProps, omittedTableQueryProps, tableQueryExposeKeys } from './table-query.js';
|
|
3
3
|
import { reactiveOmit } from '@vueuse/core';
|
|
4
4
|
import { cloneDeep } from 'lodash-es';
|
|
@@ -19,10 +19,13 @@ var stdin_default = /* @__PURE__ */defineComponent({
|
|
|
19
19
|
const props = __props;
|
|
20
20
|
const formQueryProps = reactiveOmit(props, omittedTableQueryProps);
|
|
21
21
|
const formQueryRef = ref();
|
|
22
|
-
const
|
|
22
|
+
const defaultModel = reactive({});
|
|
23
|
+
const formModel = computed(() => {
|
|
24
|
+
return props.model || defaultModel;
|
|
25
|
+
});
|
|
23
26
|
onBeforeMount(() => {
|
|
24
27
|
props.schemes.forEach(item => {
|
|
25
|
-
formModel[item.prop] = item.modelValue;
|
|
28
|
+
unref(formModel)[item.prop] = item.modelValue;
|
|
26
29
|
});
|
|
27
30
|
});
|
|
28
31
|
const onEnter = () => {
|
|
@@ -30,13 +33,13 @@ var stdin_default = /* @__PURE__ */defineComponent({
|
|
|
30
33
|
};
|
|
31
34
|
const customExpose = {
|
|
32
35
|
getFieldsValue() {
|
|
33
|
-
return cloneDeep(formModel);
|
|
36
|
+
return cloneDeep(unref(formModel));
|
|
34
37
|
},
|
|
35
38
|
setFieldsValue(value) {
|
|
36
|
-
Object.assign(formModel, value);
|
|
39
|
+
Object.assign(unref(formModel), value);
|
|
37
40
|
},
|
|
38
41
|
getFormModel() {
|
|
39
|
-
return formModel;
|
|
42
|
+
return unref(formModel);
|
|
40
43
|
}
|
|
41
44
|
};
|
|
42
45
|
__expose(createMergedExpose(tableQueryExposeKeys, () => formQueryRef.value, customExpose));
|
|
@@ -44,7 +47,7 @@ var stdin_default = /* @__PURE__ */defineComponent({
|
|
|
44
47
|
return h(_FormQuery, {
|
|
45
48
|
...formQueryProps,
|
|
46
49
|
ref: formQueryRef,
|
|
47
|
-
model: formModel,
|
|
50
|
+
model: unref(formModel),
|
|
48
51
|
onKeyup: withModifiers(event => {
|
|
49
52
|
if (event.key === "Enter") {
|
|
50
53
|
onEnter();
|
|
@@ -62,15 +65,15 @@ var stdin_default = /* @__PURE__ */defineComponent({
|
|
|
62
65
|
...slots,
|
|
63
66
|
default: () => {
|
|
64
67
|
return render({
|
|
65
|
-
model: formModel
|
|
68
|
+
model: unref(formModel)
|
|
66
69
|
});
|
|
67
70
|
}
|
|
68
71
|
});
|
|
69
72
|
}
|
|
70
73
|
return h(_FormItem, {
|
|
71
74
|
...rest,
|
|
72
|
-
modelValue: formModel[rest.prop],
|
|
73
|
-
"onUpdate:modelValue": value => formModel[rest.prop] = value
|
|
75
|
+
modelValue: unref(formModel)[rest.prop],
|
|
76
|
+
"onUpdate:modelValue": value => unref(formModel)[rest.prop] = value
|
|
74
77
|
}, slots);
|
|
75
78
|
});
|
|
76
79
|
});
|
|
@@ -95,7 +95,101 @@ declare const _TableAction: {
|
|
|
95
95
|
} & {
|
|
96
96
|
readonly default: "button";
|
|
97
97
|
};
|
|
98
|
-
}>>[]
|
|
98
|
+
}>>[] | Partial<import("vue").ExtractPropTypes<{
|
|
99
|
+
link: {
|
|
100
|
+
type: import("vue").PropType<boolean>;
|
|
101
|
+
default: boolean;
|
|
102
|
+
};
|
|
103
|
+
type: {
|
|
104
|
+
type: import("vue").PropType<"primary" | "success" | "warning" | "danger" | "info" | "text">;
|
|
105
|
+
default: string;
|
|
106
|
+
};
|
|
107
|
+
label: {
|
|
108
|
+
type: StringConstructor;
|
|
109
|
+
};
|
|
110
|
+
popconfirm: {
|
|
111
|
+
type: import("vue").PropType<Partial<import("vue").ExtractPropTypes<typeof import("element-plus").popconfirmProps>> & {
|
|
112
|
+
confirm?: (event: MouseEvent) => any;
|
|
113
|
+
cancel?: (event: MouseEvent) => void;
|
|
114
|
+
}>;
|
|
115
|
+
};
|
|
116
|
+
onClick: {
|
|
117
|
+
type: import("vue").PropType<(event: MouseEvent) => void>;
|
|
118
|
+
};
|
|
119
|
+
hidden: {
|
|
120
|
+
type: BooleanConstructor;
|
|
121
|
+
default: boolean;
|
|
122
|
+
};
|
|
123
|
+
visible: {
|
|
124
|
+
type: BooleanConstructor;
|
|
125
|
+
default: boolean;
|
|
126
|
+
};
|
|
127
|
+
icon: {
|
|
128
|
+
type: StringConstructor;
|
|
129
|
+
};
|
|
130
|
+
size: {
|
|
131
|
+
readonly type: import("vue").PropType<"" | "default" | "large" | "small">;
|
|
132
|
+
readonly required: false;
|
|
133
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
134
|
+
__epPropKey: true;
|
|
135
|
+
};
|
|
136
|
+
disabled: BooleanConstructor;
|
|
137
|
+
nativeType: {
|
|
138
|
+
readonly type: import("vue").PropType<"button" | "reset" | "submit">;
|
|
139
|
+
readonly required: false;
|
|
140
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
141
|
+
__epPropKey: true;
|
|
142
|
+
} & {
|
|
143
|
+
readonly default: "button";
|
|
144
|
+
};
|
|
145
|
+
loading: BooleanConstructor;
|
|
146
|
+
loadingIcon: {
|
|
147
|
+
readonly type: import("vue").PropType<string | import("vue").Component>;
|
|
148
|
+
readonly required: false;
|
|
149
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
150
|
+
__epPropKey: true;
|
|
151
|
+
} & {
|
|
152
|
+
readonly default: () => any;
|
|
153
|
+
};
|
|
154
|
+
plain: {
|
|
155
|
+
readonly type: import("vue").PropType<boolean>;
|
|
156
|
+
readonly required: false;
|
|
157
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
158
|
+
__epPropKey: true;
|
|
159
|
+
} & {
|
|
160
|
+
readonly default: undefined;
|
|
161
|
+
};
|
|
162
|
+
text: BooleanConstructor;
|
|
163
|
+
bg: BooleanConstructor;
|
|
164
|
+
autofocus: BooleanConstructor;
|
|
165
|
+
round: {
|
|
166
|
+
readonly type: import("vue").PropType<boolean>;
|
|
167
|
+
readonly required: false;
|
|
168
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
169
|
+
__epPropKey: true;
|
|
170
|
+
} & {
|
|
171
|
+
readonly default: undefined;
|
|
172
|
+
};
|
|
173
|
+
circle: BooleanConstructor;
|
|
174
|
+
color: StringConstructor;
|
|
175
|
+
dark: BooleanConstructor;
|
|
176
|
+
autoInsertSpace: {
|
|
177
|
+
readonly type: import("vue").PropType<boolean>;
|
|
178
|
+
readonly required: false;
|
|
179
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
180
|
+
__epPropKey: true;
|
|
181
|
+
} & {
|
|
182
|
+
readonly default: undefined;
|
|
183
|
+
};
|
|
184
|
+
tag: {
|
|
185
|
+
readonly type: import("vue").PropType<string | import("vue").Component>;
|
|
186
|
+
readonly required: false;
|
|
187
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
188
|
+
__epPropKey: true;
|
|
189
|
+
} & {
|
|
190
|
+
readonly default: "button";
|
|
191
|
+
};
|
|
192
|
+
}>>[][];
|
|
99
193
|
}, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
100
194
|
P: {};
|
|
101
195
|
B: {};
|
|
@@ -198,7 +292,101 @@ declare const _TableAction: {
|
|
|
198
292
|
} & {
|
|
199
293
|
readonly default: "button";
|
|
200
294
|
};
|
|
201
|
-
}>>[]
|
|
295
|
+
}>>[] | Partial<import("vue").ExtractPropTypes<{
|
|
296
|
+
link: {
|
|
297
|
+
type: import("vue").PropType<boolean>;
|
|
298
|
+
default: boolean;
|
|
299
|
+
};
|
|
300
|
+
type: {
|
|
301
|
+
type: import("vue").PropType<"primary" | "success" | "warning" | "danger" | "info" | "text">;
|
|
302
|
+
default: string;
|
|
303
|
+
};
|
|
304
|
+
label: {
|
|
305
|
+
type: StringConstructor;
|
|
306
|
+
};
|
|
307
|
+
popconfirm: {
|
|
308
|
+
type: import("vue").PropType<Partial<import("vue").ExtractPropTypes<typeof import("element-plus").popconfirmProps>> & {
|
|
309
|
+
confirm?: (event: MouseEvent) => any;
|
|
310
|
+
cancel?: (event: MouseEvent) => void;
|
|
311
|
+
}>;
|
|
312
|
+
};
|
|
313
|
+
onClick: {
|
|
314
|
+
type: import("vue").PropType<(event: MouseEvent) => void>;
|
|
315
|
+
};
|
|
316
|
+
hidden: {
|
|
317
|
+
type: BooleanConstructor;
|
|
318
|
+
default: boolean;
|
|
319
|
+
};
|
|
320
|
+
visible: {
|
|
321
|
+
type: BooleanConstructor;
|
|
322
|
+
default: boolean;
|
|
323
|
+
};
|
|
324
|
+
icon: {
|
|
325
|
+
type: StringConstructor;
|
|
326
|
+
};
|
|
327
|
+
size: {
|
|
328
|
+
readonly type: import("vue").PropType<"" | "default" | "large" | "small">;
|
|
329
|
+
readonly required: false;
|
|
330
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
331
|
+
__epPropKey: true;
|
|
332
|
+
};
|
|
333
|
+
disabled: BooleanConstructor;
|
|
334
|
+
nativeType: {
|
|
335
|
+
readonly type: import("vue").PropType<"button" | "reset" | "submit">;
|
|
336
|
+
readonly required: false;
|
|
337
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
338
|
+
__epPropKey: true;
|
|
339
|
+
} & {
|
|
340
|
+
readonly default: "button";
|
|
341
|
+
};
|
|
342
|
+
loading: BooleanConstructor;
|
|
343
|
+
loadingIcon: {
|
|
344
|
+
readonly type: import("vue").PropType<string | import("vue").Component>;
|
|
345
|
+
readonly required: false;
|
|
346
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
347
|
+
__epPropKey: true;
|
|
348
|
+
} & {
|
|
349
|
+
readonly default: () => any;
|
|
350
|
+
};
|
|
351
|
+
plain: {
|
|
352
|
+
readonly type: import("vue").PropType<boolean>;
|
|
353
|
+
readonly required: false;
|
|
354
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
355
|
+
__epPropKey: true;
|
|
356
|
+
} & {
|
|
357
|
+
readonly default: undefined;
|
|
358
|
+
};
|
|
359
|
+
text: BooleanConstructor;
|
|
360
|
+
bg: BooleanConstructor;
|
|
361
|
+
autofocus: BooleanConstructor;
|
|
362
|
+
round: {
|
|
363
|
+
readonly type: import("vue").PropType<boolean>;
|
|
364
|
+
readonly required: false;
|
|
365
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
366
|
+
__epPropKey: true;
|
|
367
|
+
} & {
|
|
368
|
+
readonly default: undefined;
|
|
369
|
+
};
|
|
370
|
+
circle: BooleanConstructor;
|
|
371
|
+
color: StringConstructor;
|
|
372
|
+
dark: BooleanConstructor;
|
|
373
|
+
autoInsertSpace: {
|
|
374
|
+
readonly type: import("vue").PropType<boolean>;
|
|
375
|
+
readonly required: false;
|
|
376
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
377
|
+
__epPropKey: true;
|
|
378
|
+
} & {
|
|
379
|
+
readonly default: undefined;
|
|
380
|
+
};
|
|
381
|
+
tag: {
|
|
382
|
+
readonly type: import("vue").PropType<string | import("vue").Component>;
|
|
383
|
+
readonly required: false;
|
|
384
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
385
|
+
__epPropKey: true;
|
|
386
|
+
} & {
|
|
387
|
+
readonly default: "button";
|
|
388
|
+
};
|
|
389
|
+
}>>[][];
|
|
202
390
|
}>;
|
|
203
391
|
__isFragment?: never;
|
|
204
392
|
__isTeleport?: never;
|
|
@@ -298,7 +486,101 @@ declare const _TableAction: {
|
|
|
298
486
|
} & {
|
|
299
487
|
readonly default: "button";
|
|
300
488
|
};
|
|
301
|
-
}>>[]
|
|
489
|
+
}>>[] | Partial<import("vue").ExtractPropTypes<{
|
|
490
|
+
link: {
|
|
491
|
+
type: import("vue").PropType<boolean>;
|
|
492
|
+
default: boolean;
|
|
493
|
+
};
|
|
494
|
+
type: {
|
|
495
|
+
type: import("vue").PropType<"primary" | "success" | "warning" | "danger" | "info" | "text">;
|
|
496
|
+
default: string;
|
|
497
|
+
};
|
|
498
|
+
label: {
|
|
499
|
+
type: StringConstructor;
|
|
500
|
+
};
|
|
501
|
+
popconfirm: {
|
|
502
|
+
type: import("vue").PropType<Partial<import("vue").ExtractPropTypes<typeof import("element-plus").popconfirmProps>> & {
|
|
503
|
+
confirm?: (event: MouseEvent) => any;
|
|
504
|
+
cancel?: (event: MouseEvent) => void;
|
|
505
|
+
}>;
|
|
506
|
+
};
|
|
507
|
+
onClick: {
|
|
508
|
+
type: import("vue").PropType<(event: MouseEvent) => void>;
|
|
509
|
+
};
|
|
510
|
+
hidden: {
|
|
511
|
+
type: BooleanConstructor;
|
|
512
|
+
default: boolean;
|
|
513
|
+
};
|
|
514
|
+
visible: {
|
|
515
|
+
type: BooleanConstructor;
|
|
516
|
+
default: boolean;
|
|
517
|
+
};
|
|
518
|
+
icon: {
|
|
519
|
+
type: StringConstructor;
|
|
520
|
+
};
|
|
521
|
+
size: {
|
|
522
|
+
readonly type: import("vue").PropType<"" | "default" | "large" | "small">;
|
|
523
|
+
readonly required: false;
|
|
524
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
525
|
+
__epPropKey: true;
|
|
526
|
+
};
|
|
527
|
+
disabled: BooleanConstructor;
|
|
528
|
+
nativeType: {
|
|
529
|
+
readonly type: import("vue").PropType<"button" | "reset" | "submit">;
|
|
530
|
+
readonly required: false;
|
|
531
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
532
|
+
__epPropKey: true;
|
|
533
|
+
} & {
|
|
534
|
+
readonly default: "button";
|
|
535
|
+
};
|
|
536
|
+
loading: BooleanConstructor;
|
|
537
|
+
loadingIcon: {
|
|
538
|
+
readonly type: import("vue").PropType<string | import("vue").Component>;
|
|
539
|
+
readonly required: false;
|
|
540
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
541
|
+
__epPropKey: true;
|
|
542
|
+
} & {
|
|
543
|
+
readonly default: () => any;
|
|
544
|
+
};
|
|
545
|
+
plain: {
|
|
546
|
+
readonly type: import("vue").PropType<boolean>;
|
|
547
|
+
readonly required: false;
|
|
548
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
549
|
+
__epPropKey: true;
|
|
550
|
+
} & {
|
|
551
|
+
readonly default: undefined;
|
|
552
|
+
};
|
|
553
|
+
text: BooleanConstructor;
|
|
554
|
+
bg: BooleanConstructor;
|
|
555
|
+
autofocus: BooleanConstructor;
|
|
556
|
+
round: {
|
|
557
|
+
readonly type: import("vue").PropType<boolean>;
|
|
558
|
+
readonly required: false;
|
|
559
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
560
|
+
__epPropKey: true;
|
|
561
|
+
} & {
|
|
562
|
+
readonly default: undefined;
|
|
563
|
+
};
|
|
564
|
+
circle: BooleanConstructor;
|
|
565
|
+
color: StringConstructor;
|
|
566
|
+
dark: BooleanConstructor;
|
|
567
|
+
autoInsertSpace: {
|
|
568
|
+
readonly type: import("vue").PropType<boolean>;
|
|
569
|
+
readonly required: false;
|
|
570
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
571
|
+
__epPropKey: true;
|
|
572
|
+
} & {
|
|
573
|
+
readonly default: undefined;
|
|
574
|
+
};
|
|
575
|
+
tag: {
|
|
576
|
+
readonly type: import("vue").PropType<string | import("vue").Component>;
|
|
577
|
+
readonly required: false;
|
|
578
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
579
|
+
__epPropKey: true;
|
|
580
|
+
} & {
|
|
581
|
+
readonly default: "button";
|
|
582
|
+
};
|
|
583
|
+
}>>[][];
|
|
302
584
|
}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & import("vue").Plugin;
|
|
303
585
|
export { _TableAction as TableAction };
|
|
304
586
|
export default _TableAction;
|
|
@@ -5,9 +5,14 @@ const getTableActionStyle = (token) => {
|
|
|
5
5
|
return {
|
|
6
6
|
[componentCls]: {
|
|
7
7
|
display: "inline-flex",
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
flexDirection: "column",
|
|
9
|
+
rowGap: token.sizeSM,
|
|
10
|
+
[`${componentCls}-row`]: {
|
|
11
|
+
display: "flex",
|
|
12
|
+
flexWrap: "wrap",
|
|
13
|
+
columnGap: token.sizeXXS,
|
|
14
|
+
rowGap: token.sizeXXS
|
|
15
|
+
}
|
|
11
16
|
}
|
|
12
17
|
};
|
|
13
18
|
};
|
|
@@ -94,6 +94,100 @@ declare const _default: import("vue").DefineComponent<TableActionProps, {}, {},
|
|
|
94
94
|
} & {
|
|
95
95
|
readonly default: "button";
|
|
96
96
|
};
|
|
97
|
-
}>>[]
|
|
97
|
+
}>>[] | Partial<import("vue").ExtractPropTypes<{
|
|
98
|
+
link: {
|
|
99
|
+
type: import("vue").PropType<boolean>;
|
|
100
|
+
default: boolean;
|
|
101
|
+
};
|
|
102
|
+
type: {
|
|
103
|
+
type: import("vue").PropType<"primary" | "success" | "warning" | "danger" | "info" | "text">;
|
|
104
|
+
default: string;
|
|
105
|
+
};
|
|
106
|
+
label: {
|
|
107
|
+
type: StringConstructor;
|
|
108
|
+
};
|
|
109
|
+
popconfirm: {
|
|
110
|
+
type: import("vue").PropType<Partial<import("vue").ExtractPropTypes<typeof import("element-plus").popconfirmProps>> & {
|
|
111
|
+
confirm?: (event: MouseEvent) => any;
|
|
112
|
+
cancel?: (event: MouseEvent) => void;
|
|
113
|
+
}>;
|
|
114
|
+
};
|
|
115
|
+
onClick: {
|
|
116
|
+
type: import("vue").PropType<(event: MouseEvent) => void>;
|
|
117
|
+
};
|
|
118
|
+
hidden: {
|
|
119
|
+
type: BooleanConstructor;
|
|
120
|
+
default: boolean;
|
|
121
|
+
};
|
|
122
|
+
visible: {
|
|
123
|
+
type: BooleanConstructor;
|
|
124
|
+
default: boolean;
|
|
125
|
+
};
|
|
126
|
+
icon: {
|
|
127
|
+
type: StringConstructor;
|
|
128
|
+
};
|
|
129
|
+
size: {
|
|
130
|
+
readonly type: import("vue").PropType<"" | "default" | "large" | "small">;
|
|
131
|
+
readonly required: false;
|
|
132
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
133
|
+
__epPropKey: true;
|
|
134
|
+
};
|
|
135
|
+
disabled: BooleanConstructor;
|
|
136
|
+
nativeType: {
|
|
137
|
+
readonly type: import("vue").PropType<"button" | "reset" | "submit">;
|
|
138
|
+
readonly required: false;
|
|
139
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
140
|
+
__epPropKey: true;
|
|
141
|
+
} & {
|
|
142
|
+
readonly default: "button";
|
|
143
|
+
};
|
|
144
|
+
loading: BooleanConstructor;
|
|
145
|
+
loadingIcon: {
|
|
146
|
+
readonly type: import("vue").PropType<string | import("vue").Component>;
|
|
147
|
+
readonly required: false;
|
|
148
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
149
|
+
__epPropKey: true;
|
|
150
|
+
} & {
|
|
151
|
+
readonly default: () => any;
|
|
152
|
+
};
|
|
153
|
+
plain: {
|
|
154
|
+
readonly type: import("vue").PropType<boolean>;
|
|
155
|
+
readonly required: false;
|
|
156
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
157
|
+
__epPropKey: true;
|
|
158
|
+
} & {
|
|
159
|
+
readonly default: undefined;
|
|
160
|
+
};
|
|
161
|
+
text: BooleanConstructor;
|
|
162
|
+
bg: BooleanConstructor;
|
|
163
|
+
autofocus: BooleanConstructor;
|
|
164
|
+
round: {
|
|
165
|
+
readonly type: import("vue").PropType<boolean>;
|
|
166
|
+
readonly required: false;
|
|
167
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
168
|
+
__epPropKey: true;
|
|
169
|
+
} & {
|
|
170
|
+
readonly default: undefined;
|
|
171
|
+
};
|
|
172
|
+
circle: BooleanConstructor;
|
|
173
|
+
color: StringConstructor;
|
|
174
|
+
dark: BooleanConstructor;
|
|
175
|
+
autoInsertSpace: {
|
|
176
|
+
readonly type: import("vue").PropType<boolean>;
|
|
177
|
+
readonly required: false;
|
|
178
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
179
|
+
__epPropKey: true;
|
|
180
|
+
} & {
|
|
181
|
+
readonly default: undefined;
|
|
182
|
+
};
|
|
183
|
+
tag: {
|
|
184
|
+
readonly type: import("vue").PropType<string | import("vue").Component>;
|
|
185
|
+
readonly required: false;
|
|
186
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
187
|
+
__epPropKey: true;
|
|
188
|
+
} & {
|
|
189
|
+
readonly default: "button";
|
|
190
|
+
};
|
|
191
|
+
}>>[][];
|
|
98
192
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
99
193
|
export default _default;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, mergeDefaults, createElementBlock, openBlock, normalizeClass, unref, Fragment, renderList, createBlock, mergeProps } from 'vue';
|
|
1
|
+
import { defineComponent, mergeDefaults, computed, createElementBlock, openBlock, normalizeClass, unref, Fragment, renderList, createBlock, mergeProps } from 'vue';
|
|
2
2
|
import { defaultTableActionProps } from './table-action.js';
|
|
3
3
|
import stdin_default$2 from './item.vue.js';
|
|
4
4
|
import stdin_default$1 from './style/index.js';
|
|
@@ -17,6 +17,9 @@ var stdin_default = /* @__PURE__ */defineComponent({
|
|
|
17
17
|
}, defaultTableActionProps),
|
|
18
18
|
setup(__props) {
|
|
19
19
|
const props = __props;
|
|
20
|
+
const dyadicActions = computed(() => {
|
|
21
|
+
return Array.isArray(props.actions[0]) ? props.actions : [props.actions];
|
|
22
|
+
});
|
|
20
23
|
const {
|
|
21
24
|
prefixCls
|
|
22
25
|
} = useComponentConfig("table-action", props);
|
|
@@ -26,12 +29,19 @@ var stdin_default = /* @__PURE__ */defineComponent({
|
|
|
26
29
|
return (_ctx, _cache) => {
|
|
27
30
|
return openBlock(), createElementBlock("div", {
|
|
28
31
|
class: normalizeClass([unref(hashId), unref(prefixCls)])
|
|
29
|
-
}, [(openBlock(true), createElementBlock(Fragment, null, renderList(
|
|
30
|
-
return openBlock(),
|
|
31
|
-
key:
|
|
32
|
-
|
|
33
|
-
},
|
|
34
|
-
|
|
32
|
+
}, [(openBlock(true), createElementBlock(Fragment, null, renderList(dyadicActions.value, (actions, rowIndex) => {
|
|
33
|
+
return openBlock(), createElementBlock("div", {
|
|
34
|
+
key: rowIndex,
|
|
35
|
+
class: normalizeClass(`${unref(prefixCls)}-row`)
|
|
36
|
+
}, [(openBlock(true), createElementBlock(Fragment, null, renderList(actions, (action, actionIndex) => {
|
|
37
|
+
return openBlock(), createBlock(stdin_default$2, mergeProps({
|
|
38
|
+
key: actionIndex,
|
|
39
|
+
ref_for: true
|
|
40
|
+
}, action), null, 16
|
|
41
|
+
/* FULL_PROPS */);
|
|
42
|
+
}), 128
|
|
43
|
+
/* KEYED_FRAGMENT */))], 2
|
|
44
|
+
/* CLASS */);
|
|
35
45
|
}), 128
|
|
36
46
|
/* KEYED_FRAGMENT */))], 2
|
|
37
47
|
/* CLASS */);
|