<script>
import Add from "./ccAdd.vue";
import List from "./ccList.vue";

export default {
  name: "AppCopilotConfig",
  label: "Copilot配置",
  props: {
    instance: Function,
    dict: Object,
    permissions: Function,
    menuName: String
  },
  computed: {
    currentPage() {
      let {hash} = this.$route
      return hash == "#add" ? Add : List
    }
  },
}
</script>

<template>
  <section class="AppCopilotConfig">
    <component :is="currentPage" v-bind="$props"/>
  </section>

</template>

<style scoped lang="scss">
.AppCopilotConfig {
  height: 100%;
}
</style>
