AMP列表表单无线电不默认为检查



我正在尝试使用AMP列表显示产品并允许用户在添加到购物车之前选择数量。但是,它似乎不想在放大器列表内部工作。

这是我在说什么的示例。您可以在页面的底部看到一个输入类型=无线电=已检查=已选中,但在AMP列表中它无法正常工作。

<amp-list id="paged-amp-list" layout="fixed-height" height="700" src="https://ampbyexample.com/advanced/paged_list/search" [src]="'https://ampbyexample.com/advanced/paged_list/search?page=' + pageNumber" single-item>
    <template type="amp-mustache">
      ....
          <input type="radio" id="quantity-1" name="Quantity" value="1" checked="checked"> 1
      ....
    </template>        
  </amp-list>

https://codepen.io/anon/pen/qqjemn

,因为那些使用同名的无线电输入。

codepen.io/buihoanghai/pen/vdQJdG

最新更新