סקר מחקר: נשמח לשמוע על החוויה שלך עם Blockly
לפתיחת הסקר
blockly > תוספים > buildTooltipWithFieldText
הפונקציה extensions.buildToolTipWithFieldText()
יצירת פונקציית תוסף שתתקין הסבר קצר דינמי. הודעת ההסבר הקצר צריכה לכלול את המחרוזת '%1' והמחרוזת הזו תוחלף בטקסט של השדה בעל השם.
Signature:
export declare function buildTooltipWithFieldText(msgTemplate: string, fieldName: string): (this: Block) => void;
פרמטרים
פרמטר |
סוג |
תיאור |
msgTemplate |
מחרוזת |
הטופס של התבנית אל טקסט ההודעה, עם placeholder של %1. |
fieldName |
מחרוזת |
השדה עם הטקסט החלופי. |
החזרות:
(זה: חסימה) => ריק
הפונקציה של התוסף.
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2024-09-12 (שעון UTC).
[null,null,["עדכון אחרון: 2024-09-12 (שעון UTC)."],[[["`Extensions.buildTooltipWithFieldText()` creates a dynamic tooltip for blocks, updating the tooltip text based on a specified field's value."],["The tooltip message is constructed using a template with '%1' as a placeholder, which is replaced with the content of the designated field."],["It accepts two parameters: `msgTemplate`, a string containing the tooltip template, and `fieldName`, identifying the field providing the replacement text."],["This function returns an extension function that can be applied to blocks to enable dynamic tooltips."]]],[]]