Bản khảo sát nghiên cứu: Cho chúng tôi biết trải nghiệm của bạn khi sử dụng Blockly
Bắt đầu khảo sát
chặn > phổ biến > defineBlocksWithJsonArray
Hàm Common.defineBlocksWithJsonArray()
Xác định các khối trong một mảng định nghĩa khối JSON do Công cụ dành cho nhà phát triển Blockly tạo ra.
Chữ ký:
export declare function defineBlocksWithJsonArray(jsonArray: any[]): void;
Tham số
Thông số |
Loại |
Mô tả |
jsonArray |
bất kỳ[] |
Một mảng định nghĩa khối JSON. |
Trường hợp trả lại hàng:
void
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2024-08-27 UTC.
[null,null,["Cập nhật lần gần đây nhất: 2024-08-27 UTC."],[[["The `defineBlocksWithJsonArray` function dynamically creates Blockly blocks based on JSON definitions provided in an array."],["This function is particularly useful when utilizing block definitions exported from the Blockly Developer Tools, streamlining the block creation process."],["The function accepts a single argument: an array containing JSON objects, each representing the structure and properties of a Blockly block."],["Upon execution, the function generates and registers the specified blocks within the Blockly environment, making them available for use in your workspace without returning any specific value."]]],["The `defineBlocksWithJsonArray` function accepts an array of JSON block definitions (`jsonArray`) as input. It then uses these definitions to create blocks within the Blockly environment. The function is designed to handle definitions that might be generated by the Blockly Developer Tools. The function does not return any value and only take the array of JSON.\n"]]