简体   繁体   English

Google amp组件amp-list无法加载更多内容

[英]Google amp component amp-list load more did not work

I had activate the AMP experiment amp-list-load-more, but it did not work 我已经激活了AMP实验amp-list-load-more,但是没有用

my page https://www.airtonews.com/amp/ 我的页面https://www.airtonews.com/amp/

 <amp-list src="data/list.json" load-more="manual" load-more-bookmark="next" binding="no" width="auto" height="300" layout="fixed-height"> <amp-list-load-more load-more-button> <template type="amp-mustache"> <div class="url-entry"> <a href="{{url}}">{{title}}</a> </div> </template> <button> See More </button> </amp-list-load-more> </amp-list> 

how to make it work? 如何使其工作? thanks! 谢谢!

Please refer to the load-more-button documentation: 请参阅“ 更多按钮”文档:

An <amp-list-load-more> element with the load-more-button attribute that a button with the load-more-clickable attribute, which shows up at the end of the list (for the manual load-more) if there are more elements to be loaded. 具有load-more-button属性的<amp-list-load-more>元素,具有load-more-clickable属性的按钮,如果存在,则显示在列表的末尾(对于手动加载更多)还有更多要加载的元素。 Clicking on this element will trigger a fetch to load more elements from the url contained in the load-more-src field or the field of the data returned corresponding to the load-more-bookmark attribute. 单击此元素将触发获取操作,以从load-more-src字段或与load-more-bookmark属性对应的返回数据字段中包含的url加载更多元素。

Example: 例:

<amp-list load-more src="https://www.load.more/" ...>
  <div load-more-button>
    See More /* My custom see more button */
  </div>
</amp-list>

Include the src attribute in your <amp-list load-more> element. <amp-list load-more>元素中包括src属性。 Try and check the implementation above. 尝试并检查上面的实现。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM