layui-row 布局因高度不一致错位问题


js框架为vue,通过vue去循环生成layui-col-md2;
<div class="layui-row layui-col-space1">
<template v-for="(item, index) in coursewares" v-cloak>
<div class="layui-col-md2">
<img :src="item.fBook">
</div>
</template>
</div>

解决方案,在要换行的地方添加一个能换行的标签,hr,/n等
<div class="layui-row layui-col-space1">
<template v-for="(item, index) in coursewares" v-cloak>
<div class="layui-col-md2">
<img :src="item.fBook">
</div>
<hr v-if="(index+1)%6 == 0" />
</template>
</div>


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM