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