许成详 6 years ago
parent
commit
0eaca7c700
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      src/components/dashboardList/index.vue

+ 2
- 2
src/components/dashboardList/index.vue View File

2
   <div class="dashboardList">
2
   <div class="dashboardList">
3
     <ul class="flex-h">
3
     <ul class="flex-h">
4
       <li class="flex-item" v-for="(item,index) in data.list" :key="index">
4
       <li class="flex-item" v-for="(item,index) in data.list" :key="index">
5
-        <div>
5
+        <div :style="{background:colorList[index%colorList.length]}">
6
           <div class="centerLabel">
6
           <div class="centerLabel">
7
             <span>{{item.name}}</span>
7
             <span>{{item.name}}</span>
8
             <span>{{item.value}}</span>
8
             <span>{{item.value}}</span>
19
   props: ['data'],
19
   props: ['data'],
20
   data () {
20
   data () {
21
     return {
21
     return {
22
-
22
+      colorList: ['#fc6243', '#409EFF', '#4ddea2', '#f6e259', '#5c59f6', '#f66f59'],
23
     }
23
     }
24
   },
24
   },
25
   mounted () {
25
   mounted () {