blockly > Extensions > buildTooltipWithFieldText

Extensions.buildTooltipWithFieldText() 函式

建構可安裝動態工具提示的擴充功能函式。工具提示訊息應包含「%1」字串,且該字串會替換為已命名欄位的文字。

Signature:

export declare function buildTooltipWithFieldText(msgTemplate: string, fieldName: string): (this: Block) => void;

參數

參數 類型 說明
msgTemplate 字串 這是訊息文字的範本形式,其中 %1 預留位置。
fieldName 字串 含有替代文字的欄位。

傳回:

(此處:封鎖) => void

擴充功能函式。