blockly > blockRendering > ConstantProvider > getBlockStyle
متد ()blockRendering.ConstantProvider.getBlockStyle
BlockStyle را برای نام سبک بلوک داده شده دریافت می کند.
امضا:
getBlockStyle(blockStyleName: string | null): BlockStyle;
پارامترها
پارامتر | تایپ کنید | توضیحات |
---|
blockStyleName | رشته | تهی | نام سبک بلوک. |
برمی گرداند:
BlockStyle
سبک بلوک نامگذاریشده، یا یک سبک پیشفرض اگر سبکی با نام دادهشده پیدا نشد.
جز در مواردی که غیر از این ذکر شده باشد،محتوای این صفحه تحت مجوز Creative Commons Attribution 4.0 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2025-01-04 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2025-01-04 بهوقت ساعت هماهنگ جهانی."],[[["The `getBlockStyle` method retrieves the visual style (BlockStyle) associated with a given block style name."],["If a block style with the specified name isn't found, a default style is returned instead."],["It accepts a single argument, `blockStyleName`, which is either a string representing the style name or null."]]],["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"]]