จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
blockly > blockRendering > ConstantProvider > getBlockStyle
เมธอด blockRendering.ConstantProvider.getBlockStyle()
รับ BlockStyle สำหรับชื่อรูปแบบบล็อกที่ระบุ
ลายเซ็น:
getBlockStyle(blockStyleName: string | null): BlockStyle;
พารามิเตอร์
| พารามิเตอร์ |
ประเภท |
คำอธิบาย |
| blockStyleName |
string | null |
ชื่อของสไตล์บล็อก |
การคืนสินค้า:
BlockStyle
สไตล์บล็อกที่มีชื่อ หรือสไตล์เริ่มต้นหากไม่พบสไตล์ที่มีชื่อที่ระบุ
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-25 UTC
[null,null,["อัปเดตล่าสุด 2025-07-25 UTC"],[],["The `getBlockStyle()` method retrieves a `BlockStyle` object based on a provided `blockStyleName` (a string or null). It takes the style name as a parameter. If a style with the given name exists, it is returned; otherwise, a default style is provided. The method's return type is `BlockStyle`. This function is part of the `ConstantProvider` class within the `blockRendering` namespace.\n"]]