update 产品质量分析

This commit is contained in:
lb
2023-09-04 14:35:13 +08:00
parent 6f71b6a7c0
commit fbd78c6aa5
2 changed files with 86 additions and 11 deletions

View File

@@ -6,29 +6,44 @@
-->
<template>
<div class="line-chart">line LineChart</div>
<div class="line-chart"></div>
</template>
<script>
import * as echarts from 'echarts';
export default {
name: 'LineChart',
components: {},
props: ['config'],
data() {
return {
chart: null,
};
chart: null,
};
},
computed: {},
methods: {},
mounted() {
this.init();
},
beforeDestroy() {
if (this.chart) {
this.chart.dispose();
}
},
methods: {
init() {
console.log('thsi el', this.$el);
if (!this.chart) this.chart = echarts.init(this.$el);
this.chart.setOption(this.config);
},
},
};
</script>
<style scoped lang="scss">
.line-chart {
margin: 24px;
padding: 12px;
padding: 0 12px;
background: #e1e1e1;
min-height: 200px;
min-height: 320px;
}
</style>