<template>
  <page-sub-open-left :code="code" :menu_type="menu_type">
    <Content style="overflow-x: hidden !important">
      <div class="main">
        <div class="main-hd">
          <h5 class="title">{{title.menu_name}}</h5>
        </div>
        <div class="main-bd">
          <slot></slot>
        </div>
      </div>
    </Content>
  </page-sub-open-left>
</template>

<script>
export default {
  props: {
    code: {
      type: String,
    },
    menu_type: {
      type: Boolean,
      default: true
    }
  },
  data() {
    return {
      title: {},
    };
  },
  created() {
    utils.getNavInfo(
      this.$route.path,
      (menu) => {
        if (menu) {
          this.title = menu[menu.length - 1];
        }
      },
      ["PC_OPEN"]
    );
  },
  methods: {},
};
</script>

<style scoped lang="less">
@import "~@/assets/less/variable";
.main {
  padding: 24px;
}
.main-hd {
  padding-bottom: 15px;
  border-bottom: 1px solid @border-color;
}
.main-bd {
  padding-top: 24px;
}
.title {
  font-size: 18px;
}
</style>