mirror of
https://github.com/ecomfe/vue-echarts.git
synced 2025-11-06 04:46:53 +08:00
65 lines
1.4 KiB
TypeScript
65 lines
1.4 KiB
TypeScript
/* eslint-disable @typescript-eslint/ban-types */
|
|
import type { DefineComponent } from "@vue/runtime-core";
|
|
import type { Ref } from "vue-demi";
|
|
import type {
|
|
Option,
|
|
InitOptions,
|
|
UpdateOptions,
|
|
EChartsType,
|
|
Emits
|
|
} from "./types";
|
|
|
|
declare const LOADING_OPTIONS_KEY = "ecLoadingOptions";
|
|
declare const THEME_KEY = "ecTheme";
|
|
declare const INIT_OPTIONS_KEY = "ecInitOptions";
|
|
declare const UPDATE_OPTIONS_KEY = "ecUpdateOptions";
|
|
|
|
declare type ChartProps = {
|
|
loading?: boolean;
|
|
loadingOptions?: Record<string, unknown>;
|
|
autoresize?: boolean;
|
|
option?: Option;
|
|
theme?: string | Record<string, unknown>;
|
|
initOptions?: InitOptions;
|
|
updateOptions?: UpdateOptions;
|
|
group?: string;
|
|
manualUpdate?: boolean;
|
|
};
|
|
|
|
type MethodNames =
|
|
| "getWidth"
|
|
| "getHeight"
|
|
| "getDom"
|
|
| "getOption"
|
|
| "resize"
|
|
| "dispatchAction"
|
|
| "convertToPixel"
|
|
| "convertFromPixel"
|
|
| "containPixel"
|
|
| "getDataURL"
|
|
| "getConnectedDataURL"
|
|
| "appendData"
|
|
| "clear"
|
|
| "isDisposed"
|
|
| "dispose"
|
|
| "setOption";
|
|
|
|
declare type ChartMethods = Pick<EChartsType, MethodNames>;
|
|
|
|
declare const Chart: DefineComponent<
|
|
ChartProps,
|
|
{
|
|
root: Ref<HTMLElement | undefined>;
|
|
chart: Ref<EChartsType | undefined>;
|
|
},
|
|
{},
|
|
{},
|
|
ChartMethods,
|
|
{},
|
|
{},
|
|
Emits
|
|
>;
|
|
|
|
export default Chart;
|
|
export { INIT_OPTIONS_KEY, LOADING_OPTIONS_KEY, THEME_KEY, UPDATE_OPTIONS_KEY };
|