<!--
 * @Description: 
 * @Version: 2.0
 * @Autor: mayako
 * @Date: 2020-02-14 11:48:38
 * @LastEditors  : mayako
 * @LastEditTime : 2020-02-14 11:53:52
 -->
<template>
  <div class="dao-step-content" v-show="isActive">
    <slot></slot>
  </div>
</template>
<script>
export default {
  name: 'DaoStepContent',
  componentName: 'DaoStepContent',
  props: {
    index: String // 唯一标识
  },
  computed: {
    currentActiveStep() {
      return this.$parent.currentStepIndex;
    },
    isActive() {
      if (this.currentActiveStep.indexOf('-') === -1) {
        return this.index === `${this.currentActiveStep}-1`;
      }
      return this.currentActiveStep === this.index;
    }
  }
};
</script>
