当前位置 博文首页 > cainiaohhhh的博客:vue 循环一个div渲染多个背景色
<view
class="the_class_record_box_con_list"
v-for="(item, index) in list"
:key="index"
:class="{
active: index % 7 == 0,
active1: index % 7 == 1,
active2: index % 7 == 2,
active3: index % 7 == 3,
active4: index % 7 == 4,
active5: index % 7 == 5,
active6: index % 7 == 6
}"
@click="go_details(item.id)"
></view>