请教下社区的各位老师,这个循环排版该如何处理呢?整了很久都不会

小程序 文章 2020-08-24 08:41 0 31 全屏看文

请教下社区的各位老师,这个循环排版该如何处理呢?整了很久都不会Ask every teacher in the community how to deal with this circular layout? Not for a long time

请教下社区的各位老师,这个循环排版该如何处理呢?整了很久都不会

如何像下方排版那样显示,一排三个

<block wx:for="{{indexdb}}" wx:for-index="idx" wx:for-item="list" >    <view class="weui-flex" >        <view class="weui-flex__item" wx:for="{{3}}">            <view class="weui-flex__item center" >                <view bindtap="kantie" data-id="{{list._id}}" class="placeholder">{{list.name}}{{idx}}   view>               view>           view>       view>   block>


<view class="weui-flex center hang">    <view class="weui-flex__item"><view class="placeholder">1id0   view>  view>    <view class="weui-flex__item"><view class="placeholder">2idapp1   view>  view>    <view class="weui-flex__item"><view class="placeholder">3id2   view>  view>   view><view class="weui-flex center hang">    <view class="weui-flex__item"><view class="placeholder">4id3app   view>  view>    <view class="weui-flex__item"><view class="placeholder">   view>  view>    <view class="weui-flex__item"><view class="placeholder">   view>  view>   view>

As the next edition shows, a series of three, :for-item="list"*>:for-view columns="between-flex">:for-view columns="between-flex__item"*"between-flex__item"*:for="{{3}}">== synonyms = "between-flex__itemcenter"*>{{ List.name }}{ == sync, corrected by elderman == 1id0view>view columns>2id1view>view>view>3id2view>view>4id3appview>view>: < view along the current class="flex__item">view>view>* * * * * < view class="weui-flex__item">view>view>view>view>view="weui-flex__item">view>view>view>view>

回答:

夕阳西下?:

给样式加上纵向排列:

display: flex;

  flex-direction: column;


横向排列:

  display: flex;

  flex-direction: row; 



神奇的桑桑😄😄😄:

没理解错的话,楼主咨询的是样式布局问题吧?这种可以尝试搜索一下微信小程序,列表横向排列之类的关键词。论坛里一般不太讨论样式的写法。

ChnZ:好的好的谢谢老师
wang li:

不知道你要干嘛,上个代码片段吧

ChnZ:老师好,我是想一排三个,像下面那样排版,但是不知道循环怎么写
ChnZ:上不成代码片段

-EOF-