@vtj/ui 0.0.5
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/README.md +4 -0
- package/lib/cdn/index.cjs.js +1 -0
- package/lib/cdn/index.es.js +242 -0
- package/lib/cdn/index.umd.js +1 -0
- package/lib/cdn/style.css +1 -0
- package/lib/index.cjs.js +1 -0
- package/lib/index.es.js +246 -0
- package/lib/index.umd.js +1 -0
- package/lib/style.css +1 -0
- package/package.json +55 -0
- package/src/components/XChart/Chart.vue +42 -0
- package/src/components/XChart/index.ts +8 -0
- package/src/components/XChart/style.scss +0 -0
- package/src/components/XChartBar/Bar.vue +27 -0
- package/src/components/XChartBar/index.ts +8 -0
- package/src/components/XChartLine/Line.vue +27 -0
- package/src/components/XChartLine/index.ts +8 -0
- package/src/components/XChartPie/Pie.vue +54 -0
- package/src/components/XChartPie/index.ts +8 -0
- package/src/components/XTestSuit/TestSuit.vue +47 -0
- package/src/components/XTestSuit/index.ts +8 -0
- package/src/components/XTestSuit/style.scss +14 -0
- package/src/hooks/useECharts.ts +55 -0
- package/src/hooks/useRectChart.ts +46 -0
- package/src/index.ts +23 -0
- package/src/theme/_vars.scss +8 -0
- package/src/theme/base.scss +0 -0
- package/src/theme/index.scss +4 -0
- package/types/dev/vite-env.d.ts +7 -0
- package/types/index.d.ts +4 -0
- package/types/src/components/XChart/Chart.vue.d.ts +69 -0
- package/types/src/components/XChart/index.d.ts +2 -0
- package/types/src/components/XChartBar/Bar.vue.d.ts +124 -0
- package/types/src/components/XChartBar/index.d.ts +2 -0
- package/types/src/components/XChartLine/Line.vue.d.ts +124 -0
- package/types/src/components/XChartLine/index.d.ts +2 -0
- package/types/src/components/XChartPie/Pie.vue.d.ts +111 -0
- package/types/src/components/XChartPie/index.d.ts +2 -0
- package/types/src/components/XTestSuit/TestSuit.vue.d.ts +59 -0
- package/types/src/components/XTestSuit/index.d.ts +2 -0
- package/types/src/hooks/useECharts.d.ts +15 -0
- package/types/src/hooks/useRectChart.d.ts +4 -0
- package/types/src/index.d.ts +6 -0
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
export declare type ISourceType = Array<Record<string, any>>;
|
|
2
|
+
export declare type IOptionFactory = (opt?: Record<string, any>) => Promise<Record<string, any>>;
|
|
3
|
+
export interface Props {
|
|
4
|
+
category?: 'x' | 'y';
|
|
5
|
+
dimensions?: string[];
|
|
6
|
+
source?: ISourceType | (() => Promise<ISourceType>);
|
|
7
|
+
optionFactory?: IOptionFactory;
|
|
8
|
+
}
|
|
9
|
+
declare const _sfc_main: import("vue").DefineComponent<{
|
|
10
|
+
category: {
|
|
11
|
+
type: StringConstructor;
|
|
12
|
+
required: false;
|
|
13
|
+
default: string;
|
|
14
|
+
};
|
|
15
|
+
dimensions: {
|
|
16
|
+
type: ArrayConstructor;
|
|
17
|
+
required: false;
|
|
18
|
+
default: () => never[];
|
|
19
|
+
};
|
|
20
|
+
source: {
|
|
21
|
+
type: (FunctionConstructor | ArrayConstructor)[];
|
|
22
|
+
required: false;
|
|
23
|
+
default: () => never[];
|
|
24
|
+
};
|
|
25
|
+
optionFactory: {
|
|
26
|
+
type: FunctionConstructor;
|
|
27
|
+
required: false;
|
|
28
|
+
};
|
|
29
|
+
}, {
|
|
30
|
+
props: {
|
|
31
|
+
category: 'x' | 'y';
|
|
32
|
+
dimensions: string[];
|
|
33
|
+
source: ISourceType | (() => Promise<ISourceType>);
|
|
34
|
+
optionFactory?: IOptionFactory | undefined;
|
|
35
|
+
};
|
|
36
|
+
optionFactory: (opt?: Record<string, any> | undefined) => Promise<any>;
|
|
37
|
+
key: import("vue").Ref<symbol>;
|
|
38
|
+
XChart: import("vue").DefineComponent<{
|
|
39
|
+
width: {
|
|
40
|
+
type: StringConstructor;
|
|
41
|
+
required: false;
|
|
42
|
+
default: string;
|
|
43
|
+
};
|
|
44
|
+
height: {
|
|
45
|
+
type: StringConstructor;
|
|
46
|
+
required: false;
|
|
47
|
+
default: string;
|
|
48
|
+
};
|
|
49
|
+
option: {
|
|
50
|
+
type: ObjectConstructor;
|
|
51
|
+
required: false;
|
|
52
|
+
default: () => {};
|
|
53
|
+
};
|
|
54
|
+
optionFactory: {
|
|
55
|
+
type: FunctionConstructor;
|
|
56
|
+
required: false;
|
|
57
|
+
};
|
|
58
|
+
}, {
|
|
59
|
+
props: {
|
|
60
|
+
width: string;
|
|
61
|
+
height: string;
|
|
62
|
+
option: Record<string, any>;
|
|
63
|
+
optionFactory?: import("../XChart/Chart.vue").IOptionFactory | undefined;
|
|
64
|
+
};
|
|
65
|
+
container: import("vue").Ref<HTMLElement | undefined>;
|
|
66
|
+
style: import("vue").ComputedRef<{
|
|
67
|
+
width: string;
|
|
68
|
+
height: string;
|
|
69
|
+
}>;
|
|
70
|
+
getChart: () => any;
|
|
71
|
+
reset: () => void;
|
|
72
|
+
resize: import("lodash").DebouncedFunc<() => void>;
|
|
73
|
+
echarts: typeof import("echarts/types/dist/echarts");
|
|
74
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
75
|
+
width: {
|
|
76
|
+
type: StringConstructor;
|
|
77
|
+
required: false;
|
|
78
|
+
default: string;
|
|
79
|
+
};
|
|
80
|
+
height: {
|
|
81
|
+
type: StringConstructor;
|
|
82
|
+
required: false;
|
|
83
|
+
default: string;
|
|
84
|
+
};
|
|
85
|
+
option: {
|
|
86
|
+
type: ObjectConstructor;
|
|
87
|
+
required: false;
|
|
88
|
+
default: () => {};
|
|
89
|
+
};
|
|
90
|
+
optionFactory: {
|
|
91
|
+
type: FunctionConstructor;
|
|
92
|
+
required: false;
|
|
93
|
+
};
|
|
94
|
+
}>>, {
|
|
95
|
+
width: string;
|
|
96
|
+
height: string;
|
|
97
|
+
option: Record<string, any>;
|
|
98
|
+
}>;
|
|
99
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
100
|
+
category: {
|
|
101
|
+
type: StringConstructor;
|
|
102
|
+
required: false;
|
|
103
|
+
default: string;
|
|
104
|
+
};
|
|
105
|
+
dimensions: {
|
|
106
|
+
type: ArrayConstructor;
|
|
107
|
+
required: false;
|
|
108
|
+
default: () => never[];
|
|
109
|
+
};
|
|
110
|
+
source: {
|
|
111
|
+
type: (FunctionConstructor | ArrayConstructor)[];
|
|
112
|
+
required: false;
|
|
113
|
+
default: () => never[];
|
|
114
|
+
};
|
|
115
|
+
optionFactory: {
|
|
116
|
+
type: FunctionConstructor;
|
|
117
|
+
required: false;
|
|
118
|
+
};
|
|
119
|
+
}>>, {
|
|
120
|
+
category: string;
|
|
121
|
+
dimensions: unknown[];
|
|
122
|
+
source: Function | unknown[];
|
|
123
|
+
}>;
|
|
124
|
+
export default _sfc_main;
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
export declare type ISourceType = Array<Record<string, any>>;
|
|
2
|
+
export declare type IOptionFactory = (opt?: Record<string, any>) => Promise<Record<string, any>>;
|
|
3
|
+
export interface Props {
|
|
4
|
+
dimensions?: string[];
|
|
5
|
+
source?: ISourceType | (() => Promise<ISourceType>);
|
|
6
|
+
optionFactory?: IOptionFactory;
|
|
7
|
+
}
|
|
8
|
+
declare const _sfc_main: import("vue").DefineComponent<{
|
|
9
|
+
dimensions: {
|
|
10
|
+
type: ArrayConstructor;
|
|
11
|
+
required: false;
|
|
12
|
+
default: () => never[];
|
|
13
|
+
};
|
|
14
|
+
source: {
|
|
15
|
+
type: (FunctionConstructor | ArrayConstructor)[];
|
|
16
|
+
required: false;
|
|
17
|
+
default: () => never[];
|
|
18
|
+
};
|
|
19
|
+
optionFactory: {
|
|
20
|
+
type: FunctionConstructor;
|
|
21
|
+
required: false;
|
|
22
|
+
};
|
|
23
|
+
}, {
|
|
24
|
+
props: {
|
|
25
|
+
dimensions: string[];
|
|
26
|
+
source: ISourceType | (() => Promise<ISourceType>);
|
|
27
|
+
optionFactory?: IOptionFactory | undefined;
|
|
28
|
+
};
|
|
29
|
+
key: import("vue").Ref<symbol>;
|
|
30
|
+
optionFactory: (opts: any) => Promise<any>;
|
|
31
|
+
XChart: import("vue").DefineComponent<{
|
|
32
|
+
width: {
|
|
33
|
+
type: StringConstructor;
|
|
34
|
+
required: false;
|
|
35
|
+
default: string;
|
|
36
|
+
};
|
|
37
|
+
height: {
|
|
38
|
+
type: StringConstructor;
|
|
39
|
+
required: false;
|
|
40
|
+
default: string;
|
|
41
|
+
};
|
|
42
|
+
option: {
|
|
43
|
+
type: ObjectConstructor;
|
|
44
|
+
required: false;
|
|
45
|
+
default: () => {};
|
|
46
|
+
};
|
|
47
|
+
optionFactory: {
|
|
48
|
+
type: FunctionConstructor;
|
|
49
|
+
required: false;
|
|
50
|
+
};
|
|
51
|
+
}, {
|
|
52
|
+
props: {
|
|
53
|
+
width: string;
|
|
54
|
+
height: string;
|
|
55
|
+
option: Record<string, any>;
|
|
56
|
+
optionFactory?: import("../XChart/Chart.vue").IOptionFactory | undefined;
|
|
57
|
+
};
|
|
58
|
+
container: import("vue").Ref<HTMLElement | undefined>;
|
|
59
|
+
style: import("vue").ComputedRef<{
|
|
60
|
+
width: string;
|
|
61
|
+
height: string;
|
|
62
|
+
}>;
|
|
63
|
+
getChart: () => any;
|
|
64
|
+
reset: () => void;
|
|
65
|
+
resize: import("lodash").DebouncedFunc<() => void>;
|
|
66
|
+
echarts: typeof import("echarts/types/dist/echarts");
|
|
67
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
68
|
+
width: {
|
|
69
|
+
type: StringConstructor;
|
|
70
|
+
required: false;
|
|
71
|
+
default: string;
|
|
72
|
+
};
|
|
73
|
+
height: {
|
|
74
|
+
type: StringConstructor;
|
|
75
|
+
required: false;
|
|
76
|
+
default: string;
|
|
77
|
+
};
|
|
78
|
+
option: {
|
|
79
|
+
type: ObjectConstructor;
|
|
80
|
+
required: false;
|
|
81
|
+
default: () => {};
|
|
82
|
+
};
|
|
83
|
+
optionFactory: {
|
|
84
|
+
type: FunctionConstructor;
|
|
85
|
+
required: false;
|
|
86
|
+
};
|
|
87
|
+
}>>, {
|
|
88
|
+
width: string;
|
|
89
|
+
height: string;
|
|
90
|
+
option: Record<string, any>;
|
|
91
|
+
}>;
|
|
92
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
93
|
+
dimensions: {
|
|
94
|
+
type: ArrayConstructor;
|
|
95
|
+
required: false;
|
|
96
|
+
default: () => never[];
|
|
97
|
+
};
|
|
98
|
+
source: {
|
|
99
|
+
type: (FunctionConstructor | ArrayConstructor)[];
|
|
100
|
+
required: false;
|
|
101
|
+
default: () => never[];
|
|
102
|
+
};
|
|
103
|
+
optionFactory: {
|
|
104
|
+
type: FunctionConstructor;
|
|
105
|
+
required: false;
|
|
106
|
+
};
|
|
107
|
+
}>>, {
|
|
108
|
+
dimensions: unknown[];
|
|
109
|
+
source: Function | unknown[];
|
|
110
|
+
}>;
|
|
111
|
+
export default _sfc_main;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
export interface Props {
|
|
2
|
+
p1?: string;
|
|
3
|
+
p2?: number;
|
|
4
|
+
p3?: boolean;
|
|
5
|
+
p4?: any;
|
|
6
|
+
}
|
|
7
|
+
declare const _sfc_main: import("vue").DefineComponent<{
|
|
8
|
+
p1: {
|
|
9
|
+
type: StringConstructor;
|
|
10
|
+
required: false;
|
|
11
|
+
};
|
|
12
|
+
p2: {
|
|
13
|
+
type: NumberConstructor;
|
|
14
|
+
required: false;
|
|
15
|
+
};
|
|
16
|
+
p3: {
|
|
17
|
+
type: BooleanConstructor;
|
|
18
|
+
required: false;
|
|
19
|
+
};
|
|
20
|
+
p4: {
|
|
21
|
+
type: null;
|
|
22
|
+
required: false;
|
|
23
|
+
};
|
|
24
|
+
}, {
|
|
25
|
+
props: {
|
|
26
|
+
p1?: string | undefined;
|
|
27
|
+
p2?: number | undefined;
|
|
28
|
+
p3?: boolean | undefined;
|
|
29
|
+
p4?: any;
|
|
30
|
+
};
|
|
31
|
+
emit: (event: "click", ...args: any[]) => void;
|
|
32
|
+
propList: import("vue").ComputedRef<{
|
|
33
|
+
name: string;
|
|
34
|
+
value: any;
|
|
35
|
+
}[]>;
|
|
36
|
+
onClick: () => void;
|
|
37
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "click"[], "click", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
38
|
+
p1: {
|
|
39
|
+
type: StringConstructor;
|
|
40
|
+
required: false;
|
|
41
|
+
};
|
|
42
|
+
p2: {
|
|
43
|
+
type: NumberConstructor;
|
|
44
|
+
required: false;
|
|
45
|
+
};
|
|
46
|
+
p3: {
|
|
47
|
+
type: BooleanConstructor;
|
|
48
|
+
required: false;
|
|
49
|
+
};
|
|
50
|
+
p4: {
|
|
51
|
+
type: null;
|
|
52
|
+
required: false;
|
|
53
|
+
};
|
|
54
|
+
}>> & {
|
|
55
|
+
onClick?: ((...args: any[]) => any) | undefined;
|
|
56
|
+
}, {
|
|
57
|
+
p3: boolean;
|
|
58
|
+
}>;
|
|
59
|
+
export default _sfc_main;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
import * as echarts from 'echarts';
|
|
3
|
+
export declare type IOptionFactory = (opt?: Record<string, any>) => Promise<Record<string, any>>;
|
|
4
|
+
export interface Props {
|
|
5
|
+
width?: string;
|
|
6
|
+
height?: string;
|
|
7
|
+
option?: Record<string, any>;
|
|
8
|
+
optionFactory?: IOptionFactory;
|
|
9
|
+
}
|
|
10
|
+
export default function (container: Ref, props?: Props): {
|
|
11
|
+
getChart: () => any;
|
|
12
|
+
echarts: typeof echarts;
|
|
13
|
+
reset: () => void;
|
|
14
|
+
resize: import("lodash").DebouncedFunc<() => void>;
|
|
15
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import XTestSuit from './components/XTestSuit';
|
|
2
|
+
import XChart from './components/XChart';
|
|
3
|
+
import XChartBar from './components/XChartBar';
|
|
4
|
+
import XChartLine from './components/XChartLine';
|
|
5
|
+
import XChartPie from './components/XChartPie';
|
|
6
|
+
export { XTestSuit, XChart, XChartBar, XChartLine, XChartPie };
|