  

<template>
  <div>
    <component :is="allComponent[currentComponent]" :skipMsg="skipMsg" @skip-event="skipEvent"></component>
  </div>
  
</template>
  

<script lang="ts">
export default { name: "documentInterfacedoc"} //动态路由二级菜单name对应
</script>

<script setup lang="ts">
import  List from './list.vue'
import  Detail from './detail.vue'

const allComponent={List,Detail} //所有组件
const currentComponent=ref('List') //当前组件
const skipMsg=ref({}) //跳转参数

const skipEvent = (component:string,msg={}) => {
  currentComponent.value=component
  nextTick(() => {
    skipMsg.value=msg
  });
}

</script>

<style lang="scss" scoped>
</style>