<template>
  <div class="m-container">
    <h2>
      <div class="squrt"></div>
      意见反馈
    </h2>
    <div class="m-core">
      <tab-router
        v-model.trim="activeIndex"
        type="card"
        @tab-click="handleClick"
      >
        <el-tab-pane
          label="意见反馈"
          lazy
          name="1"
          v-if="permissionList.suggestion"
        >
          <suggestion v-if="activeIndex === '1'" />
        </el-tab-pane>
        <el-tab-pane label="反馈类型配置" lazy name="2">
          <!-- v-if="permissionList.suggestionType" -->
          <suggestionType v-if="activeIndex === '2'" />
        </el-tab-pane>
        <!-- <el-tab-pane
          label="学练宝反馈"
          lazy
          name="3"
          v-if="permissionList.clouldSuggestion"
        >
          <clouldSuggestion v-if="activeIndex === '3'" />
        </el-tab-pane> -->
      </tab-router>
    </div>
  </div>
</template>
<script>
import suggestion from "./suggestion";
import clouldSuggestion from "./clouldSuggestion";
import suggestionType from "./suggestionType";
import { permission } from "@/utils/directivePage";
// /suggestion /clouldSuggestion
export default {
  components: { suggestion, clouldSuggestion, suggestionType },
  data() {
    return {
      activeIndex: "1",
      permissionList: {
        suggestion: permission("/suggestion"),
        suggestionType: permission("/suggestionType"),
        clouldSuggestion: permission("/clouldSuggestion")
      }
    };
  },
  //生命周期 - 创建完成（可以访问当前this实例）
  created() {},
  //生命周期 - 挂载完成（可以访问DOM元素）
  mounted() {},
  methods: {
    handleClick(evt) {
      // this.changeHash(evt.name);
    }
  }
};
</script>
<style lang="scss" scoped></style>
