<template>
  <section class="trials-main">
    <TrialsTab v-if="isShow" class="trials-tab" />
    <transition name="fade-transform" mode="out-in">
      <keep-alive :include="cachedViews">
        <router-view :key="key" />
      </keep-alive>
    </transition>
  </section>
</template>

<script>
import TrialsTab from '@/components/TrialsTab'
export default {
  name: 'TrialsMain',
  components: {
    TrialsTab
  },
  computed: {
    isShow() {
      return ~this.$route.path.indexOf('/trials-panel')
    },
    cachedViews() {
      return this.$store.state.tagsView.cachedViews
    },
    key() {
      return this.$route.path
    }
  }
}
</script>

<style lang="scss" scoped>
.trials-main {
  /*50 = navbar  */
  // min-height: calc(100vh - 50px);
  // height: 100vh;
  // width: 100%;
  width: 100%;
  height: calc(100vh - 100px);
  padding:  5px;
  background:#f1f1f1;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  ::v-deep .el-card__body {
    padding: 0px;
  }
  .trials-tab{
    background:#fff;
    padding: 0 5px;
  }
}
</style>

