gongchunyi
6 天以前 f0c8e8aaf9f41a7ab0f02a23cd7c5de1bffb9e71
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>