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

<script>
import DictDetail from "./dictDetail";
import DictList from "@project/xumu/AppDictionary/dictList.vue";

export default {
  name: "AppDictionary",
  label: "数据字典",
  props: {
    instance: Function,
    dict: Object,
    permissions: Function
  },
  computed: {
    currentPage() {
      let {hash} = this.$route
      return hash == "#add" ? DictDetail : DictList
    }
  },
}
</script>

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