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

<script setup>
import Main from "./Main/index.vue";
// import Details from "./Details/index.vue";
import Details from "@/components/dialog/Addaqqcindex.vue";
import { reactive, ref } from "vue";

let showPage = ref('Main')
let editObj = reactive({
  editObj: null
})
const changePage = (val, obj) => {
  if (obj) {
    editObj.editObj = obj
  } else {
    editObj.editObj = null
  }
  showPage.value = val
}
</script>

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