mirror of
https://github.com/ecomfe/vue-echarts.git
synced 2025-08-17 13:54:06 +08:00
feat: support injection for theme
This commit is contained in:
@ -4,8 +4,9 @@ import { Ref } from "vue";
|
||||
type InitType = typeof init;
|
||||
export type InitParameters = Parameters<InitType>;
|
||||
export type Theme = NonNullable<InitParameters[1]>;
|
||||
export type ThemeInjection = Theme | null | Ref<Theme | null>;
|
||||
export type InitOptions = NonNullable<InitParameters[2]>;
|
||||
export type InitOptionsInjection = InitOptions | Ref<InitOptions>;
|
||||
export type InitOptionsInjection = InitOptions | null | Ref<InitOptions | null>;
|
||||
|
||||
export type EChartsType = ReturnType<InitType>;
|
||||
type SetOptionType = EChartsType["setOption"];
|
||||
@ -20,4 +21,4 @@ export interface UpdateOptions {
|
||||
replaceMerge?: any;
|
||||
transition?: any;
|
||||
}
|
||||
export type UpdateOptionsInjection = UpdateOptions | Ref<UpdateOptions>;
|
||||
export type UpdateOptionsInjection = UpdateOptions | null | Ref<UpdateOptions null>;
|
||||
|
Reference in New Issue
Block a user