1 查看代码生成的结构
2.前台显示的样式
3.wxml中定义
4.各个组件的定义
4.1 weui-cells
4.2 weui-cell
4.3 weui-cell-header
4.4 weui-cell-body
4.5 weui-cell-footer
现在我想实现weui-cells与weui-cell这样的列表,如果有两行时,就会出现样式问题,后来查明是<weui-cell>是样式
.weui-cells的直接下级,有没有办法像Angular或React那样,组件可以给自身加入样式,这样就解决问题了
代码结构如下:
<weui-cells class=“weui-cells”> <weui-cell>
<weui-cell-header>图片1</weui-cell-header>
<weui-cell-body>内容1</weui-cell-body>
</weui-cell>
<weui-cell>
<weui-cell-header>图片2</weui-cell-header>
<weui-cell-body>内容2</weui-cell-body>
</weui-cell>
</weui-cells>