<template>
  <el-tabs v-model="curTab">
    <el-tab-pane label="对话框效果" name="demo">
      <keep-alive>
        <dialog-code />
      </keep-alive>
    </el-tab-pane>
    <el-tab-pane label="演示代码" name="code">
      <pre v-highlightjs="code">
        <code class="language-html">
        </code>
      </pre>
    </el-tab-pane>
    <el-tab-pane label="API" name="api">
      <MdView url="md/dialog.md" />
    </el-tab-pane>
  </el-tabs>
</template>
<script>
import DialogCode from "@/demo/DialogCode.vue";
import MdView from "@/views/MdView.vue";
import DialogCodeHtml from "@/demo/html/dialog.code.js";

export default {
  name: "my-sidebardialog",
  components: { DialogCode, MdView },
  data() {
    return {
      curTab: "demo",
      code: `${DialogCodeHtml.code}`
    };
  },
  methods: {}
};
</script>
<style scoped>
.el-tabs--top {
  height: 100%;
}

.el-tabs--top >>> .el-tabs__content {
  height: calc(100% - 50px);
}

.el-tab-pane {
  height: calc(100% - 10px);
  overflow-y: auto;
}
</style>