با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
blockly > مشترک > createBlockDefinitionsFromJsonArray
تابع common.createBlockDefinitionsFromJsonArray().
بلوکها را از آرایهای از تعاریف بلوک JSON، همانطور که ممکن است توسط ابزار توسعهدهنده Blockly ایجاد شود، تعریف کنید.
امضا:
export declare function createBlockDefinitionsFromJsonArray(jsonArray: any[]): {
[key: string]: BlockDefinition;
};
پارامترها
پارامتر | تایپ کنید | توضیحات |
---|
jsonArray | هر[] | آرایه ای از تعاریف بلوک JSON. |
برمی گرداند:
{ [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 بهوقت ساعت هماهنگ جهانی."],[[["Defines new block types in Blockly based on an array of JSON definitions, commonly generated by the Blockly Developer Tools."],["Takes an array of JSON objects representing block configurations as input."],["Returns a dictionary/map where block type names are keys and corresponding block definitions are values, allowing access and usage of the newly defined blocks."]]],["The `createBlockDefinitionsFromJsonArray` function defines blocks from an array of JSON block definitions. It accepts a `jsonArray` parameter, which is an array of these definitions. The function then returns a map where each key corresponds to a block definition and its value is the associated `BlockDefinition`. This effectively translates a JSON array into a set of usable block definitions.\n"]]