<script setup lang="ts" name="projectManageIndex">
import { ref } from 'vue'
import list from './list.vue'
import discoverProcess from './discoverProcess.vue'
import discoverResult from './discoverResult.vue'

const widget = {
  list: list,
  discoverProcess: discoverProcess,
  discoverResult: discoverResult
}

const page = ref('list')
const params = ref({})

function onChangePage(val: string, param?: any) {
  page.value = val
  params.value = param ?? {}
}
</script>

<template>
  <component :is="widget[page]" v-bind="params" @page="onChangePage" />
</template>
