amp element/result 不会在提交时加载,但会在摇动浏览器时加载 window
amp element/result does not loading on submit, but on shaking the browser window
我正在处理一个使用 POLL 小部件的项目。它目前正在使用 api 的组合,并且数据正在加载到 amp-list 标记中。当我通过选择任何选项提交结果时,结果没有显示,但是当我 zoom-in/zoom 在浏览器 window 外时,结果加载。
有没有人遇到过同样的amp问题或者有什么解决办法和建议?
提前致谢。
widget-screenshot widget-result-loads-on-browser-zoom-in
这听起来好像您的 amp-list 没有足够的 space 可用,如果视口太小的话。您是否定义了溢出按钮?使用 fixed-height 布局(如果结果始终具有相同的高度)并将 amp-list 尽可能放在页面底部也有帮助。
"If amp-list needs more space after loading it requests the AMP runtime to update its height using the normal AMP flow. If AMP Runtime cannot satisfy the request for new height, it will display overflow element when available. Notice however, the typical placement of amp-list elements at the bottom of the document almost always guarantees that AMP Runtime can resize it."
https://www.ampproject.org/docs/reference/components/amp-list
我正在处理一个使用 POLL 小部件的项目。它目前正在使用 api 的组合,并且数据正在加载到 amp-list 标记中。当我通过选择任何选项提交结果时,结果没有显示,但是当我 zoom-in/zoom 在浏览器 window 外时,结果加载。
有没有人遇到过同样的amp问题或者有什么解决办法和建议?
提前致谢。 widget-screenshot widget-result-loads-on-browser-zoom-in
这听起来好像您的 amp-list 没有足够的 space 可用,如果视口太小的话。您是否定义了溢出按钮?使用 fixed-height 布局(如果结果始终具有相同的高度)并将 amp-list 尽可能放在页面底部也有帮助。
"If amp-list needs more space after loading it requests the AMP runtime to update its height using the normal AMP flow. If AMP Runtime cannot satisfy the request for new height, it will display overflow element when available. Notice however, the typical placement of amp-list elements at the bottom of the document almost always guarantees that AMP Runtime can resize it."
https://www.ampproject.org/docs/reference/components/amp-list