monthlyTrend.vue
728 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<template>
<div class='monthly-trend'>
<view-sub-title title='订单月度趋势' />
<div class='line-bar-chart' v-if='monthlyTrend'>
<LineBar :domId='domId' :dataList='monthlyTrend' :boxHeight='boxHeight'></LineBar>
</div>
</div>
</template>
<script>
import LineBar from 'components/lineBar'
export default {
name: 'MonthlyTrend',
props: {
boxHeight: {
type: String,
default: '42vh'
}
},
components: {
LineBar
},
data() {
return {
domId: 'monthlyTrendLineBar',
monthlyTrend: []
}
},
mounted() {
this.$bus.$on('orderMonthlyTrend', data => {
this.monthlyTrend = data.orderMonthlyTrend
})
}
}
</script>
<style scoped>
</style>