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