@partex/one-core 2.0.10 → 2.0.12
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/lib/components/actionButton/index.d.ts +1 -1
- package/lib/components/actionButton/interface.d.ts +11 -1
- package/lib/components/tableEdit/components/action.vue.d.ts +34 -4
- package/lib/components/tableEdit/components/form.vue.d.ts +2 -2
- package/lib/components/tableEdit/components/header.vue.d.ts +2 -2
- package/lib/components/tableEdit/index.vue.d.ts +34 -10
- package/lib/one-core.cjs +7 -7
- package/lib/one-core.js +4285 -4187
- package/lib/one-core.umd.cjs +7 -7
- package/lib/style.css +1 -1
- package/package.json +1 -1
|
@@ -2,6 +2,8 @@ import type { Fn } from '../common';
|
|
|
2
2
|
type IActionButtonBase = {
|
|
3
3
|
disabled?: boolean;
|
|
4
4
|
loading?: boolean;
|
|
5
|
+
icon?: any;
|
|
6
|
+
color?: 'default' | 'tertiary' | 'primary' | 'success' | 'info' | 'warning' | 'error';
|
|
5
7
|
buttonText?: string;
|
|
6
8
|
confirmText?: string;
|
|
7
9
|
onClick: Fn | string;
|
|
@@ -12,8 +14,16 @@ interface IActionButtonNormal extends IActionButtonBase {
|
|
|
12
14
|
interface IActionButtonCustom extends IActionButtonBase {
|
|
13
15
|
type: 'custom';
|
|
14
16
|
tooltipText: string;
|
|
17
|
+
}
|
|
18
|
+
interface IActionButtonGroup {
|
|
19
|
+
type: 'group';
|
|
15
20
|
icon?: any;
|
|
16
21
|
color?: 'default' | 'tertiary' | 'primary' | 'success' | 'info' | 'warning' | 'error';
|
|
22
|
+
disabled?: boolean;
|
|
23
|
+
loading?: boolean;
|
|
24
|
+
buttonText?: string;
|
|
25
|
+
children: Array<IActionButtonNormal | IActionButtonCustom>;
|
|
17
26
|
}
|
|
18
|
-
export type
|
|
27
|
+
export type IActionSingleButton = IActionButtonNormal | IActionButtonCustom;
|
|
28
|
+
export type IActionButton = IActionSingleButton | IActionButtonGroup;
|
|
19
29
|
export {};
|
|
@@ -7,20 +7,50 @@ declare const _default: DefineComponent<{
|
|
|
7
7
|
default: undefined;
|
|
8
8
|
};
|
|
9
9
|
}, {
|
|
10
|
+
popoverRef: Ref<any>;
|
|
10
11
|
element: Ref<{
|
|
12
|
+
type: "group";
|
|
13
|
+
icon?: any;
|
|
14
|
+
color?: "default" | "error" | "info" | "success" | "warning" | "tertiary" | "primary" | undefined;
|
|
15
|
+
disabled?: boolean | undefined;
|
|
16
|
+
loading?: boolean | undefined;
|
|
17
|
+
buttonText?: string | undefined;
|
|
18
|
+
children: ({
|
|
19
|
+
type: "delete" | "detail" | "edit";
|
|
20
|
+
disabled?: boolean | undefined;
|
|
21
|
+
loading?: boolean | undefined;
|
|
22
|
+
icon?: any;
|
|
23
|
+
color?: "default" | "error" | "info" | "success" | "warning" | "tertiary" | "primary" | undefined;
|
|
24
|
+
buttonText?: string | undefined;
|
|
25
|
+
confirmText?: string | undefined;
|
|
26
|
+
onClick: string | Fn<any, any>;
|
|
27
|
+
} | {
|
|
28
|
+
type: "custom";
|
|
29
|
+
tooltipText: string;
|
|
30
|
+
disabled?: boolean | undefined;
|
|
31
|
+
loading?: boolean | undefined;
|
|
32
|
+
icon?: any;
|
|
33
|
+
color?: "default" | "error" | "info" | "success" | "warning" | "tertiary" | "primary" | undefined;
|
|
34
|
+
buttonText?: string | undefined;
|
|
35
|
+
confirmText?: string | undefined;
|
|
36
|
+
onClick: string | Fn<any, any>;
|
|
37
|
+
})[];
|
|
38
|
+
} | {
|
|
11
39
|
type: "delete" | "detail" | "edit";
|
|
12
40
|
disabled?: boolean | undefined;
|
|
13
41
|
loading?: boolean | undefined;
|
|
42
|
+
icon?: any;
|
|
43
|
+
color?: "default" | "error" | "info" | "success" | "warning" | "tertiary" | "primary" | undefined;
|
|
14
44
|
buttonText?: string | undefined;
|
|
15
45
|
confirmText?: string | undefined;
|
|
16
46
|
onClick: string | Fn<any, any>;
|
|
17
47
|
} | {
|
|
18
48
|
type: "custom";
|
|
19
49
|
tooltipText: string;
|
|
20
|
-
icon?: any;
|
|
21
|
-
color?: "default" | "error" | "info" | "success" | "warning" | "tertiary" | "primary" | undefined;
|
|
22
50
|
disabled?: boolean | undefined;
|
|
23
51
|
loading?: boolean | undefined;
|
|
52
|
+
icon?: any;
|
|
53
|
+
color?: "default" | "error" | "info" | "success" | "warning" | "tertiary" | "primary" | undefined;
|
|
24
54
|
buttonText?: string | undefined;
|
|
25
55
|
confirmText?: string | undefined;
|
|
26
56
|
onClick: string | Fn<any, any>;
|
|
@@ -34,15 +64,15 @@ declare const _default: DefineComponent<{
|
|
|
34
64
|
value: string;
|
|
35
65
|
}[]>;
|
|
36
66
|
doSubmit: () => void;
|
|
67
|
+
inputChange: (value: 'detail' | 'edit' | 'delete' | 'custom' | 'group') => void;
|
|
37
68
|
doCancel: () => void;
|
|
38
|
-
}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin,
|
|
69
|
+
}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, "on-update:value"[], "on-update:value", PublicProps, Readonly<ExtractPropTypes<{
|
|
39
70
|
value: {
|
|
40
71
|
type: PropType<IActionButton>;
|
|
41
72
|
default: undefined;
|
|
42
73
|
};
|
|
43
74
|
}>> & {
|
|
44
75
|
"onOn-update:value"?: ((...args: any[]) => any) | undefined;
|
|
45
|
-
"onUpdate:cancel"?: ((...args: any[]) => any) | undefined;
|
|
46
76
|
}, {
|
|
47
77
|
value: IActionButton;
|
|
48
78
|
}, {}>;
|
|
@@ -30,6 +30,7 @@ declare const _default: DefineComponent<{
|
|
|
30
30
|
}[];
|
|
31
31
|
}>;
|
|
32
32
|
formRef: Ref<any>;
|
|
33
|
+
popoverRef: Ref<any>;
|
|
33
34
|
element: Ref<{
|
|
34
35
|
input: "input";
|
|
35
36
|
type: "textarea" | "text" | "password";
|
|
@@ -240,14 +241,13 @@ declare const _default: DefineComponent<{
|
|
|
240
241
|
inputChange: (value: '' | 'number' | 'date' | 'select' | 'input' | 'time' | 'switch' | 'upload') => void;
|
|
241
242
|
doSelectAdd: () => void;
|
|
242
243
|
doSelectDelete: (index: number) => void;
|
|
243
|
-
}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin,
|
|
244
|
+
}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, "on-update:value"[], "on-update:value", PublicProps, Readonly<ExtractPropTypes<{
|
|
244
245
|
value: {
|
|
245
246
|
type: PropType<IFormItem>;
|
|
246
247
|
default: undefined;
|
|
247
248
|
};
|
|
248
249
|
}>> & {
|
|
249
250
|
"onOn-update:value"?: ((...args: any[]) => any) | undefined;
|
|
250
|
-
"onUpdate:cancel"?: ((...args: any[]) => any) | undefined;
|
|
251
251
|
}, {
|
|
252
252
|
value: IFormItem;
|
|
253
253
|
}, {}>;
|
|
@@ -10,6 +10,7 @@ declare const _default: DefineComponent<{
|
|
|
10
10
|
};
|
|
11
11
|
}, {
|
|
12
12
|
formRef: Ref<any>;
|
|
13
|
+
popoverRef: Ref<any>;
|
|
13
14
|
rules: Ref<{
|
|
14
15
|
title: {
|
|
15
16
|
required: boolean;
|
|
@@ -252,7 +253,7 @@ declare const _default: DefineComponent<{
|
|
|
252
253
|
doSelectDelete: (index: number) => void;
|
|
253
254
|
doGroupAdd: () => void;
|
|
254
255
|
doGroupDelete: (index: number) => void;
|
|
255
|
-
}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin,
|
|
256
|
+
}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, "on-update:value"[], "on-update:value", PublicProps, Readonly<ExtractPropTypes<{
|
|
256
257
|
value: {
|
|
257
258
|
type: PropType<IOcDataTableColumn<{
|
|
258
259
|
[x: string]: unknown;
|
|
@@ -261,7 +262,6 @@ declare const _default: DefineComponent<{
|
|
|
261
262
|
};
|
|
262
263
|
}>> & {
|
|
263
264
|
"onOn-update:value"?: ((...args: any[]) => any) | undefined;
|
|
264
|
-
"onUpdate:cancel"?: ((...args: any[]) => any) | undefined;
|
|
265
265
|
}, {
|
|
266
266
|
value: IOcDataTableColumn<{
|
|
267
267
|
[x: string]: unknown;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { GroupInput } from '../searchBar/interface';
|
|
2
|
-
import { DefineComponent,
|
|
2
|
+
import { DefineComponent, Ref, ComputedRef, VNodeChild, ComponentOptionsMixin, PublicProps, ExtractPropTypes } from 'vue';
|
|
3
3
|
import type { IOcDataTableColumn, IOcDataTableColumns } from '../table';
|
|
4
4
|
import type { IActionButton } from '../actionButton';
|
|
5
5
|
import type { IFormItem } from '../form';
|
|
6
6
|
import { Fn, ObjectKey } from '../common';
|
|
7
7
|
declare const _default: DefineComponent<{}, {
|
|
8
|
+
ocFormRef: Ref<any>;
|
|
8
9
|
dragOptions: ComputedRef<{
|
|
9
10
|
animation: number;
|
|
10
11
|
group: string;
|
|
@@ -210,28 +211,53 @@ declare const _default: DefineComponent<{}, {
|
|
|
210
211
|
} | undefined;
|
|
211
212
|
}[]>;
|
|
212
213
|
columnData: Ref<string>;
|
|
213
|
-
popoverRef: Ref<any>;
|
|
214
|
-
popoverRefs: Ref<any[]>;
|
|
215
214
|
actions: Ref<({
|
|
215
|
+
type: "group";
|
|
216
|
+
icon?: any;
|
|
217
|
+
color?: "default" | "error" | "info" | "success" | "warning" | "tertiary" | "primary" | undefined;
|
|
218
|
+
disabled?: boolean | undefined;
|
|
219
|
+
loading?: boolean | undefined;
|
|
220
|
+
buttonText?: string | undefined;
|
|
221
|
+
children: ({
|
|
222
|
+
type: "delete" | "detail" | "edit";
|
|
223
|
+
disabled?: boolean | undefined;
|
|
224
|
+
loading?: boolean | undefined;
|
|
225
|
+
icon?: any;
|
|
226
|
+
color?: "default" | "error" | "info" | "success" | "warning" | "tertiary" | "primary" | undefined;
|
|
227
|
+
buttonText?: string | undefined;
|
|
228
|
+
confirmText?: string | undefined;
|
|
229
|
+
onClick: string | Fn<any, any>;
|
|
230
|
+
} | {
|
|
231
|
+
type: "custom";
|
|
232
|
+
tooltipText: string;
|
|
233
|
+
disabled?: boolean | undefined;
|
|
234
|
+
loading?: boolean | undefined;
|
|
235
|
+
icon?: any;
|
|
236
|
+
color?: "default" | "error" | "info" | "success" | "warning" | "tertiary" | "primary" | undefined;
|
|
237
|
+
buttonText?: string | undefined;
|
|
238
|
+
confirmText?: string | undefined;
|
|
239
|
+
onClick: string | Fn<any, any>;
|
|
240
|
+
})[];
|
|
241
|
+
} | {
|
|
216
242
|
type: "delete" | "detail" | "edit";
|
|
217
243
|
disabled?: boolean | undefined;
|
|
218
244
|
loading?: boolean | undefined;
|
|
245
|
+
icon?: any;
|
|
246
|
+
color?: "default" | "error" | "info" | "success" | "warning" | "tertiary" | "primary" | undefined;
|
|
219
247
|
buttonText?: string | undefined;
|
|
220
248
|
confirmText?: string | undefined;
|
|
221
249
|
onClick: string | Fn<any, any>;
|
|
222
250
|
} | {
|
|
223
251
|
type: "custom";
|
|
224
252
|
tooltipText: string;
|
|
225
|
-
icon?: any;
|
|
226
|
-
color?: "default" | "error" | "info" | "success" | "warning" | "tertiary" | "primary" | undefined;
|
|
227
253
|
disabled?: boolean | undefined;
|
|
228
254
|
loading?: boolean | undefined;
|
|
255
|
+
icon?: any;
|
|
256
|
+
color?: "default" | "error" | "info" | "success" | "warning" | "tertiary" | "primary" | undefined;
|
|
229
257
|
buttonText?: string | undefined;
|
|
230
258
|
confirmText?: string | undefined;
|
|
231
259
|
onClick: string | Fn<any, any>;
|
|
232
260
|
})[]>;
|
|
233
|
-
actionRef: Ref<any>;
|
|
234
|
-
actionRefs: Ref<any[]>;
|
|
235
261
|
forms: Ref<({
|
|
236
262
|
input: "input";
|
|
237
263
|
type: "textarea" | "text" | "password";
|
|
@@ -396,8 +422,6 @@ declare const _default: DefineComponent<{}, {
|
|
|
396
422
|
readonly?: boolean | undefined;
|
|
397
423
|
} | undefined;
|
|
398
424
|
})[]>;
|
|
399
|
-
formRef: Ref<any>;
|
|
400
|
-
formRefs: Ref<any[]>;
|
|
401
425
|
drawer: Ref<boolean>;
|
|
402
426
|
formValues: Ref<string>;
|
|
403
427
|
vueData: Ref<string>;
|
|
@@ -575,9 +599,9 @@ declare const _default: DefineComponent<{}, {
|
|
|
575
599
|
fetchData: (value: any) => Promise<unknown>;
|
|
576
600
|
addNewOne: (value: IOcDataTableColumn) => void;
|
|
577
601
|
changeOne: (value: IOcDataTableColumn, index: number) => void;
|
|
578
|
-
doCancel: () => void;
|
|
579
602
|
addActionNewOne: (value: IActionButton) => void;
|
|
580
603
|
changeActionOne: (value: IActionButton, index: number) => void;
|
|
604
|
+
changeActionGroupOne: (value: IActionButton, index: number, index2: number) => void;
|
|
581
605
|
addFormNewOne: (value: IFormItem) => void;
|
|
582
606
|
changeFormOne: (value: IFormItem, index: number) => void;
|
|
583
607
|
createVue: () => void;
|