blockly > FieldLabelSerializable > (建構函式)
FieldLabelSerializable.(constructor)
建構 FieldLabelSerializable
類別的新執行個體
Signature:
constructor(value?: string, textClass?: string, config?: FieldLabelConfig);
參數
參數 | 類型 | 說明 |
---|---|---|
值 | 字串 | (選用) 欄位的初始值。應轉換為字串。如果為空值或未定義,就會預設為空白字串。 |
textClass | 字串 | (選用) 欄位文字的選用的 CSS 類別。 |
config | FieldLabelConfig | (選用) 用來設定欄位的選項對應。如需這個參數支援的屬性清單,請參閱 [欄位建立說明文件]https://developers.google.com/blockly/guides/create-custom-blocks/fields/built-in-fields/label-serializable#creation。 |