Commit 59c0f8a423e50987d81fda90f7e016e3853e3b5e

Authored by liuqimichale
1 parent a1bafdec

vuex

src/components/chinaMap/index.vue
@@ -13,7 +13,7 @@ @@ -13,7 +13,7 @@
13 <table class="parkTotalTb"> 13 <table class="parkTotalTb">
14 <tr> 14 <tr>
15 <td><div class="memberTotalImg"></div></td> 15 <td><div class="memberTotalImg"></div></td>
16 - <td><div class="infoBox"><div><countTo :startVal='memberParams.startVal' :endVal='$store.state.ParkingTotal' :duration='animationTime'></countTo></div><div>会员总数</div></div> </td> 16 + <td><div class="infoBox"><div><countTo :startVal='memberParams.startVal' :endVal='getParkingTotal' :duration='animationTime'></countTo></div><div>会员总数</div></div> </td>
17 </tr> 17 </tr>
18 </table> 18 </table>
19 </div> 19 </div>
@@ -58,9 +58,7 @@ @@ -58,9 +58,7 @@
58 ...mapGetters(['getParkingTotal']) 58 ...mapGetters(['getParkingTotal'])
59 }, 59 },
60 mounted() { 60 mounted() {
61 - this.parkParams.endVal = this.$store.state.ParkingTotal  
62 61
63 - console.log(this.getParkingTotal)  
64 this.mapChart= this.createPie(); 62 this.mapChart= this.createPie();
65 const _self=this; 63 const _self=this;
66 //var tmpCount=0; 64 //var tmpCount=0;
src/store/index.js
@@ -6,7 +6,7 @@ import createLogger from &#39;vuex/dist/logger&#39; @@ -6,7 +6,7 @@ import createLogger from &#39;vuex/dist/logger&#39;
6 Vue.use(Vuex) 6 Vue.use(Vuex)
7 7
8 const state = { 8 const state = {
9 - ParkingTotal: 10000 9 + ParkingTotal: 0
10 10
11 } 11 }
12 12