<template>
  <div>
    <!-- 单要素 -->
    <singleFactor v-if="showType == '1'" />
    <!-- 多要素 -->
    <multipleElements v-if="showType == '2'" />
  </div>
</template>

<script lang="ts" setup>
  import { defineComponent, ref, onMounted, reactive } from 'vue';
  import eventBus from '/@/utils/eventBus';
  // 单要素
  import singleFactor from './components/showType.vue';
  // 多要素
  import multipleElements from './components/showType1.vue';
  let showType = ref('2');
  eventBus.on('setShowType', (e) => {
    showType.value = e;
  });

  onMounted(() => {});
</script>
