با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
blockly > مشترک > defineBlocks
تابع common.defineBlocks().
تعاریف بلوک مشخص شده را به فرهنگ لغت تعاریف بلوک (Blockly.Blocks) اضافه کنید.
امضا:
export declare function defineBlocks(blocks: {
[key: string]: BlockDefinition;
}): void;
پارامترها
پارامتر | تایپ کنید | توضیحات |
---|
بلوک ها | { [key: string]: BlockDefinition; } | نقشه ای از نام های نوع بلوک برای مسدود کردن تعاریف. |
برمی گرداند:
باطل
جز در مواردی که غیر از این ذکر شده باشد،محتوای این صفحه تحت مجوز Creative Commons Attribution 4.0 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2025-01-05 بهوقت ساعت هماهنگ جهانی.
[[["درک آسان","easyToUnderstand","thumb-up"],["مشکلم را برطرف کرد","solvedMyProblem","thumb-up"],["غیره","otherUp","thumb-up"]],[["اطلاعاتی که نیاز دارم وجود ندارد","missingTheInformationINeed","thumb-down"],["بیشازحد پیچیده/ مراحل بسیار زیاد","tooComplicatedTooManySteps","thumb-down"],["قدیمی","outOfDate","thumb-down"],["مشکل ترجمه","translationIssue","thumb-down"],["مشکل کد / نمونهها","samplesCodeIssue","thumb-down"],["غیره","otherDown","thumb-down"]],["تاریخ آخرین بهروزرسانی 2025-01-05 بهوقت ساعت هماهنگ جهانی."],[[["The `defineBlocks` function adds new block definitions to Blockly's block definitions dictionary, making them available for use."],["It accepts a single argument: a dictionary/object where keys are block type names and values are the corresponding block definitions."],["This function does not return any value, it simply updates Blockly's internal block definitions."]]],["The `common.defineBlocks()` function adds block definitions to the `Blockly.Blocks` dictionary. It accepts a parameter named `blocks`, which is a map. This map contains block type names as keys and their corresponding block definitions (of type `BlockDefinition`) as values. The function's signature indicates it takes this map as input and does not return any value (void). The main action is to populate the Blockly block dictionary with user-specified definitions.\n"]]