<template>
  <div class="dm-steps">
    <slot></slot>
  </div>
</template>

<script>
export default {
  name: 'vue-gic-steps',
  props: {
    space: [Number, String], // 间距
    active: {
      // 设置步骤
      type: Number,
      default: 0
    },
    finishStatus: {
      // 成功状态
      type: String,
      default: 'success'
    },
    processStatus: {
      // 当前步骤状态
      type: String,
      default: 'process'
    },
    simple: {
      type: Boolean,
      default: false
    }
  },

  data() {
    return {
      steps: [],
      stepOffset: 20
    };
  },
  watch: {
    active(newVal, oldVal) {
      this.$emit('change', newVal, oldVal);
    },

    steps(steps) {
      steps.forEach((child, index) => {
        child.index = index;
      });
    }
  }
};
</script>

<style lang="scss">
.dm-steps {
  display: flex;
  white-space: nowrap;
  background-color: #fff;
}
</style>
