index.vue 636 B

1234567891011121314151617181920212223
  1. <template>
  2. <component :is="currentCity" />
  3. </template>
  4. <script lang="tsx" setup name="callLog">
  5. import { defineAsyncComponent, computed } from 'vue';
  6. import { getCurrentCityConfig } from '@/utils/appConfig';
  7. // 引入组件
  8. const YiBin = defineAsyncComponent(() => import('@/views/tels/callLog/ybCallLog.vue')); // 宜宾通话记录
  9. const ZiGong = defineAsyncComponent(() => import('@/views/tels/callLog/zgCallLog.vue')); // 自贡通话记录
  10. const { city } = getCurrentCityConfig();
  11. const COMPONENT_LIST = {
  12. YiBin,
  13. ZiGong,
  14. };
  15. // 当前地州市
  16. const currentCity = computed(() => {
  17. return COMPONENT_LIST[city];
  18. });
  19. </script>