uniapp布局怎么让子元素换行

如图,图片是v-for循环添加的,怎么让它一排只显示4个,超出后自动往下面重新开始一排

img

父节点用弹性盒布局然后 flex-flow:wrap 换行,子节点每一项给25%的宽度


  .List{
        width: 100%;
        height: 100%;
        display: flex;
        justify-items: center;
        flex-flow:wrap ;
        .item{
          width: 25%;
          height: 100px;
          cursor: pointer;
          display: flex;
          flex-flow: column;
          align-items: center;
          justify-content: center;
        }
      }

1、v-for 父元素设置宽度,可以是100%,但不能超过屏幕宽度;
2、v-for 所属标签,不要用

<scroll-view>