|
|
@ -1,26 +1,23 @@ |
|
|
|
<template> |
|
|
|
<div |
|
|
|
ref="charts" |
|
|
|
style="width: 18vw;height:23vh;" |
|
|
|
/> |
|
|
|
<div ref="charts" style="width: 18vw;height:23vh;" /> |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
import * as echarts from 'echarts' |
|
|
|
import { debounce } from '@/utils' |
|
|
|
|
|
|
|
function fontSize(res){ |
|
|
|
let clientWidth = window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth; |
|
|
|
function fontSize(res) { |
|
|
|
let clientWidth = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth; |
|
|
|
if (!clientWidth) return; |
|
|
|
let fontSize = 100 * (clientWidth / 1920); |
|
|
|
return res*fontSize; |
|
|
|
return res * fontSize; |
|
|
|
} |
|
|
|
|
|
|
|
function fontSize2(res){ |
|
|
|
function fontSize2(res) { |
|
|
|
let height = document.documentElement.clientHeight |
|
|
|
if (!height) return; |
|
|
|
let fontSize = 100 * (height / 1080); |
|
|
|
return res*fontSize; |
|
|
|
return res * fontSize; |
|
|
|
} |
|
|
|
|
|
|
|
function max(v1, v2) { |
|
|
@ -33,7 +30,7 @@ export default { |
|
|
|
}, |
|
|
|
watch: { |
|
|
|
config: { |
|
|
|
handler: function(val) { |
|
|
|
handler: function (val) { |
|
|
|
this.$nextTick(() => { |
|
|
|
this.init() |
|
|
|
}) |
|
|
@ -608,6 +605,4 @@ export default { |
|
|
|
} |
|
|
|
} |
|
|
|
</script> |
|
|
|
<style scoped> |
|
|
|
|
|
|
|
</style> |
|
|
|
<style scoped></style> |
|
|
|