@vtj/ui 0.0.5 → 0.4.0

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.
Files changed (119) hide show
  1. package/LICENSE +21 -0
  2. package/cdn/index.js +1 -0
  3. package/cdn/style.css +1 -0
  4. package/lib/index.js +2039 -0
  5. package/lib/style.css +1 -1
  6. package/package.json +24 -33
  7. package/types/components/block/Block.vue.d.ts +143 -0
  8. package/types/components/block/block.d.ts +68 -0
  9. package/types/components/block/index.d.ts +319 -0
  10. package/types/components/config/Config.d.ts +26 -0
  11. package/types/components/config/index.d.ts +19 -0
  12. package/types/components/config/props.d.ts +6 -0
  13. package/types/components/container/Container.vue.d.ts +52 -0
  14. package/types/components/container/container.d.ts +46 -0
  15. package/types/components/container/index.d.ts +159 -0
  16. package/types/components/cron/Cron.vue.d.ts +9 -0
  17. package/types/components/cron/cron.d.ts +23 -0
  18. package/types/components/cron/index.d.ts +11 -0
  19. package/types/components/dialog/Dialog.vue.d.ts +289 -0
  20. package/types/components/dialog/create.d.ts +6 -0
  21. package/types/components/dialog/dialog.d.ts +155 -0
  22. package/types/components/dialog/hooks.d.ts +927 -0
  23. package/types/components/dialog/index.d.ts +638 -0
  24. package/types/components/element/Element.d.ts +25 -0
  25. package/types/components/element/index.d.ts +21 -0
  26. package/types/components/field/Field.vue.d.ts +802 -0
  27. package/types/components/field/field.d.ts +230 -0
  28. package/types/components/field/hooks.d.ts +23 -0
  29. package/types/components/field/index.d.ts +2034 -0
  30. package/types/components/field/setters/InputSetter.d.ts +45 -0
  31. package/types/components/field/setters/SelectSetter.d.ts +45 -0
  32. package/types/components/field/setters/factory.d.ts +54 -0
  33. package/types/components/field/setters/index.d.ts +93 -0
  34. package/types/components/form/Form.vue.d.ts +5352 -0
  35. package/types/components/form/form.d.ts +384 -0
  36. package/types/components/form/hooks.d.ts +1906 -0
  37. package/types/components/form/index.d.ts +15373 -0
  38. package/types/components/help/Help.vue.d.ts +315 -0
  39. package/types/components/help/help.d.ts +172 -0
  40. package/types/components/help/hooks.d.ts +18 -0
  41. package/types/components/help/index.d.ts +316 -0
  42. package/types/components/icon/Icon.vue.d.ts +52 -0
  43. package/types/components/icon/icon.d.ts +30 -0
  44. package/types/components/icon/index.d.ts +166 -0
  45. package/types/components/index.d.ts +16 -0
  46. package/types/components/page/Page.vue.d.ts +22 -0
  47. package/types/components/page/index.d.ts +118 -0
  48. package/types/components/page/page.d.ts +9 -0
  49. package/types/components/panel/Panel.vue.d.ts +573 -0
  50. package/types/components/panel/index.d.ts +1207 -0
  51. package/types/components/panel/panel.d.ts +227 -0
  52. package/types/components/text/Text.vue.d.ts +52 -0
  53. package/types/components/text/index.d.ts +165 -0
  54. package/types/components/text/text.d.ts +37 -0
  55. package/types/components/tool/Tool.vue.d.ts +158 -0
  56. package/types/components/tool/Trigger.d.ts +29 -0
  57. package/types/components/tool/hooks.d.ts +250 -0
  58. package/types/components/tool/index.d.ts +371 -0
  59. package/types/components/tool/tool.d.ts +91 -0
  60. package/types/components/toolbar/Toolbar.vue.d.ts +44 -0
  61. package/types/components/toolbar/hooks.d.ts +14 -0
  62. package/types/components/toolbar/index.d.ts +161 -0
  63. package/types/components/toolbar/toolbar.d.ts +45 -0
  64. package/types/components/wrapper/Wrapper.vue.d.ts +268 -0
  65. package/types/components/wrapper/index.d.ts +601 -0
  66. package/types/components/wrapper/wrapper.d.ts +145 -0
  67. package/types/constants.d.ts +4 -0
  68. package/types/hooks/index.d.ts +4 -0
  69. package/types/hooks/useConfig.d.ts +5 -0
  70. package/types/hooks/useDraggable.d.ts +13 -0
  71. package/types/hooks/useIcon.d.ts +4 -0
  72. package/types/hooks/useResizable.d.ts +25 -0
  73. package/types/index.d.ts +13 -4
  74. package/types/list.d.ts +21588 -0
  75. package/types/utils/emits.d.ts +6 -0
  76. package/types/utils/index.d.ts +4 -0
  77. package/types/utils/install.d.ts +9 -0
  78. package/types/utils/make-install.d.ts +5 -0
  79. package/types/utils/util.d.ts +8 -0
  80. package/README.md +0 -4
  81. package/lib/cdn/index.cjs.js +0 -1
  82. package/lib/cdn/index.es.js +0 -242
  83. package/lib/cdn/index.umd.js +0 -1
  84. package/lib/cdn/style.css +0 -1
  85. package/lib/index.cjs.js +0 -1
  86. package/lib/index.es.js +0 -246
  87. package/lib/index.umd.js +0 -1
  88. package/src/components/XChart/Chart.vue +0 -42
  89. package/src/components/XChart/index.ts +0 -8
  90. package/src/components/XChart/style.scss +0 -0
  91. package/src/components/XChartBar/Bar.vue +0 -27
  92. package/src/components/XChartBar/index.ts +0 -8
  93. package/src/components/XChartLine/Line.vue +0 -27
  94. package/src/components/XChartLine/index.ts +0 -8
  95. package/src/components/XChartPie/Pie.vue +0 -54
  96. package/src/components/XChartPie/index.ts +0 -8
  97. package/src/components/XTestSuit/TestSuit.vue +0 -47
  98. package/src/components/XTestSuit/index.ts +0 -8
  99. package/src/components/XTestSuit/style.scss +0 -14
  100. package/src/hooks/useECharts.ts +0 -55
  101. package/src/hooks/useRectChart.ts +0 -46
  102. package/src/index.ts +0 -23
  103. package/src/theme/_vars.scss +0 -8
  104. package/src/theme/base.scss +0 -0
  105. package/src/theme/index.scss +0 -4
  106. package/types/dev/vite-env.d.ts +0 -7
  107. package/types/src/components/XChart/Chart.vue.d.ts +0 -69
  108. package/types/src/components/XChart/index.d.ts +0 -2
  109. package/types/src/components/XChartBar/Bar.vue.d.ts +0 -124
  110. package/types/src/components/XChartBar/index.d.ts +0 -2
  111. package/types/src/components/XChartLine/Line.vue.d.ts +0 -124
  112. package/types/src/components/XChartLine/index.d.ts +0 -2
  113. package/types/src/components/XChartPie/Pie.vue.d.ts +0 -111
  114. package/types/src/components/XChartPie/index.d.ts +0 -2
  115. package/types/src/components/XTestSuit/TestSuit.vue.d.ts +0 -59
  116. package/types/src/components/XTestSuit/index.d.ts +0 -2
  117. package/types/src/hooks/useECharts.d.ts +0 -15
  118. package/types/src/hooks/useRectChart.d.ts +0 -4
  119. package/types/src/index.d.ts +0 -6
