# bug fixed resize
This commit is contained in:
parent
50614aa654
commit
9eca742161
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<div :class="className" :style="{height:height,width:width}"></div>
|
||||
<div id="chart" :class="className" :style="{height:height,width:width}"></div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
@ -27,6 +27,9 @@ export default {
|
|||
},
|
||||
chartData: {
|
||||
type: Object
|
||||
},
|
||||
showChart: {
|
||||
type: Boolean
|
||||
}
|
||||
},
|
||||
data() {
|
||||
|
@ -69,6 +72,12 @@ export default {
|
|||
handler(val) {
|
||||
this.setOptions(val)
|
||||
}
|
||||
},
|
||||
showChart(val) {
|
||||
if (val) {
|
||||
console.log(val)
|
||||
this.chart.resize()
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
<el-row style="background:#fff;padding:16px 16px 0;margin-bottom:32px;">
|
||||
<chart
|
||||
:chart-data="lineChartData.total"
|
||||
:showChart="showChart"
|
||||
>
|
||||
</chart>
|
||||
</el-row>
|
||||
|
@ -95,17 +96,17 @@ export default {
|
|||
total: 0,
|
||||
lastItem: {},
|
||||
status: 0,
|
||||
showChat: false,
|
||||
showChart: false,
|
||||
flag: false
|
||||
}
|
||||
},
|
||||
// watch: {
|
||||
// activeName(val) {
|
||||
// if (val === 'chart') {
|
||||
// this.showChat = true
|
||||
// }
|
||||
// }
|
||||
// },
|
||||
watch: {
|
||||
activeName(val) {
|
||||
if (val === 'chart') {
|
||||
this.showChart = true
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getDeviceLogs(params) {
|
||||
fetchDeviceLogs(params).then(response => {
|
||||
|
|
Loading…
Reference in New Issue