列表项 Cell

基本用法

列表项 Cell - 图1

  1. <template lang="html">
  2. <div>
  3. <div class="demo-hidden">
  4. <za-panel>
  5. <za-panel-header title="普通列表项"></za-panel-header>
  6. <za-panel-body>
  7. <za-cell title='标题文字'></za-cell>
  8. </za-panel-body>
  9. </za-panel>
  10. <za-panel>
  11. <za-panel-header title="带描述的列表项"></za-panel-header>
  12. <za-panel-body>
  13. <za-cell title='标题文字' description='描述文字' />
  14. <za-cell title='标题文字'>
  15. <za-icon slot='description' type='right'/>
  16. </za-cell>
  17. </za-panel-body>
  18. </za-panel>
  19. <za-panel>
  20. <za-panel-header title="带图标、描述的列表项"></za-panel-header>
  21. <za-panel-body>
  22. <za-cell title='标题文字'>
  23. <za-icon type='right' slot='icon'/>
  24. <div slot='description'>描述文字</div>
  25. </za-cell>
  26. <za-cell title='标题文字'>
  27. <img src="https://static.zhongan.com/website/health/zarm/images/icons/state.png" alt="" slot='icon'>
  28. <div slot='description'>描述文字</div>
  29. </za-cell>
  30. </za-panel-body>
  31. </za-panel>
  32. <za-panel>
  33. <za-panel-header title="带跳转的列表项"></za-panel-header>
  34. <za-panel-body>
  35. <za-cell is-link @click='() => {}'>标题文字</za-cell>
  36. <za-cell is-link @click='() => {}'>标题文字</za-cell>
  37. </za-panel-body>
  38. </za-panel>
  39. <za-panel>
  40. <za-panel-header title="带描述、箭头、跳转的列表项" ></za-panel-header>
  41. <za-panel-body>
  42. <za-cell is-link title='标题文字' has-arrow @click='() => {}'>
  43. <div slot='description'>描述文字</div>
  44. </za-cell>
  45. <za-cell is-link title='标题文字' has-arrow @click='() => {}'>
  46. <div slot='description'>描述文字</div>
  47. </za-cell>
  48. </za-panel-body>
  49. </za-panel>
  50. <za-panel>
  51. <za-panel-header title="带图标、描述、箭头、跳转的列表项"></za-panel-header>
  52. <za-panel-body>
  53. <za-cell is-link title='标题文字' has-arrow @click='() => {}'>
  54. <div slot='description'>描述文字</div>
  55. <za-icon type='right' slot='icon'/>
  56. </za-cell>
  57. <za-cell is-link title='标题文字' has-arrow @click='() => {}'>
  58. <div slot='description'>描述文字</div>
  59. <img src="https://static.zhongan.com/website/health/zarm/images/icons/state.png" alt="" slot='icon'>
  60. </za-cell>
  61. <za-cell is-link has-arrow @click='() => {}'>
  62. <div slot='description'>描述文字</div>
  63. <div class='box' slot='title'>
  64. <div class='box-title'>标题文字</div>
  65. <div class='box-description'>描述文字</div>
  66. </div>
  67. <img src="https://static.zhongan.com/website/health/zarm/images/icons/state.png" alt="" slot='icon'>
  68. </za-cell>
  69. </za-panel-body>
  70. </za-panel>
  71. <za-panel>
  72. <za-panel-header title='提示信息'></za-panel-header>
  73. <za-panel-body>
  74. <za-cell title='标题'>
  75. <za-message theme='error' slot='help'>
  76. <za-icon type="info-round" />
  77. <span style='marginLeft: 5px'>标题不能为空</span>
  78. </za-message>
  79. <za-input type="text" placeholder="请输入标题" />
  80. </za-cell>
  81. </za-panel-body>
  82. </za-panel>
  83. </div>
  84. </div>
  85. </template>

API

Cell Attributes

属性类型默认值可选值/参数说明
prefixClsstringza-cell类名前缀
isLinkboolfalse是否带激活样式
titlestring标题
helpstring下方提示信息 通常配合Message组件使用
descriptionstring描述
hasArrowboolfalse是否显示箭头