Home > SYS_Window > getCurrentTheme
SYS_Window.getCurrentTheme() method
Get Current theme
Signature
typescript
function getCurrentTheme(): Promise<ESYS_Theme>;1
Returns
Promise<ESYS_Theme>
Current theme
Remarks
Get the current EDA theme, **light** or **dark**
Example
javascript
// 1. 获取当前主题(异步方法,需要 await)
const theme = await eda.sys_Window.getCurrentTheme();
// 2. 展示结果
console.log('当前主题:', theme === 'light' ? '浅色(light)' : '深色(dark)');1
2
3
4
5
2
3
4
5