<template>
  <el-tabs v-model="curTab">
    <el-tab-pane label="选择器" name="demo">
      <keep-alive>
        <selector-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/selector.md" />
    </el-tab-pane>
  </el-tabs>
</template>
<script>
import SelectorCode from "@/demo/SelectorCode.vue";
import MdView from "@/views/MdView.vue";
import selectorCodeHtml from "@/demo/html/selector.code.js";

export default {
  name: "selector",
  components: { SelectorCode, MdView },
  data() {
    return {
      curTab: "demo",
      code: `${selectorCodeHtml.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>