cell


子列表项容器。

类似 web端的 li 元素标签,作为<list>列表容器的子列表项。

示例

  1. <template>
  2. <view>
  3. <list
  4. bottom-offset="{{20}}"
  5. height="{{-1}}"
  6. >
  7. <cell>
  8. <text>1</text>
  9. </cell>
  10. </list>
  11. </view>
  12. </template>
  13. <script>
  14. class Cell {
  15. }
  16. export default new Cell();
  17. </script>
  18. <script cml-type="json">
  19. {
  20. "base": {}
  21. }
  22. </script>

Bug & Tip

  • <cell>的宽度等于父组件 <list> 的宽度,并且 <cell> 高度会自适应,指定 margin 样式无效
    查看完整示例