|
|
|
@ -1,4 +1,4 @@
|
|
|
|
import { onUnmounted } from 'vue'
|
|
|
|
import { onMounted, onUnmounted } from 'vue'
|
|
|
|
import * as echarts from 'echarts'
|
|
|
|
import * as echarts from 'echarts'
|
|
|
|
|
|
|
|
|
|
|
|
export const colors = {
|
|
|
|
export const colors = {
|
|
|
|
@ -45,7 +45,12 @@ export function useChart(domId: string) {
|
|
|
|
chart?.resize()
|
|
|
|
chart?.resize()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
onMounted(() => {
|
|
|
|
|
|
|
|
window.addEventListener('resize', resize)
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
onUnmounted(() => {
|
|
|
|
onUnmounted(() => {
|
|
|
|
|
|
|
|
window.removeEventListener('resize', resize)
|
|
|
|
chart?.dispose()
|
|
|
|
chart?.dispose()
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
|