添加部分钩子函数,便于代码维护

This commit is contained in:
wzy-warehouse
2026-04-13 21:23:24 +08:00
parent 4d2d8787b1
commit b58e2d17d7
13 changed files with 267 additions and 200 deletions
@@ -20,20 +20,16 @@
</template>
<script setup lang="ts">
// 1. 只导入子组件
import BasicComponent from '@/component/rain-earthquake/BasicComponent.vue';
import DisasterChainPointComponent from '@/component/rain-earthquake/DisasterChainPointComponent.vue';
import LegendComponent from '@/component/rain-earthquake/LegendComponent.vue';
import { useRainDisasterChain } from '@/hooks/rainstorm/useRainDisasterChain';
import { useRainLegend } from '@/hooks/rainstorm/useRainLegend';
// 2. 只导入核心类型/枚举
import { DisasterType } from '@/types/common/DisasterType';
import { useRoute } from 'vue-router';
const route = useRoute();
// 4. 执行钩子,拿到所有需要的数据
const {
selectOptions,
tableDatas,