src/views/reportAnalysis/financialAnalysis/components/center-top.vue
@@ -96,8 +96,9 @@ </template> <script setup> import { onMounted, ref } from 'vue' import { ref } from 'vue' import { getMonthlyIncome, getMonthlyExpenditure } from '@/api/viewIndex' import { usePollingMultiple } from '@/hooks/usePolling.js' const income = ref({ amount: 0, @@ -179,10 +180,8 @@ return Number(metric.trend) >= 0 ? '↑' : '↓' } onMounted(() => { fetchMonthlyIncome() fetchMonthlyExpenditure() }) // 启动轮询,每分钟刷新一次数据 usePollingMultiple([fetchMonthlyIncome, fetchMonthlyExpenditure]) </script> <style scoped>