@hbdlzy/ui-core 0.1.2 → 0.1.4
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.manifest.json +40 -1
- package/dist/components/BaseCard/BaseCard.types.d.ts +36 -0
- package/dist/components/BaseCard/BaseCard.vue.d.ts +122 -0
- package/dist/components/BaseCard/index.d.ts +3 -0
- package/dist/components/BaseDialog/BaseDialog.types.d.ts +25 -0
- package/dist/components/BaseDialog/BaseDialog.vue.d.ts +100 -0
- package/dist/components/BaseDialog/index.d.ts +3 -0
- package/dist/components/BaseEChart/BaseEChart.types.d.ts +26 -0
- package/dist/components/BaseEChart/BaseEChart.vue.d.ts +66 -0
- package/dist/components/BaseEChart/index.d.ts +3 -0
- package/dist/components/BaseExportButton/BaseExportButton.types.d.ts +21 -0
- package/dist/components/BaseExportButton/BaseExportButton.utils.d.ts +4 -0
- package/dist/components/BaseExportButton/BaseExportButton.vue.d.ts +128 -0
- package/dist/components/BaseExportButton/index.d.ts +5 -0
- package/dist/components/BaseSearchForm/BaseSearchForm.types.d.ts +42 -0
- package/dist/components/BaseSearchForm/BaseSearchForm.utils.d.ts +5 -0
- package/dist/components/BaseSearchForm/BaseSearchForm.vue.d.ts +88 -0
- package/dist/components/BaseSearchForm/index.d.ts +4 -0
- package/dist/components/BaseTable/BaseTable.types.d.ts +163 -0
- package/dist/components/BaseTable/BaseTable.vue.d.ts +157 -0
- package/dist/components/BaseTable/index.d.ts +3 -0
- package/dist/components/OutlinedCascader/OutlinedCascader.types.d.ts +25 -0
- package/dist/components/OutlinedCascader/OutlinedCascader.vue.d.ts +85 -0
- package/dist/components/OutlinedCascader/index.d.ts +3 -0
- package/dist/components/OutlinedDatePicker/OutlinedDatePicker.types.d.ts +27 -0
- package/dist/components/OutlinedDatePicker/OutlinedDatePicker.vue.d.ts +88 -0
- package/dist/components/OutlinedDatePicker/index.d.ts +3 -0
- package/dist/components/OutlinedDateTimePicker/OutlinedDateTimePicker.types.d.ts +26 -0
- package/dist/components/OutlinedDateTimePicker/OutlinedDateTimePicker.vue.d.ts +97 -0
- package/dist/components/OutlinedDateTimePicker/index.d.ts +3 -0
- package/dist/components/OutlinedInput/OutlinedInput.types.d.ts +29 -0
- package/dist/components/OutlinedInput/OutlinedInput.vue.d.ts +97 -0
- package/dist/components/OutlinedInput/index.d.ts +3 -0
- package/dist/components/OutlinedSelect/OutlinedSelect.types.d.ts +38 -0
- package/dist/components/OutlinedSelect/OutlinedSelect.vue.d.ts +116 -0
- package/dist/components/OutlinedSelect/index.d.ts +3 -0
- package/dist/components/OutlinedTimePicker/OutlinedTimePicker.types.d.ts +28 -0
- package/dist/components/OutlinedTimePicker/OutlinedTimePicker.vue.d.ts +94 -0
- package/dist/components/OutlinedTimePicker/index.d.ts +3 -0
- package/dist/components/OutlinedTreeSelect/OutlinedTreeSelect.types.d.ts +46 -0
- package/dist/components/OutlinedTreeSelect/OutlinedTreeSelect.vue.d.ts +137 -0
- package/dist/components/OutlinedTreeSelect/index.d.ts +3 -0
- package/dist/echarts/index.d.ts +9 -0
- package/dist/excel/exportExcel.d.ts +18 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +30 -0
- package/dist/index.js +832 -169
- package/dist/style.css +1 -1
- package/package.json +7 -4
- package/src/components/BaseDialog/BaseDialog.types.ts +28 -0
- package/src/components/BaseDialog/BaseDialog.vue +158 -0
- package/src/components/BaseDialog/README.md +69 -0
- package/src/components/BaseDialog/index.ts +10 -0
- package/src/components/BaseExportButton/BaseExportButton.vue +3 -1
- package/src/components/BaseSearchForm/BaseSearchForm.types.ts +46 -0
- package/src/components/BaseSearchForm/BaseSearchForm.utils.ts +41 -0
- package/src/components/BaseSearchForm/BaseSearchForm.vue +267 -0
- package/src/components/BaseSearchForm/README.md +66 -0
- package/src/components/BaseSearchForm/index.ts +20 -0
- package/src/components/BaseTable/BaseTable.types.ts +13 -1
- package/src/components/BaseTable/BaseTable.vue +412 -13
- package/src/components/BaseTable/README.md +106 -120
- package/src/echarts/index.ts +13 -8
- package/src/index.ts +4 -0
package/components.manifest.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"package": "@hbdlzy/ui-core",
|
|
3
3
|
"version": 1,
|
|
4
|
-
"updatedAt": "2026-04-
|
|
4
|
+
"updatedAt": "2026-04-28",
|
|
5
5
|
"components": [
|
|
6
6
|
{
|
|
7
7
|
"name": "BaseTable",
|
|
@@ -28,6 +28,11 @@
|
|
|
28
28
|
"type": "(payload: BaseTableSortPayload) => Record<string, unknown> | void",
|
|
29
29
|
"required": false
|
|
30
30
|
},
|
|
31
|
+
{
|
|
32
|
+
"name": "headerSearch",
|
|
33
|
+
"type": "boolean | { paramKey?: string; placeholder?: string; width?: string | number; searchText?: string; resetText?: string }",
|
|
34
|
+
"required": false
|
|
35
|
+
},
|
|
31
36
|
{ "name": "hasSelection", "type": "boolean", "default": false },
|
|
32
37
|
{ "name": "hasIndex", "type": "boolean", "default": false },
|
|
33
38
|
{ "name": "showPagination", "type": "boolean", "default": true }
|
|
@@ -55,6 +60,40 @@
|
|
|
55
60
|
],
|
|
56
61
|
"emits": ["export"]
|
|
57
62
|
},
|
|
63
|
+
{
|
|
64
|
+
"name": "BaseSearchForm",
|
|
65
|
+
"category": "ui-core",
|
|
66
|
+
"entry": "@hbdlzy/ui-core",
|
|
67
|
+
"importName": "BaseSearchForm",
|
|
68
|
+
"docs": "packages/ui-core/src/components/BaseSearchForm/README.md",
|
|
69
|
+
"description": "统一封装列表页查询表单,支持输入框、下拉框、日期、日期范围、插槽字段、查询重置和展开收起。",
|
|
70
|
+
"props": [
|
|
71
|
+
{ "name": "modelValue", "type": "Record<string, unknown>", "required": false },
|
|
72
|
+
{ "name": "fields", "type": "BaseSearchFormField[]", "required": true },
|
|
73
|
+
{ "name": "collapsed", "type": "boolean", "default": true },
|
|
74
|
+
{ "name": "showCollapse", "type": "boolean", "default": true },
|
|
75
|
+
{ "name": "columns", "type": "number", "default": 4 },
|
|
76
|
+
{ "name": "labelWidth", "type": "string | number", "default": 80 }
|
|
77
|
+
],
|
|
78
|
+
"emits": ["update:modelValue", "search", "reset", "field-change"]
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"name": "BaseDialog",
|
|
82
|
+
"category": "ui-core",
|
|
83
|
+
"entry": "@hbdlzy/ui-core",
|
|
84
|
+
"importName": "BaseDialog",
|
|
85
|
+
"docs": "packages/ui-core/src/components/BaseDialog/README.md",
|
|
86
|
+
"description": "统一封装新增、编辑、确认类弹窗,支持默认页脚、异步确认、确认 loading 和自定义头尾插槽。",
|
|
87
|
+
"props": [
|
|
88
|
+
{ "name": "modelValue", "type": "boolean", "default": false },
|
|
89
|
+
{ "name": "title", "type": "string", "default": "" },
|
|
90
|
+
{ "name": "width", "type": "string | number", "default": "560px" },
|
|
91
|
+
{ "name": "showFooter", "type": "boolean", "default": true },
|
|
92
|
+
{ "name": "confirmLoading", "type": "boolean", "default": false },
|
|
93
|
+
{ "name": "beforeConfirm", "type": "() => boolean | void | Promise<boolean | void>", "required": false }
|
|
94
|
+
],
|
|
95
|
+
"emits": ["update:modelValue", "open", "opened", "close", "closed", "cancel", "confirm"]
|
|
96
|
+
},
|
|
58
97
|
{
|
|
59
98
|
"name": "BaseEChart",
|
|
60
99
|
"category": "ui-core",
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export type BaseCardCssValue = string | number;
|
|
2
|
+
export interface BaseCardDefaultExportPayload {
|
|
3
|
+
title?: string;
|
|
4
|
+
metaText?: string;
|
|
5
|
+
}
|
|
6
|
+
export interface BaseCardProps {
|
|
7
|
+
title?: string;
|
|
8
|
+
metaText?: string;
|
|
9
|
+
showHeader?: boolean;
|
|
10
|
+
showRight?: boolean;
|
|
11
|
+
showTitleMarker?: boolean;
|
|
12
|
+
showExport?: boolean;
|
|
13
|
+
exportText?: string;
|
|
14
|
+
exportDisabled?: boolean;
|
|
15
|
+
exportPayload?: unknown;
|
|
16
|
+
padding?: BaseCardCssValue;
|
|
17
|
+
radius?: BaseCardCssValue;
|
|
18
|
+
borderColor?: string;
|
|
19
|
+
backgroundColor?: string;
|
|
20
|
+
shadowColor?: string;
|
|
21
|
+
headerGap?: BaseCardCssValue;
|
|
22
|
+
headerMarginBottom?: BaseCardCssValue;
|
|
23
|
+
leftGap?: BaseCardCssValue;
|
|
24
|
+
rightGap?: BaseCardCssValue;
|
|
25
|
+
titleColor?: string;
|
|
26
|
+
titleSize?: BaseCardCssValue;
|
|
27
|
+
titleWeight?: string | number;
|
|
28
|
+
markerColor?: string;
|
|
29
|
+
markerWidth?: BaseCardCssValue;
|
|
30
|
+
markerHeight?: BaseCardCssValue;
|
|
31
|
+
markerRadius?: BaseCardCssValue;
|
|
32
|
+
markerGap?: BaseCardCssValue;
|
|
33
|
+
metaColor?: string;
|
|
34
|
+
metaSize?: BaseCardCssValue;
|
|
35
|
+
exportColor?: string;
|
|
36
|
+
}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import type { BaseCardCssValue, BaseCardProps } from './BaseCard.types';
|
|
2
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<BaseCardProps>, {
|
|
3
|
+
title: string;
|
|
4
|
+
metaText: string;
|
|
5
|
+
showHeader: boolean;
|
|
6
|
+
showRight: boolean;
|
|
7
|
+
showTitleMarker: boolean;
|
|
8
|
+
showExport: boolean;
|
|
9
|
+
exportText: string;
|
|
10
|
+
exportDisabled: boolean;
|
|
11
|
+
padding: number;
|
|
12
|
+
radius: number;
|
|
13
|
+
borderColor: string;
|
|
14
|
+
backgroundColor: string;
|
|
15
|
+
shadowColor: string;
|
|
16
|
+
headerGap: number;
|
|
17
|
+
headerMarginBottom: number;
|
|
18
|
+
leftGap: number;
|
|
19
|
+
rightGap: number;
|
|
20
|
+
titleColor: string;
|
|
21
|
+
titleSize: number;
|
|
22
|
+
titleWeight: number;
|
|
23
|
+
markerColor: string;
|
|
24
|
+
markerWidth: number;
|
|
25
|
+
markerHeight: number;
|
|
26
|
+
markerRadius: string;
|
|
27
|
+
markerGap: number;
|
|
28
|
+
metaColor: string;
|
|
29
|
+
metaSize: number;
|
|
30
|
+
exportColor: string;
|
|
31
|
+
}>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
32
|
+
export: (payload?: unknown) => void;
|
|
33
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<BaseCardProps>, {
|
|
34
|
+
title: string;
|
|
35
|
+
metaText: string;
|
|
36
|
+
showHeader: boolean;
|
|
37
|
+
showRight: boolean;
|
|
38
|
+
showTitleMarker: boolean;
|
|
39
|
+
showExport: boolean;
|
|
40
|
+
exportText: string;
|
|
41
|
+
exportDisabled: boolean;
|
|
42
|
+
padding: number;
|
|
43
|
+
radius: number;
|
|
44
|
+
borderColor: string;
|
|
45
|
+
backgroundColor: string;
|
|
46
|
+
shadowColor: string;
|
|
47
|
+
headerGap: number;
|
|
48
|
+
headerMarginBottom: number;
|
|
49
|
+
leftGap: number;
|
|
50
|
+
rightGap: number;
|
|
51
|
+
titleColor: string;
|
|
52
|
+
titleSize: number;
|
|
53
|
+
titleWeight: number;
|
|
54
|
+
markerColor: string;
|
|
55
|
+
markerWidth: number;
|
|
56
|
+
markerHeight: number;
|
|
57
|
+
markerRadius: string;
|
|
58
|
+
markerGap: number;
|
|
59
|
+
metaColor: string;
|
|
60
|
+
metaSize: number;
|
|
61
|
+
exportColor: string;
|
|
62
|
+
}>>> & Readonly<{
|
|
63
|
+
onExport?: ((payload?: unknown) => any) | undefined;
|
|
64
|
+
}>, {
|
|
65
|
+
title: string;
|
|
66
|
+
metaText: string;
|
|
67
|
+
showHeader: boolean;
|
|
68
|
+
showRight: boolean;
|
|
69
|
+
showTitleMarker: boolean;
|
|
70
|
+
showExport: boolean;
|
|
71
|
+
exportText: string;
|
|
72
|
+
exportDisabled: boolean;
|
|
73
|
+
padding: BaseCardCssValue;
|
|
74
|
+
radius: BaseCardCssValue;
|
|
75
|
+
borderColor: string;
|
|
76
|
+
backgroundColor: string;
|
|
77
|
+
shadowColor: string;
|
|
78
|
+
headerGap: BaseCardCssValue;
|
|
79
|
+
headerMarginBottom: BaseCardCssValue;
|
|
80
|
+
leftGap: BaseCardCssValue;
|
|
81
|
+
rightGap: BaseCardCssValue;
|
|
82
|
+
titleColor: string;
|
|
83
|
+
titleSize: BaseCardCssValue;
|
|
84
|
+
titleWeight: string | number;
|
|
85
|
+
markerColor: string;
|
|
86
|
+
markerWidth: BaseCardCssValue;
|
|
87
|
+
markerHeight: BaseCardCssValue;
|
|
88
|
+
markerRadius: BaseCardCssValue;
|
|
89
|
+
markerGap: BaseCardCssValue;
|
|
90
|
+
metaColor: string;
|
|
91
|
+
metaSize: BaseCardCssValue;
|
|
92
|
+
exportColor: string;
|
|
93
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, {
|
|
94
|
+
"title-label"?(_: {}): any;
|
|
95
|
+
title?(_: {}): any;
|
|
96
|
+
"header-right"?(_: {}): any;
|
|
97
|
+
tip?(_: {}): any;
|
|
98
|
+
default?(_: {}): any;
|
|
99
|
+
}>;
|
|
100
|
+
export default _default;
|
|
101
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
102
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
103
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
104
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
105
|
+
} : {
|
|
106
|
+
type: import('vue').PropType<T[K]>;
|
|
107
|
+
required: true;
|
|
108
|
+
};
|
|
109
|
+
};
|
|
110
|
+
type __VLS_WithDefaults<P, D> = {
|
|
111
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
112
|
+
default: D[K];
|
|
113
|
+
}> : P[K];
|
|
114
|
+
};
|
|
115
|
+
type __VLS_Prettify<T> = {
|
|
116
|
+
[K in keyof T]: T[K];
|
|
117
|
+
} & {};
|
|
118
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
119
|
+
new (): {
|
|
120
|
+
$slots: S;
|
|
121
|
+
};
|
|
122
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export type BaseDialogCssValue = string | number;
|
|
2
|
+
export type BaseDialogBeforeConfirm = () => boolean | void | Promise<boolean | void>;
|
|
3
|
+
export interface BaseDialogProps {
|
|
4
|
+
modelValue?: boolean;
|
|
5
|
+
title?: string;
|
|
6
|
+
width?: BaseDialogCssValue;
|
|
7
|
+
top?: string;
|
|
8
|
+
fullscreen?: boolean;
|
|
9
|
+
appendToBody?: boolean;
|
|
10
|
+
destroyOnClose?: boolean;
|
|
11
|
+
closeOnClickModal?: boolean;
|
|
12
|
+
closeOnPressEscape?: boolean;
|
|
13
|
+
showClose?: boolean;
|
|
14
|
+
showFooter?: boolean;
|
|
15
|
+
confirmText?: string;
|
|
16
|
+
cancelText?: string;
|
|
17
|
+
confirmLoading?: boolean;
|
|
18
|
+
confirmDisabled?: boolean;
|
|
19
|
+
beforeConfirm?: BaseDialogBeforeConfirm;
|
|
20
|
+
}
|
|
21
|
+
export interface BaseDialogExpose {
|
|
22
|
+
open: () => void;
|
|
23
|
+
close: () => void;
|
|
24
|
+
confirm: () => Promise<void>;
|
|
25
|
+
}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import type { BaseDialogProps } from './BaseDialog.types';
|
|
2
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<BaseDialogProps>, {
|
|
3
|
+
modelValue: boolean;
|
|
4
|
+
title: string;
|
|
5
|
+
width: string;
|
|
6
|
+
top: string;
|
|
7
|
+
fullscreen: boolean;
|
|
8
|
+
appendToBody: boolean;
|
|
9
|
+
destroyOnClose: boolean;
|
|
10
|
+
closeOnClickModal: boolean;
|
|
11
|
+
closeOnPressEscape: boolean;
|
|
12
|
+
showClose: boolean;
|
|
13
|
+
showFooter: boolean;
|
|
14
|
+
confirmText: string;
|
|
15
|
+
cancelText: string;
|
|
16
|
+
confirmLoading: boolean;
|
|
17
|
+
confirmDisabled: boolean;
|
|
18
|
+
beforeConfirm: undefined;
|
|
19
|
+
}>>, {
|
|
20
|
+
open: () => void;
|
|
21
|
+
close: () => void;
|
|
22
|
+
confirm: () => Promise<void>;
|
|
23
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
24
|
+
"update:modelValue": (value: boolean) => void;
|
|
25
|
+
open: () => void;
|
|
26
|
+
opened: () => void;
|
|
27
|
+
close: () => void;
|
|
28
|
+
closed: () => void;
|
|
29
|
+
cancel: () => void;
|
|
30
|
+
confirm: () => void;
|
|
31
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<BaseDialogProps>, {
|
|
32
|
+
modelValue: boolean;
|
|
33
|
+
title: string;
|
|
34
|
+
width: string;
|
|
35
|
+
top: string;
|
|
36
|
+
fullscreen: boolean;
|
|
37
|
+
appendToBody: boolean;
|
|
38
|
+
destroyOnClose: boolean;
|
|
39
|
+
closeOnClickModal: boolean;
|
|
40
|
+
closeOnPressEscape: boolean;
|
|
41
|
+
showClose: boolean;
|
|
42
|
+
showFooter: boolean;
|
|
43
|
+
confirmText: string;
|
|
44
|
+
cancelText: string;
|
|
45
|
+
confirmLoading: boolean;
|
|
46
|
+
confirmDisabled: boolean;
|
|
47
|
+
beforeConfirm: undefined;
|
|
48
|
+
}>>> & Readonly<{
|
|
49
|
+
onCancel?: (() => any) | undefined;
|
|
50
|
+
onClose?: (() => any) | undefined;
|
|
51
|
+
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
52
|
+
onOpen?: (() => any) | undefined;
|
|
53
|
+
onOpened?: (() => any) | undefined;
|
|
54
|
+
onClosed?: (() => any) | undefined;
|
|
55
|
+
onConfirm?: (() => any) | undefined;
|
|
56
|
+
}>, {
|
|
57
|
+
title: string;
|
|
58
|
+
modelValue: boolean;
|
|
59
|
+
width: import("./BaseDialog.types").BaseDialogCssValue;
|
|
60
|
+
top: string;
|
|
61
|
+
fullscreen: boolean;
|
|
62
|
+
appendToBody: boolean;
|
|
63
|
+
destroyOnClose: boolean;
|
|
64
|
+
closeOnClickModal: boolean;
|
|
65
|
+
closeOnPressEscape: boolean;
|
|
66
|
+
showClose: boolean;
|
|
67
|
+
showFooter: boolean;
|
|
68
|
+
confirmText: string;
|
|
69
|
+
cancelText: string;
|
|
70
|
+
confirmLoading: boolean;
|
|
71
|
+
confirmDisabled: boolean;
|
|
72
|
+
beforeConfirm: import("./BaseDialog.types").BaseDialogBeforeConfirm;
|
|
73
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, {
|
|
74
|
+
header?(_: {}): any;
|
|
75
|
+
default?(_: {}): any;
|
|
76
|
+
footer?(_: {}): any;
|
|
77
|
+
}>;
|
|
78
|
+
export default _default;
|
|
79
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
80
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
81
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
82
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
83
|
+
} : {
|
|
84
|
+
type: import('vue').PropType<T[K]>;
|
|
85
|
+
required: true;
|
|
86
|
+
};
|
|
87
|
+
};
|
|
88
|
+
type __VLS_WithDefaults<P, D> = {
|
|
89
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
90
|
+
default: D[K];
|
|
91
|
+
}> : P[K];
|
|
92
|
+
};
|
|
93
|
+
type __VLS_Prettify<T> = {
|
|
94
|
+
[K in keyof T]: T[K];
|
|
95
|
+
} & {};
|
|
96
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
97
|
+
new (): {
|
|
98
|
+
$slots: S;
|
|
99
|
+
};
|
|
100
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { EChartInitOptions, EChartInstance, EChartLoadingOptions, EChartOption, EChartResizeOptions, EChartSetOptionOptions } from '../../echarts';
|
|
2
|
+
export interface BaseEChartProps {
|
|
3
|
+
option?: EChartOption;
|
|
4
|
+
theme?: string | Record<string, unknown>;
|
|
5
|
+
initOptions?: EChartInitOptions;
|
|
6
|
+
setOptionOptions?: boolean | EChartSetOptionOptions;
|
|
7
|
+
loading?: boolean;
|
|
8
|
+
loadingOptions?: EChartLoadingOptions;
|
|
9
|
+
autoResize?: boolean;
|
|
10
|
+
useDefaultColors?: boolean;
|
|
11
|
+
colorStorageKey?: string;
|
|
12
|
+
defaultColors?: string[];
|
|
13
|
+
group?: string;
|
|
14
|
+
}
|
|
15
|
+
export interface BaseEChartExpose {
|
|
16
|
+
getInstance: () => EChartInstance | null;
|
|
17
|
+
setOption: (option: EChartOption, setOptionOptions?: boolean | EChartSetOptionOptions) => EChartInstance | null;
|
|
18
|
+
resize: (resizeOptions?: EChartResizeOptions) => void;
|
|
19
|
+
dispatchAction: (payload: Record<string, unknown>) => void;
|
|
20
|
+
showLoading: (type?: string, loadingOptions?: EChartLoadingOptions) => void;
|
|
21
|
+
hideLoading: () => void;
|
|
22
|
+
clear: () => void;
|
|
23
|
+
dispose: () => void;
|
|
24
|
+
on: (eventName: string, handler: (...args: any[]) => void, context?: unknown) => void;
|
|
25
|
+
off: (eventName?: string, handler?: (...args: any[]) => void) => void;
|
|
26
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { echarts } from '../../echarts';
|
|
2
|
+
import type { BaseEChartProps } from './BaseEChart.types';
|
|
3
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<BaseEChartProps>, {
|
|
4
|
+
option: () => {};
|
|
5
|
+
initOptions: () => echarts.EChartsInitOpts;
|
|
6
|
+
setOptionOptions: () => echarts.SetOptionOpts;
|
|
7
|
+
loading: boolean;
|
|
8
|
+
autoResize: boolean;
|
|
9
|
+
useDefaultColors: boolean;
|
|
10
|
+
colorStorageKey: string;
|
|
11
|
+
defaultColors: () => never[];
|
|
12
|
+
group: undefined;
|
|
13
|
+
}>>, {
|
|
14
|
+
getInstance: () => echarts.ECharts | null;
|
|
15
|
+
setOption: (option: echarts.EChartsOption, setOptionOptions?: boolean | echarts.SetOptionOpts | undefined) => echarts.ECharts | null;
|
|
16
|
+
resize: (resizeOptions?: echarts.ResizeOpts | undefined) => void;
|
|
17
|
+
dispatchAction: (payload: Record<string, unknown>) => void;
|
|
18
|
+
showLoading: (type?: string | undefined, loadingOptions?: object | undefined) => void;
|
|
19
|
+
hideLoading: () => void;
|
|
20
|
+
clear: () => void;
|
|
21
|
+
dispose: () => void;
|
|
22
|
+
on: (eventName: string, handler: (...args: any[]) => void, context?: unknown) => void;
|
|
23
|
+
off: (eventName?: string | undefined, handler?: ((...args: any[]) => void) | undefined) => void;
|
|
24
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
25
|
+
ready: (chart: echarts.ECharts) => void;
|
|
26
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<BaseEChartProps>, {
|
|
27
|
+
option: () => {};
|
|
28
|
+
initOptions: () => echarts.EChartsInitOpts;
|
|
29
|
+
setOptionOptions: () => echarts.SetOptionOpts;
|
|
30
|
+
loading: boolean;
|
|
31
|
+
autoResize: boolean;
|
|
32
|
+
useDefaultColors: boolean;
|
|
33
|
+
colorStorageKey: string;
|
|
34
|
+
defaultColors: () => never[];
|
|
35
|
+
group: undefined;
|
|
36
|
+
}>>> & Readonly<{
|
|
37
|
+
onReady?: ((chart: echarts.ECharts) => any) | undefined;
|
|
38
|
+
}>, {
|
|
39
|
+
option: echarts.EChartsOption;
|
|
40
|
+
loading: boolean;
|
|
41
|
+
initOptions: echarts.EChartsInitOpts;
|
|
42
|
+
setOptionOptions: boolean | echarts.SetOptionOpts;
|
|
43
|
+
autoResize: boolean;
|
|
44
|
+
useDefaultColors: boolean;
|
|
45
|
+
colorStorageKey: string;
|
|
46
|
+
defaultColors: string[];
|
|
47
|
+
group: string;
|
|
48
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
49
|
+
export default _default;
|
|
50
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
51
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
52
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
53
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
54
|
+
} : {
|
|
55
|
+
type: import('vue').PropType<T[K]>;
|
|
56
|
+
required: true;
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
type __VLS_WithDefaults<P, D> = {
|
|
60
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
61
|
+
default: D[K];
|
|
62
|
+
}> : P[K];
|
|
63
|
+
};
|
|
64
|
+
type __VLS_Prettify<T> = {
|
|
65
|
+
[K in keyof T]: T[K];
|
|
66
|
+
} & {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { ExcelExportOptions } from '../../excel/exportExcel';
|
|
2
|
+
export interface ExportResponseHeaders {
|
|
3
|
+
[key: string]: string | undefined;
|
|
4
|
+
}
|
|
5
|
+
export interface ExportResponseLike {
|
|
6
|
+
data: Blob | BlobPart | ArrayBuffer;
|
|
7
|
+
headers?: ExportResponseHeaders;
|
|
8
|
+
}
|
|
9
|
+
export type ExportRequestHandler = () => Promise<ExportResponseLike>;
|
|
10
|
+
export type ExportMode = 'excel' | 'request' | 'none' | 'invalid';
|
|
11
|
+
export type ExportBeforeHandler = () => boolean | void | Promise<boolean | void>;
|
|
12
|
+
export interface ExportSuccessPayload {
|
|
13
|
+
mode: Exclude<ExportMode, 'none' | 'invalid'>;
|
|
14
|
+
fileName?: string;
|
|
15
|
+
}
|
|
16
|
+
export interface BaseExportExcelConfig<Row = Record<string, any>> {
|
|
17
|
+
excelOptions: ExcelExportOptions<Row>;
|
|
18
|
+
}
|
|
19
|
+
export interface BaseExportRequestConfig {
|
|
20
|
+
requestHandler: ExportRequestHandler;
|
|
21
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ExportResponseLike } from './BaseExportButton.types';
|
|
2
|
+
export declare function extractFileNameFromDisposition(contentDisposition?: string): string;
|
|
3
|
+
export declare function normalizeExportFileName(fileName?: string): string;
|
|
4
|
+
export declare function downloadExportResponse(response: ExportResponseLike, fallbackFileName?: string): string;
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import type { PropType } from 'vue';
|
|
2
|
+
import type { ExcelExportOptions } from '../../excel/exportExcel';
|
|
3
|
+
import type { ExportBeforeHandler, ExportRequestHandler, ExportSuccessPayload } from './BaseExportButton.types';
|
|
4
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
5
|
+
label: {
|
|
6
|
+
type: StringConstructor;
|
|
7
|
+
default: string;
|
|
8
|
+
};
|
|
9
|
+
type: {
|
|
10
|
+
type: PropType<"" | "primary" | "info" | "success" | "warning" | "danger">;
|
|
11
|
+
default: string;
|
|
12
|
+
};
|
|
13
|
+
size: {
|
|
14
|
+
type: PropType<"default" | "small" | "large">;
|
|
15
|
+
default: string;
|
|
16
|
+
};
|
|
17
|
+
plain: {
|
|
18
|
+
type: BooleanConstructor;
|
|
19
|
+
default: boolean;
|
|
20
|
+
};
|
|
21
|
+
link: {
|
|
22
|
+
type: BooleanConstructor;
|
|
23
|
+
default: boolean;
|
|
24
|
+
};
|
|
25
|
+
text: {
|
|
26
|
+
type: BooleanConstructor;
|
|
27
|
+
default: boolean;
|
|
28
|
+
};
|
|
29
|
+
disabled: {
|
|
30
|
+
type: BooleanConstructor;
|
|
31
|
+
default: boolean;
|
|
32
|
+
};
|
|
33
|
+
fileName: {
|
|
34
|
+
type: StringConstructor;
|
|
35
|
+
default: string;
|
|
36
|
+
};
|
|
37
|
+
excelOptions: PropType<ExcelExportOptions<Record<string, any>>>;
|
|
38
|
+
requestHandler: PropType<ExportRequestHandler>;
|
|
39
|
+
beforeExport: PropType<ExportBeforeHandler>;
|
|
40
|
+
successMessage: {
|
|
41
|
+
type: StringConstructor;
|
|
42
|
+
default: string;
|
|
43
|
+
};
|
|
44
|
+
errorMessage: {
|
|
45
|
+
type: StringConstructor;
|
|
46
|
+
default: string;
|
|
47
|
+
};
|
|
48
|
+
autoMessage: {
|
|
49
|
+
type: BooleanConstructor;
|
|
50
|
+
default: boolean;
|
|
51
|
+
};
|
|
52
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
53
|
+
start: () => void;
|
|
54
|
+
success: (payload: ExportSuccessPayload) => void;
|
|
55
|
+
error: (error: unknown) => void;
|
|
56
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
57
|
+
label: {
|
|
58
|
+
type: StringConstructor;
|
|
59
|
+
default: string;
|
|
60
|
+
};
|
|
61
|
+
type: {
|
|
62
|
+
type: PropType<"" | "primary" | "info" | "success" | "warning" | "danger">;
|
|
63
|
+
default: string;
|
|
64
|
+
};
|
|
65
|
+
size: {
|
|
66
|
+
type: PropType<"default" | "small" | "large">;
|
|
67
|
+
default: string;
|
|
68
|
+
};
|
|
69
|
+
plain: {
|
|
70
|
+
type: BooleanConstructor;
|
|
71
|
+
default: boolean;
|
|
72
|
+
};
|
|
73
|
+
link: {
|
|
74
|
+
type: BooleanConstructor;
|
|
75
|
+
default: boolean;
|
|
76
|
+
};
|
|
77
|
+
text: {
|
|
78
|
+
type: BooleanConstructor;
|
|
79
|
+
default: boolean;
|
|
80
|
+
};
|
|
81
|
+
disabled: {
|
|
82
|
+
type: BooleanConstructor;
|
|
83
|
+
default: boolean;
|
|
84
|
+
};
|
|
85
|
+
fileName: {
|
|
86
|
+
type: StringConstructor;
|
|
87
|
+
default: string;
|
|
88
|
+
};
|
|
89
|
+
excelOptions: PropType<ExcelExportOptions<Record<string, any>>>;
|
|
90
|
+
requestHandler: PropType<ExportRequestHandler>;
|
|
91
|
+
beforeExport: PropType<ExportBeforeHandler>;
|
|
92
|
+
successMessage: {
|
|
93
|
+
type: StringConstructor;
|
|
94
|
+
default: string;
|
|
95
|
+
};
|
|
96
|
+
errorMessage: {
|
|
97
|
+
type: StringConstructor;
|
|
98
|
+
default: string;
|
|
99
|
+
};
|
|
100
|
+
autoMessage: {
|
|
101
|
+
type: BooleanConstructor;
|
|
102
|
+
default: boolean;
|
|
103
|
+
};
|
|
104
|
+
}>> & Readonly<{
|
|
105
|
+
onError?: ((error: unknown) => any) | undefined;
|
|
106
|
+
onSuccess?: ((payload: ExportSuccessPayload) => any) | undefined;
|
|
107
|
+
onStart?: (() => any) | undefined;
|
|
108
|
+
}>, {
|
|
109
|
+
type: "" | "primary" | "info" | "success" | "warning" | "danger";
|
|
110
|
+
label: string;
|
|
111
|
+
link: boolean;
|
|
112
|
+
text: boolean;
|
|
113
|
+
disabled: boolean;
|
|
114
|
+
fileName: string;
|
|
115
|
+
size: "default" | "small" | "large";
|
|
116
|
+
plain: boolean;
|
|
117
|
+
successMessage: string;
|
|
118
|
+
errorMessage: string;
|
|
119
|
+
autoMessage: boolean;
|
|
120
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, {
|
|
121
|
+
default?(_: {}): any;
|
|
122
|
+
}>;
|
|
123
|
+
export default _default;
|
|
124
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
125
|
+
new (): {
|
|
126
|
+
$slots: S;
|
|
127
|
+
};
|
|
128
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import BaseExportButton from './BaseExportButton.vue';
|
|
2
|
+
export { BaseExportButton };
|
|
3
|
+
export { downloadExportResponse, extractFileNameFromDisposition, normalizeExportFileName } from './BaseExportButton.utils';
|
|
4
|
+
export type { BaseExportExcelConfig, BaseExportRequestConfig, ExportBeforeHandler, ExportMode, ExportRequestHandler, ExportResponseHeaders, ExportResponseLike, ExportSuccessPayload } from './BaseExportButton.types';
|
|
5
|
+
export default BaseExportButton;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
export type BaseSearchFormCssValue = string | number;
|
|
2
|
+
export type BaseSearchFormFieldType = 'input' | 'select' | 'date' | 'dateRange' | 'slot';
|
|
3
|
+
export type BaseSearchFormOptionValue = string | number | boolean;
|
|
4
|
+
export type BaseSearchFormModel = Record<string, unknown>;
|
|
5
|
+
export interface BaseSearchFormOption {
|
|
6
|
+
label: string;
|
|
7
|
+
value: BaseSearchFormOptionValue;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export interface BaseSearchFormField {
|
|
11
|
+
key: string;
|
|
12
|
+
label?: string;
|
|
13
|
+
type?: BaseSearchFormFieldType;
|
|
14
|
+
placeholder?: string;
|
|
15
|
+
options?: BaseSearchFormOption[];
|
|
16
|
+
span?: number;
|
|
17
|
+
collapsed?: boolean;
|
|
18
|
+
hidden?: boolean;
|
|
19
|
+
clearable?: boolean;
|
|
20
|
+
disabled?: boolean;
|
|
21
|
+
props?: Record<string, unknown>;
|
|
22
|
+
}
|
|
23
|
+
export interface BaseSearchFormProps {
|
|
24
|
+
modelValue?: BaseSearchFormModel;
|
|
25
|
+
fields: BaseSearchFormField[];
|
|
26
|
+
collapsed?: boolean;
|
|
27
|
+
showCollapse?: boolean;
|
|
28
|
+
columns?: number;
|
|
29
|
+
labelWidth?: BaseSearchFormCssValue;
|
|
30
|
+
fieldWidth?: BaseSearchFormCssValue;
|
|
31
|
+
gutter?: number;
|
|
32
|
+
submitText?: string;
|
|
33
|
+
resetText?: string;
|
|
34
|
+
expandText?: string;
|
|
35
|
+
collapseText?: string;
|
|
36
|
+
}
|
|
37
|
+
export interface BaseSearchFormExpose {
|
|
38
|
+
submit: () => void;
|
|
39
|
+
reset: () => void;
|
|
40
|
+
setFieldValue: (key: string, value: unknown) => void;
|
|
41
|
+
getModel: () => BaseSearchFormModel;
|
|
42
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { BaseSearchFormField, BaseSearchFormModel } from './BaseSearchForm.types';
|
|
2
|
+
export declare function cloneSearchFormModel(model?: BaseSearchFormModel): BaseSearchFormModel;
|
|
3
|
+
export declare function getVisibleSearchFields(fields: BaseSearchFormField[], collapsed: boolean): BaseSearchFormField[];
|
|
4
|
+
export declare function resetSearchFormModel(fields: BaseSearchFormField[]): BaseSearchFormModel;
|
|
5
|
+
export declare function toSearchFormCssValue(value?: string | number): string | undefined;
|