| Total Complexity | 4 |
| Complexity/F | 1 |
| Lines of Code | 27 |
| Function Count | 4 |
| Duplicated Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | import Vue from 'vue'; |
||
| 2 | import VueEvents from 'vue-events'; |
||
| 3 | import Confetti from '../vue/Confetti.vue'; |
||
| 4 | import DashboardChart from '../vue/DashboardChart.vue'; |
||
| 5 | import DashboardTable from '../vue/DashboardTable.vue'; |
||
| 6 | |||
| 7 | Vue.use(VueEvents); |
||
| 8 | // Create our vue instance |
||
| 9 | const vm = new Vue({ |
||
|
|
|||
| 10 | el: "#cp-nav-content", |
||
| 11 | components: { |
||
| 12 | 'confetti': Confetti, |
||
| 13 | 'dashboard-chart': DashboardChart, |
||
| 14 | 'dashboard-table': DashboardTable, |
||
| 15 | }, |
||
| 16 | data: { |
||
| 17 | }, |
||
| 18 | methods: { |
||
| 19 | onTableRefresh (vuetable) { |
||
| 20 | console.log('onTableRefresh'); |
||
| 21 | Vue.nextTick( () => vuetable.refresh()); |
||
| 22 | } |
||
| 23 | }, |
||
| 24 | mounted() { |
||
| 25 | this.$events.$on('refresh-table', eventData => this.onTableRefresh(eventData)); |
||
| 26 | }, |
||
| 27 | }); |
||
| 28 |