src/views/reportAnalysis/financialAnalysis/components/center-center.vue
@@ -27,10 +27,11 @@ </template> <script setup> import { ref, onMounted } from 'vue' import { ref } from 'vue' import * as echarts from 'echarts' import Echarts from '@/components/Echarts/echarts.vue' import { incomeExpenseAnalysis } from '@/api/viewIndex.js' import { usePolling } from '@/hooks/usePolling.js' const chartStyle = { width: '100%', height: '100%' } const grid = { @@ -144,9 +145,8 @@ }) } onMounted(() => { fetchData() }) // 启动轮询,每分钟刷新一次数据 usePolling(fetchData) </script> <style scoped>