blockly > Theme > getComponentStyle

Theme.getComponentStyle() 方法

取得特定 Blockly UI 元件的樣式。如果樣式值是字串,系統會嘗試尋找任何已命名參照的值。

Signature:

getComponentStyle(componentName: string): string | null;

參數

參數 類型 說明
componentName 字串 元件的名稱。

傳回:

字串 | 空值

樣式值。