@@ -1,27 +0,0 @@
1
- <template>
2
- <XChart :key="key" :optionFactory="optionFactory"></XChart>
3
- </template>
4
- <script lang="ts" setup>
5
- import { XChart } from '@vtj/ui';
6
- import useRectChart from '../../hooks/useRectChart';
7
- export type ISourceType = Array<Record<string, any>>;
8
-
9
- export type IOptionFactory = (
10
- opt?: Record<string, any>
11
- ) => Promise<Record<string, any>>;
12
-
13
- export interface Props {
14
- category?: 'x' | 'y';
15
- dimensions?: string[];
16
- source?: ISourceType | (() => Promise<ISourceType>);
17
- optionFactory?: IOptionFactory;
18
- }
19
-
20
- const props = withDefaults(defineProps<Props>(), {
21
- category: 'x',
22
- dimensions: () => [],
23
- source: () => []
24
- });
25
-
26
- const { optionFactory, key } = useRectChart(props, 'bar');
27
- </script>
@@ -1,8 +0,0 @@
1
- import Bar from './Bar.vue';
2
- import { App } from 'vue';
3
-
4
- Bar.install = function (app: App) {
5
- app.component('XChartBar', Bar);
6
- };
7
-
8
- export default Bar;
@@ -1,27 +0,0 @@
1
- <template>
2
- <XChart :key="key" :optionFactory="optionFactory"></XChart>
3
- </template>
4
- <script lang="ts" setup>
5
- import { XChart } from '@vtj/ui';
6
- import useRectChart from '../../hooks/useRectChart';
7
- export type ISourceType = Array<Record<string, any>>;
8
-
9
- export type IOptionFactory = (
10
- opt?: Record<string, any>
11
- ) => Promise<Record<string, any>>;
12
-
13
- export interface Props {
14
- category?: 'x' | 'y';
15
- dimensions?: string[];
16
- source?: ISourceType | (() => Promise<ISourceType>);
17
- optionFactory?: IOptionFactory;
18
- }
19
-
20
- const props = withDefaults(defineProps<Props>(), {
21
- category: 'x',
22
- dimensions: () => [],
23
- source: () => []
24
- });
25
-
26
- const { optionFactory, key } = useRectChart(props, 'line');
27
- </script>
@@ -1,8 +0,0 @@
1
- import Line from './Line.vue';
2
- import { App } from 'vue';
3
-
4
- Line.install = function (app: App) {
5
- app.component('XChartLine', Line);
6
- };
7
-
8
- export default Line;
@@ -1,54 +0,0 @@
1
- <template>
2
- <XChart :key="key" :optionFactory="optionFactory"></XChart>
3
- </template>
4
- <script lang="ts" setup>
5
- import { XChart } from '@vtj/ui';
6
- import { merge } from '@vtj/utils';
7
- import { ref, watch } from 'vue';
8
- export type ISourceType = Array<Record<string, any>>;
9
-
10
- export type IOptionFactory = (
11
- opt?: Record<string, any>
12
- ) => Promise<Record<string, any>>;
13
-
14
- export interface Props {
15
- dimensions?: string[];
16
- source?: ISourceType | (() => Promise<ISourceType>);
17
- optionFactory?: IOptionFactory;
18
- }
19
-
20
- const props = withDefaults(defineProps<Props>(), {
21
- dimensions: () => [],
22
- source: () => []
23
- });
24
-
25
- const key = ref(Symbol('key'));
26
-
27
- const optionFactory = async (opts: any) => {
28
- const option = {
29
- ...opts,
30
- dataset: {
31
- dimensions: props.dimensions,
32
- source:
33
- typeof props.source === 'function' ? await props.source() : props.source
34
- },
35
- series: [
36
- {
37
- type: 'pie'
38
- }
39
- ]
40
- };
41
-
42
- return merge(
43
- option,
44
- props.optionFactory ? await props.optionFactory(option) : {}
45
- );
46
- };
47
-
48
- watch(
49
- () => [props.dimensions, props.source, props.optionFactory],
50
- () => {
51
- key.value = Symbol('key');
52
- }
53
- );
54
- </script>
@@ -1,8 +0,0 @@
1
- import Pie from './Pie.vue';
2
- import { App } from 'vue';
3
-
4
- Pie.install = function (app: App) {
5
- app.component('XChartPie', Pie);
6
- };
7
-
8
- export default Pie;
@@ -1,47 +0,0 @@
1
- <template>
2
- <div class="x-test-suit">
3
- <div class="x-test-suit__header">XTestSuit</div>
4
- <div class="x-test-suit__body">
5
- <div class="x-test-suit_props">
6
- <div v-for="item in propList">
7
- {{ item.name }}: {{ JSON.stringify(item.value) }}
8
- </div>
9
- </div>
10
- <div class="x-test-suit_events">
11
- <button @click="onClick">Tigger Click Event</button>
12
- </div>
13
- <div class="x-test-suit_slots">
14
- <div>
15
- <slot> Default Slot</slot>
16
- </div>
17
- <div v-if="$slots.footer">
18
- <slot name="footer"></slot>
19
- </div>
20
- </div>
21
- </div>
22
- </div>
23
- </template>
24
- <script lang="ts" setup>
25
- import { computed } from 'vue';
26
- export interface Props {
27
- p1?: string;
28
- p2?: number;
29
- p3?: boolean;
30
- p4?: any;
31
- }
32
- const props = withDefaults(defineProps<Props>(), {});
33
- const emit = defineEmits(['click']);
34
-
35
- const propList = computed(() => {
36
- return [
37
- { name: 'p1', value: props.p1 },
38
- { name: 'p2', value: props.p2 },
39
- { name: 'p3', value: props.p3 },
40
- { name: 'p4', value: props.p4 }
41
- ];
42
- });
43
-
44
- const onClick = () => {
45
- emit('click');
46
- };
47
- </script>
@@ -1,8 +0,0 @@
1
- import TestSuit from './TestSuit.vue';
2
- import { App } from 'vue';
3
-
4
- TestSuit.install = function (app: App) {
5
- app.component('XTestSuit', TestSuit);
6
- };
7
-
8
- export default TestSuit;
@@ -1,14 +0,0 @@
1
- .x-test-suit {
2
- width: 100%;
3
- height: 100%;
4
- border: 1px solid #ccc;
5
- &__header {
6
- padding: 5px 10px;
7
- background-color: #efefef;
8
- }
9
- &__body {
10
- padding: 10px;
11
- }
12
- &__props {
13
- }
14
- }
@@ -1,55 +0,0 @@
1
- import { Ref, ref, onMounted, watch } from 'vue';
2
- import * as echarts from 'echarts';
3
- import { useResizeObserver } from '@vueuse/core';
4
- import { merge, debounce } from '@vtj/utils';
5
-
6
- export type IOptionFactory = (
7
- opt?: Record<string, any>
8
- ) => Promise<Record<string, any>>;
9
-
10
- export interface Props {
11
- width?: string;
12
- height?: string;
13
- option?: Record<string, any>;
14
- optionFactory?: IOptionFactory;
15
- }
16
-
17
- export default function (container: Ref, props: Props = {}) {
18
- const done = ref(false);
19
- let chart: any = null;
20
- const init = async (opt?: Record<string, any>) => {
21
- chart = echarts.init(container.value);
22
- const option =
23
- opt ||
24
- merge(
25
- {},
26
- props.option,
27
- props.optionFactory ? await props.optionFactory(props.option) : {}
28
- );
29
- chart.setOption(option);
30
- };
31
-
32
- const reset = () => {
33
- chart?.dispose();
34
- init();
35
- };
36
-
37
- const resize = debounce(() => {
38
- if (!done.value) {
39
- done.value = true;
40
- return;
41
- }
42
- chart?.resize();
43
- }, 100);
44
-
45
- onMounted(init);
46
-
47
- watch(() => [props.option, props.optionFactory], reset);
48
- useResizeObserver(container, resize);
49
- return {
50
- getChart: () => chart,
51
- echarts,
52
- reset,
53
- resize
54
- };
55
- }
@@ -1,46 +0,0 @@
1
- import { merge } from '@vtj/utils';
2
- import { ref, watch } from 'vue';
3
- export default function (props: any, chartType: 'line' | 'bar') {
4
- const optionFactory = async (opt?: Record<string, any>) => {
5
- const option: Record<string, any> = {
6
- ...opt,
7
- title: {},
8
- xAxis: {},
9
- yAxis: {}
10
- };
11
- if (props.category === 'x') {
12
- option.xAxis = { type: 'category' };
13
- option.yAxis = {};
14
- } else {
15
- option.xAxis = {};
16
- option.yAxis = { type: 'category' };
17
- }
18
- option.dataset = {
19
- dimensions: props.dimensions,
20
- source:
21
- typeof props.source === 'function' ? await props.source() : props.source
22
- };
23
- const length = (props.dimensions || []).length;
24
- if (length > 1) {
25
- const series = new Array(length - 1);
26
- series.fill({ type: chartType });
27
- option.series = series;
28
- }
29
-
30
- return merge(
31
- option,
32
- props.optionFactory ? await props.optionFactory(option) : {}
33
- );
34
- };
35
- const key = ref(Symbol('key'));
36
- watch(
37
- () => [props.category, props.dimensions, props.source, props.optionFactory],
38
- () => {
39
- key.value = Symbol('key');
40
- }
41
- );
42
- return {
43
- optionFactory,
44
- key
45
- };
46
- }
package/src/index.ts DELETED
@@ -1,23 +0,0 @@
1
- import './theme/index.scss';
2
- import { App } from 'vue';
3
- import XTestSuit from './components/XTestSuit';
4
- import XChart from './components/XChart';
5
- import XChartBar from './components/XChartBar';
6
- import XChartLine from './components/XChartLine';
7
- import XChartPie from './components/XChartPie';
8
-
9
- const components: Record<string, any> = {
10
- XTestSuit,
11
- XChart,
12
- XChartBar,
13
- XChartLine,
14
- XChartPie
15
- };
16
-
17
- components.install = function (app: App) {
18
- Object.keys(components).forEach((key) => {
19
- app.component(key, components[key]);
20
- });
21
- };
22
-
23
- export { XTestSuit, XChart, XChartBar, XChartLine, XChartPie };
@@ -1,8 +0,0 @@
1
- $--color-primary: #409eff;
2
- $--color-primary-dark: #337ecc;
3
-
4
- $--white: #fff;
5
- $--black: #000;
6
-
7
- $--base-background: $--white;
8
- $--page-background: #f2f3f5;
File without changes
@@ -1,4 +0,0 @@
1
- @import './vars';
2
- @import './base.scss';
3
- @import '../components/XTestSuit/style.scss';
4
- @import '../components/XChart/style.scss';
@@ -1,7 +0,0 @@
1
- /// <reference types="vite/client" />
2
-
3
- declare module '*.vue' {
4
- import type { DefineComponent } from 'vue';
5
- const component: DefineComponent<{}, {}, any>;
6
- export default component;
7
- }
@@ -1,69 +0,0 @@
1
- export declare type IOptionFactory = (opt?: Record<string, any>) => Promise<Record<string, any>>;
2
- export interface Props {
3
- width?: string;
4
- height?: string;
5
- option?: Record<string, any>;
6
- optionFactory?: IOptionFactory;
7
- }
8
- declare const _sfc_main: import("vue").DefineComponent<{
9
- width: {
10
- type: StringConstructor;
11
- required: false;
12
- default: string;
13
- };
14
- height: {
15
- type: StringConstructor;
16
- required: false;
17
- default: string;
18
- };
19
- option: {
20
- type: ObjectConstructor;
21
- required: false;
22
- default: () => {};
23
- };
24
- optionFactory: {
25
- type: FunctionConstructor;
26
- required: false;
27
- };
28
- }, {
29
- props: {
30
- width: string;
31
- height: string;
32
- option: Record<string, any>;
33
- optionFactory?: IOptionFactory | undefined;
34
- };
35
- container: import("vue").Ref<HTMLElement | undefined>;
36
- style: import("vue").ComputedRef<{
37
- width: string;
38
- height: string;
39
- }>;
40
- getChart: () => any;
41
- reset: () => void;
42
- resize: import("lodash").DebouncedFunc<() => void>;
43
- echarts: typeof import("echarts/types/dist/echarts");
44
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
45
- width: {
46
- type: StringConstructor;
47
- required: false;
48
- default: string;
49
- };
50
- height: {
51
- type: StringConstructor;
52
- required: false;
53
- default: string;
54
- };
55
- option: {
56
- type: ObjectConstructor;
57
- required: false;
58
- default: () => {};
59
- };
60
- optionFactory: {
61
- type: FunctionConstructor;
62
- required: false;
63
- };
64
- }>>, {
65
- width: string;
66
- height: string;
67
- option: Record<string, any>;
68
- }>;
69
- export default _sfc_main;
@@ -1,2 +0,0 @@
1
- import Chart from './Chart.vue';
2
- export default Chart;
@@ -1,124 +0,0 @@
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;
@@ -1,2 +0,0 @@
1
- import Bar from './Bar.vue';
2
- export default Bar;
@@ -1,124 +0,0 @@
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;