<script setup>
import List from './List.vue'
import Chart from './Chart.vue'

const activeComp=shallowRef(List)

function changeComp(type){
  activeComp.value=type==='list'?Chart:List
}

</script>

<template>
  <component :is="activeComp" @change="changeComp"></component>
</template>