Theme
Reading needs 1 minutes
Get theme
getTheme(): ThemeOptions;
Returns:
Type: false | 'light' | 'dark' | string
Description: 当前主题
Set theme
setTheme(theme: ThemeOptions | ((prev: ThemeOptions) => ThemeOptions)): void;
Example
graph.setTheme('dark');
Parameter | Type | Description |
---|---|---|
theme | false | 'light' | 'dark' | string | ((prev: false | 'light' | 'dark' | string) => false | 'light' | 'dark' | string) | 主题名 |
Returns: