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

<script>
import List from "./list";
import IntroPage from "./introPage";

export default {
  name: "AppMenuManager",
  components: {IntroPage, List},
  label: "菜单管理",
  props: {
    instance: Function,
    dict: {default: () => ({})}
  },
  computed: {
    currentPage() {
      const {hash} = this.$route
      return hash == "#intro" ? IntroPage : List
    }
  },
  created() {
    this.dict.load("menuType")
  }
}
</script>

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