مؤلفه AMP One Tap منسوخ شده است. این بدان معناست که برنامههای وب جدید نباید از این مؤلفه استفاده کنند و توسعهدهندگان برنامههای موجود باید از
راهنمای مهاجرت پیروی کنند تا تغییرات لازم را انجام دهند تا از تأثیرات منفی ورود کاربر به وبسایتهای خود جلوگیری کنند.
مرجع AMP Component API
با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
این صفحه مرجع API مؤلفه <amp-onetap-google>
AMP را توصیف می کند.
برای یادگیری نحوه استفاده از iframe های میانی، به راهنمای ادغام یک ضربه با استفاده از راهنمای Iframe مراجعه کنید.
مؤلفه AMP <amp-onetap-google>
را بارگیری کنید
قطعه کد زیر را در هر صفحه AMP که میخواهید از مؤلفه AMP <amp-onetap-google>
استفاده کنید، قرار دهید:
<script custom-element="amp-onetap-google" src="https://cdn.ampproject.org/v0/amp-onetap-google-0.1.js" async></script>
مؤلفه AMP <amp-onetap-google>
جدول زیر ویژگی های داده را با توضیحات آنها فهرست می کند:
صفت |
---|
data-src | URI iframe میانی One Tap شما |
layout | طرح بندی مولفه AMP. فقط "nodisplay" مجاز است. |
data-src
این ویژگی URI iframe میانی One Tap شما است. برای اطلاعات بیشتر به جدول زیر مراجعه کنید:
تایپ کنید | مورد نیاز | مثال |
---|
رشته | بله | data-src="https://example.com/onetap_iframe.html" |
طرح بندی
این ویژگی طرح کامپوننت AMP است که ویژگی مورد نیاز اجزای AMP است. برای مؤلفه <amp-onetap-google>
، فقط «nodisplay» مجاز است. برای اطلاعات بیشتر به جدول زیر مراجعه کنید:
تایپ کنید | مورد نیاز | مثال |
---|
رشته | بله | layout="nondisplay" |
جز در مواردی که غیر از این ذکر شده باشد،محتوای این صفحه تحت مجوز Creative Commons Attribution 4.0 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2025-01-08 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2025-01-08 بهوقت ساعت هماهنگ جهانی."],[[["\u003cp\u003eThis reference page describes the API of the \u003ccode\u003e<amp-onetap-google>\u003c/code\u003e AMP component, which enables One Tap sign-up/sign-in on AMP pages.\u003c/p\u003e\n"],["\u003cp\u003eTo use this component, you need to place a specific script tag into your AMP pages and configure the component with \u003ccode\u003edata-src\u003c/code\u003e and \u003ccode\u003elayout\u003c/code\u003e attributes.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003edata-src\u003c/code\u003e attribute specifies the URI of your One Tap intermediate iframe, while the \u003ccode\u003elayout\u003c/code\u003e attribute must be set to "nodisplay".\u003c/p\u003e\n"],["\u003cp\u003eRefer to the "Integrate One Tap using an Iframe" guide to learn how to use intermediate iframes for this implementation.\u003c/p\u003e\n"]]],[],null,["# AMP Component API reference\n\nThis reference page describes the API of the `\u003camp-onetap-google\u003e` AMP\ncomponent.\n\nSee the [Integrate One Tap using an Iframe](/identity/gsi/web/amp/intermediate-iframe) guide to learn how to use\nintermediate iframes.\n\nLoad the `\u003camp-onetap-google\u003e` AMP Component\n--------------------------------------------\n\nPlace the following code snippet into any AMP pages where you want to use the\n`\u003camp-onetap-google\u003e` AMP Component: \n\n \u003cscript custom-element=\"amp-onetap-google\" src=\"https://cdn.ampproject.org/v0/amp-onetap-google-0.1.js\" async\u003e\u003c/script\u003e\n\nThe `\u003camp-onetap-google\u003e` AMP Component\n---------------------------------------\n\nThe following table lists the data attributes with their descriptions:\n\n| Attribute ||\n|----------------------------------------------------------|---------------------------------------------------------------|\n| [data-src](/identity/gsi/web/amp/amp-reference#data-src) | The URI of your One Tap intermediate iframe |\n| [layout](/identity/gsi/web/amp/amp-reference#layout) | The layout of the AMP component. Only \"nodisplay\" is allowed. |\n\n### data-src\n\nThis attribute is the URI of your One Tap intermediate iframe. See the following\ntable for further information:\n\n| Type | Required | Example |\n|--------|----------|-----------------------------------------------------|\n| string | Yes | `data-src=\"https://example.com/onetap_iframe.html\"` |\n\n### layout\n\nThis attribute is the layout of the AMP component, which is a required attribute\nof AMP components. For the `\u003camp-onetap-google\u003e` component, only\n\"nodisplay\" is allowed. See the following table for further information:\n\n| Type | Required | Example |\n|--------|----------|-----------------------|\n| string | Yes | `layout=\"nondisplay\"` |"]]