blockly > MenuItem > (建構函式)

建構 MenuItem 類別的新執行個體

Signature:

constructor(content: string | HTMLElement, opt_value?: string | undefined);

參數

參數 類型 說明
內容 字串 | HTML 元素 顯示為項目內容的文字說明文字,或要顯示的 HTML 元素。
opt_value 字串 | 未定義 (選用) 與選單項目相關聯的資料/模型。