Enum DisplayStyle
با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
سبک نمایش شماره ای که سبک نمایش کارت را مشخص می کند.
Display Style.REPLACE
به این معنی است که کارت با جایگزین کردن نمای کارت بالایی در پشته کارت نشان داده می شود.
Display Style.PEEK
به این معنی است که هدر کارت در پایین نوار کناری ظاهر میشود و تا حدی کارت بالای فعلی پشته را میپوشاند. با کلیک روی هدر، کارت به پشته کارت میرود. اگر کارت فاقد هدر باشد، به جای آن از هدر تولید شده استفاده می شود.
Display Style
فقط برای کارتی که از تابع ماشه متنی بازگردانده شده است کار می کند.
برای فراخوانی یک enum، کلاس والد، نام و ویژگی آن را فراخوانی می کنید. به عنوان مثال، CardService.DisplayStyle.PEEK
.
خواص
اموال | تایپ کنید | توضیحات |
---|
PEEK | Enum | هدر کارت را در پایین محتوای افزودنی روی محتوای موجود نشان دهید. |
REPLACE | Enum | با جایگزین کردن محتوای موجود، کارت را نشان دهید. |
جز در مواردی که غیر از این ذکر شده باشد،محتوای این صفحه تحت مجوز Creative Commons Attribution 4.0 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2025-07-24 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2025-07-24 بهوقت ساعت هماهنگ جهانی."],[[["\u003cp\u003e\u003ccode\u003eDisplayStyle\u003c/code\u003e is an enum used to define how a card is displayed within the Google Workspace Add-on UI.\u003c/p\u003e\n"],["\u003cp\u003eIt offers two options: \u003ccode\u003eREPLACE\u003c/code\u003e, which replaces the current top card, and \u003ccode\u003ePEEK\u003c/code\u003e, which shows the card header at the bottom, partially overlaying the existing card.\u003c/p\u003e\n"],["\u003cp\u003eThis enum is specifically for cards triggered contextually and has no effect on other types of cards.\u003c/p\u003e\n"],["\u003cp\u003eTo use \u003ccode\u003eDisplayStyle\u003c/code\u003e, you would call it using the syntax \u003ccode\u003eCardService.DisplayStyle.PEEK\u003c/code\u003e or \u003ccode\u003eCardService.DisplayStyle.REPLACE\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["# Enum DisplayStyle\n\nDisplayStyle\n\nAn enum that defines the display style of card.\n\n\n`Display``Style.REPLACE` means that the card is shown by replacing the view of top card in\nthe card stack.\n\n\n`Display``Style.PEEK` mean that the header of the card appears at the bottom of the\nsidebar, partially covering the current top card of the stack. Clicking the header pops the card\ninto the card stack. If the card has no header, a generated header is used instead.\n\n\n`Display``Style` only works for card returned from contextual trigger function.\n\nTo call an enum, you call its parent class, name, and property. For example, `\nCardService.DisplayStyle.PEEK`. \n\n### Properties\n\n| Property | Type | Description |\n|-----------|--------|-----------------------------------------------------------------------------|\n| `PEEK` | `Enum` | Show the card header at the bottom of add-on content over existing content. |\n| `REPLACE` | `Enum` | Show the card by replacing existing content. |"]]