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

<script>
import AcList from "./acList";
import AcAdd from "./acAdd";

export default {
  name: "AppAiCode",
  components: {AcAdd, AcList},
  label: "低代码生成平台",
  props: {
    instance: Function,
    dict: Object,
    permissions: Function
  },
  computed: {
    currentPage() {
      let {hash} = this.$route
      return hash == "#add" ? AcAdd : AcList
    }
  },
  created() {
    this.dict.load("detailType")
  }
}
</script>

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