<template>
  <div class="practice">
    <template>
      <el-tabs
        type="card"
        v-model="activeName"
      >
        <el-tab-pane
          label="习题目录"
          name="1"
        >
          <Ptaba />
        </el-tab-pane>
        <el-tab-pane
          label="练习记录"
          name="2"
        >
          <Ptabb />
        </el-tab-pane>
      </el-tabs>
    </template>
  </div>
</template>
<script>
const Ptaba = () => import("@/views/Home/pages/components/P_tab_a");
const Ptabb = () => import("@/views/Home/pages/components/P_tab_b");

export default {
  components: {
    Ptaba,
    Ptabb,
  },
  data () {
    return {
      activeName: '1',//tabs
    }
  },
  created () {
    !this.$route.query.tabs ? this.activeName = "1" : this.activeName = this.$route.query.tabs;
  },
}
</script>