This commit is contained in:
曹辉 2023-02-13 17:27:28 +08:00
parent b80345c43f
commit 5fc1de33e9

View File

@ -1,7 +1,7 @@
<template>
<view class="app">
<view class="cards">
<view class="item" :style="{background:listcolor[index]}" @tap='goProductList(item)'
<view class="item" :style="{background:listcolor[index % listcolor.length]}" @tap='goProductList(item)'
v-for="(item,index) in goodsCategoryList" :key="index">
<image :src="item.goodsCategoryPicture" mode=""></image>
<view class="title" style="font-size:42rpx">
@ -39,9 +39,7 @@
// img:'../../static/cp.png',
// },
// ],
listcolor: ['#00C176', '#D43953', '#E1AE3C', '#4C7BC9', '#9e4dd0', '#00C176', '#D43953', '#E1AE3C',
'#4C7BC9', '#9e4dd0',
], //
listcolor: ['#00C176', '#D43953', '#E1AE3C', '#4C7BC9', '#9e4dd0'], //
};
},
//1.