This commit is contained in:
‘937886381’
2024-04-01 09:25:54 +08:00
parent 15358fd7e2
commit b0f44c2332
5 changed files with 173 additions and 119 deletions

View File

@@ -1,13 +1,13 @@
<!--
* @Author: zhp
* @Date: 2023-12-27 13:54:52
* @LastEditTime: 2024-03-29 17:01:16
* @LastEditTime: 2024-04-01 09:14:45
* @LastEditors: zhp
* @Description:
-->
<template>
<div>
<div :id="id" class="productChart" :style="{ height:'75px', width: width }" />
<div :id="id" :style="{ height:'75px', width: width }" />
</div>
</template>
@@ -71,7 +71,10 @@ export default {
}
},
mounted() {
console.log('mounted')
// console.log('mounted')
window.addEventListener('resize', () => {
this.resize()
})
// console.log('borderRadius: ', this.borderRadius)
// console.log('33333', this.dataList)
// let arr = []
@@ -91,6 +94,12 @@ export default {
this.chart = null
},
methods: {
resize() {
this.chart.resize({
width: 'auto',
height: 90
});;
},
initChart(nameList, topNameList, nameWasteList, passRateList, wasteList) {
let rawData = []
let colors = ['#0fdedb', '#2359ec']
@@ -239,10 +248,15 @@ export default {
},
series:series
})
this.chart.resize({
width: 'auto',
height: 90
});;
this.$nextTick(() => {
setTimeout(() => {
this.resize()
},1000);
})
// this.chart.resize({
// width: 'auto',
// height: 90
// });;
}
}
}