AMP 一键快捷组件已弃用。这意味着新的 Web 应用不应使用此组件,而现有应用的开发者应按照
迁移指南进行所有必要的更改,以免对用户登录其网站造成负面影响。
AMP Component API 参考文档
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
本参考页面介绍了 <amp-onetap-google>
AMP 组件的 API。
如需了解如何使用中间 iframe,请参阅使用 iframe 集成一键式登录指南。
加载 <amp-onetap-google>
AMP 组件
将以下代码段放入您要使用 <amp-onetap-google>
AMP 组件的任何 AMP 网页中:
<script custom-element="amp-onetap-google" src="https://cdn.ampproject.org/v0/amp-onetap-google-0.1.js" async></script>
<amp-onetap-google>
AMP 组件
下表列出了数据属性及其说明:
data-src
此属性是您的一键式中间 iframe 的 URI。如需了解详情,请参阅下表:
类型 |
是否必须提供 |
示例 |
字符串 |
是 |
data-src="https://example.com/onetap_iframe.html" |
布局
此属性是 AMP 组件的布局,是 AMP 组件的必需属性。对于 <amp-onetap-google>
组件,只能使用“nodisplay”。如需了解详情,请参阅下表:
类型 |
是否必须提供 |
示例 |
字符串 |
是 |
layout="nondisplay" |
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2024-11-08。
[null,null,["最后更新时间 (UTC):2024-11-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,[]]