mirror of
https://github.com/ecomfe/vue-echarts.git
synced 2025-08-17 22:19:03 +08:00
fix: improve types for option
This commit is contained in:
16
src/types.ts
16
src/types.ts
@ -1,9 +1,10 @@
|
||||
import {
|
||||
init,
|
||||
type SetOptionOpts,
|
||||
type ECElementEvent,
|
||||
type ElementEvent
|
||||
} from "echarts/core";
|
||||
import { init } from "echarts/core";
|
||||
import type {
|
||||
SetOptionOpts,
|
||||
ECElementEvent,
|
||||
ElementEvent,
|
||||
EChartsOption
|
||||
} from "echarts";
|
||||
import type { Ref } from "vue";
|
||||
|
||||
export type Injection<T> = T | null | Ref<T | null> | { value: T | null };
|
||||
@ -22,8 +23,7 @@ export type UpdateOptionsInjection = Injection<UpdateOptions>;
|
||||
export type EChartsType = ReturnType<InitType>;
|
||||
type ZRenderType = ReturnType<EChartsType["getZr"]>;
|
||||
export type EventTarget = EChartsType | ZRenderType;
|
||||
type SetOptionType = EChartsType["setOption"];
|
||||
export type Option = Parameters<SetOptionType>[0];
|
||||
export type Option = EChartsOption;
|
||||
|
||||
export type LoadingOptions = {
|
||||
text?: string;
|
||||
|
Reference in New Issue
Block a user