<template>
  <div>
    <Main v-if="showPage === 'Main'" @changePage="changePage"></Main>
    <Details v-else-if="showPage === 'Details'" @changePage="changePage" :editObj="editObj"></Details>
  </div>
</template>

<script setup>
import Main from "./Main/index.vue";
import Details from "./Details/index.vue";
import { reactive, ref } from "vue";
let showPage = ref('Main')
let editObj = ref(null)
const changePage = (val, obj) => {
  editObj.value = obj ? obj : null
  showPage.value = val
}
</script>

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