diff --git a/src/views/tested/dashboard/components/BarChartHorizontalCom.vue b/src/views/tested/dashboard/components/BarChartHorizontalCom.vue index 4ee1096..817ac71 100644 --- a/src/views/tested/dashboard/components/BarChartHorizontalCom.vue +++ b/src/views/tested/dashboard/components/BarChartHorizontalCom.vue @@ -145,7 +145,6 @@ color: '#000', fontSize: 12, formatter(value, index) { - console.log(value, index, '1222322') // const data = props.yAxisData.filter((item: any) => item.includes(value))[0] // const cindex = props.yAxisData.findIndex(data) // 用于修改y轴显示内容 @@ -237,9 +236,16 @@ window.addEventListener('resize', () => { chart.resize() }) - +onBeforeUnmount(() => { + console.log('销毁') + clearInterval(timer.value) + timer.value = null +}) onMounted(() => { + // nextTick(() => { initChart() + // chart.resize() + // }) }) diff --git a/src/views/tested/dashboard/components/BarChartHorizontalCom.vue b/src/views/tested/dashboard/components/BarChartHorizontalCom.vue index 4ee1096..817ac71 100644 --- a/src/views/tested/dashboard/components/BarChartHorizontalCom.vue +++ b/src/views/tested/dashboard/components/BarChartHorizontalCom.vue @@ -145,7 +145,6 @@ color: '#000', fontSize: 12, formatter(value, index) { - console.log(value, index, '1222322') // const data = props.yAxisData.filter((item: any) => item.includes(value))[0] // const cindex = props.yAxisData.findIndex(data) // 用于修改y轴显示内容 @@ -237,9 +236,16 @@ window.addEventListener('resize', () => { chart.resize() }) - +onBeforeUnmount(() => { + console.log('销毁') + clearInterval(timer.value) + timer.value = null +}) onMounted(() => { + // nextTick(() => { initChart() + // chart.resize() + // }) }) diff --git a/src/views/tested/dashboard/index.vue b/src/views/tested/dashboard/index.vue index 9243061..7c2a265 100644 --- a/src/views/tested/dashboard/index.vue +++ b/src/views/tested/dashboard/index.vue @@ -275,8 +275,10 @@ autoScroll(false) // ------------------------------------------------------------------------------ }) -onBeforeMount(() => { +onBeforeUnmount(() => { autoScroll(true) + // clearInterval() + // clea }) @@ -413,7 +415,7 @@ -
+
@@ -445,6 +447,42 @@ />
+
+ + + + + + + + +
+
+ + +
@@ -497,6 +535,10 @@